pqServerConfigurationImporter.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 pqServerConfigurationImporter_h
5 #define pqServerConfigurationImporter_h
6 
7 #include "pqComponentsModule.h"
9 #include <QList>
10 #include <QObject>
11 
12 class QAuthenticator;
13 class QNetworkReply;
14 class QUrl;
15 
21 {
22  Q_OBJECT
23  typedef QObject Superclass;
24 
25 public:
26  pqServerConfigurationImporter(QObject* parent = nullptr);
28 
30  {
31  PVSC
32  };
33 
49  void addSource(const QString& name, const QUrl& url, SourceMode mode = PVSC);
50 
54  void clearSources();
55 
56  class Item
57  {
58  public:
63 
68  QString SourceName;
69  };
70 
78  const QList<Item>& configurations() const;
79 
80 public Q_SLOTS: // NOLINT(readability-redundant-access-specifiers)
89  void fetchConfigurations();
90 
95  void abortFetch();
96 
97 Q_SIGNALS:
103  void incrementalUpdate();
104 
108  void configurationsUpdated();
109 
115  void authenticationRequired(QNetworkReply*, QAuthenticator*);
116 
121  void abortFetchTriggered();
122 
127  void message(const QString& message);
128 
129 protected:
135  bool processDownloadedContents();
136 
141  bool fetch(const QUrl& url);
142 
143 private Q_SLOTS:
147  void readCurrentData();
148 
149 private: // NOLINT(readability-redundant-access-specifiers)
150  Q_DISABLE_COPY(pqServerConfigurationImporter)
151 
152  class pqInternals;
153  pqInternals* Internals;
154 };
155 
156 #endif
#define PQCOMPONENTS_EXPORT
QString SourceName
Refers to the user-friendly name for the source defined in the configurations file.
pqServerConfigurationImporter class can be used to import remote server configurations.
pqServerConfiguration corresponds to a server connection configuration.
pqServerConfiguration Configuration
Points to the server configuration.