pqServerConfigurationCollection.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-FileCopyrightText: Copyright (c) Sandia Corporation
3 // SPDX-License-Identifier: BSD-3-Clause
4 #ifndef pqServerConfigurationCollection_h
5 #define pqServerConfigurationCollection_h
6 
7 #include "pqCoreModule.h"
8 #include <QList>
9 #include <QMap>
10 #include <QObject>
11 
12 class vtkPVXMLElement;
13 class pqServerResource;
15 
33 {
34  Q_OBJECT
35  typedef QObject Superclass;
36 
37 public:
38  pqServerConfigurationCollection(QObject* parent = nullptr);
40 
46  bool loadContents(const QString& contents, bool mutable_configs);
47 
53  QString saveContents(bool only_mutable) const;
54 
58  bool load(const QString& filename, bool mutable_configs);
59  bool save(const QString& filename, bool only_mutable);
60  bool saveNow();
61 
65  void addConfiguration(vtkPVXMLElement* configuration, bool mutable_config = true);
66  void addConfiguration(const pqServerConfiguration&);
67 
71  void removeConfiguration(const QString&);
72 
76  QList<pqServerConfiguration> configurations() const;
77 
81  QList<pqServerConfiguration> configurations(const pqServerResource& selector) const;
82 
87  const pqServerConfiguration* configuration(const char* configuration_name) const;
88 
89 public Q_SLOTS: // NOLINT(readability-redundant-access-specifiers)
93  void removeUserConfigurations();
94 
95 Q_SIGNALS:
99  void changed();
100 
101 protected:
102  QMap<QString, pqServerConfiguration> Configurations;
103 
104 private:
105  Q_DISABLE_COPY(pqServerConfigurationCollection)
106 };
107 
108 #endif
load
pqServerConfigurationCollection maintains a serializable collection of server-configurations defined ...
#define PQCORE_EXPORT
Definition: pqCoreModule.h:15
void save(Archiver &ar, const vtkUnicodeString &str, const unsigned int vtkNotUsed(version))
pqServerConfiguration corresponds to a server connection configuration.
This is used by vtkPVXMLParser to represent an XML document starting at the root element.
pqServerResource encapsulates a resource in ParaView.
QMap< QString, pqServerConfiguration > Configurations