pqServerConfigurationCollection maintains a serializable collection of server-configurations defined in pqServerConfiguration instances. More...
#include <pqServerConfigurationCollection.h>
Inherits QObject.
Public Slots | |
| void | removeUserConfigurations () |
| Remove all user configurations. More... | |
Signals | |
| void | changed () |
| fired when the collection is modified. More... | |
Public Member Functions | |
| pqServerConfigurationCollection (QObject *parent=nullptr) | |
| ~pqServerConfigurationCollection () override | |
| bool | loadContents (const QString &contents, bool mutable_configs) |
| load a pvsc txt. More... | |
| QString | saveContents (bool only_mutable) const |
| save the currently loaded configurations to a file. More... | |
| bool | load (const QString &filename, bool mutable_configs) |
| load/save configurations from/to file. More... | |
| bool | save (const QString &filename, bool only_mutable) |
| bool | saveNow () |
| void | addConfiguration (vtkPVXMLElement *configuration, bool mutable_config=true) |
| Add a server configuration. More... | |
| void | addConfiguration (const pqServerConfiguration &) |
| void | removeConfiguration (const QString &) |
| remove a configuration given the name. More... | |
| QList< pqServerConfiguration > | configurations () const |
| returns the set of server-configurations. More... | |
| QList< pqServerConfiguration > | configurations (const pqServerResource &selector) const |
| returns the configurations matching the selector's host. More... | |
| const pqServerConfiguration * | configuration (const char *configuration_name) const |
| Returns a configuration with the given name. More... | |
Protected Attributes | |
| QMap< QString, pqServerConfiguration > | Configurations |
pqServerConfigurationCollection maintains a serializable collection of server-configurations defined in pqServerConfiguration instances.
During construction, this class attempts to read server-configurations from following locations:
QApplication::applicationDirPath()/default_servers.pvsc ${COMMON_APPDATA}/QApplication::organizationName()/servers.pvsc /usr/share/QApplication::organizationName()/servers.pvsc ${QSettings INI Path}/servers.pvsc – User-specific servers.The location marked as "User-specific servers" is the location where any server-configurations created/imported by user are saved. User can only modify the server-configurations loaded from this file. All others are treated as read-only configurations.
Definition at line 32 of file pqServerConfigurationCollection.h.
| pqServerConfigurationCollection::pqServerConfigurationCollection | ( | QObject * | parent = nullptr | ) |
|
override |
| bool pqServerConfigurationCollection::loadContents | ( | const QString & | contents, |
| bool | mutable_configs | ||
| ) |
load a pvsc txt.
If mutable_configs==true, then the server-configurations loaded from this file can be edited by the user and get saved in "User-specific servers" configuration file at destruction.
| QString pqServerConfigurationCollection::saveContents | ( | bool | only_mutable | ) | const |
save the currently loaded configurations to a file.
If only_mutable==true, only the configurations that were marked mutable are saved, otherwise all configurations are saved.
| bool pqServerConfigurationCollection::load | ( | const QString & | filename, |
| bool | mutable_configs | ||
| ) |
load/save configurations from/to file.
| bool pqServerConfigurationCollection::save | ( | const QString & | filename, |
| bool | only_mutable | ||
| ) |
| bool pqServerConfigurationCollection::saveNow | ( | ) |
| void pqServerConfigurationCollection::addConfiguration | ( | vtkPVXMLElement * | configuration, |
| bool | mutable_config = true |
||
| ) |
Add a server configuration.
| void pqServerConfigurationCollection::addConfiguration | ( | const pqServerConfiguration & | ) |
| void pqServerConfigurationCollection::removeConfiguration | ( | const QString & | ) |
remove a configuration given the name.
| QList<pqServerConfiguration> pqServerConfigurationCollection::configurations | ( | ) | const |
returns the set of server-configurations.
| QList<pqServerConfiguration> pqServerConfigurationCollection::configurations | ( | const pqServerResource & | selector | ) | const |
returns the configurations matching the selector's host.
| const pqServerConfiguration* pqServerConfigurationCollection::configuration | ( | const char * | configuration_name | ) | const |
Returns a configuration with the given name.
Returns nullptr when none is found.
|
slot |
Remove all user configurations.
This deletes the user servers.pvsc file.
|
signal |
fired when the collection is modified.
|
protected |
Definition at line 102 of file pqServerConfigurationCollection.h.
1.8.13 on Sat Dec 6 2025