pqServerConnectDialog.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 pqServerConnectDialog_h
5 #define pqServerConnectDialog_h
6 
7 #include "pqComponentsModule.h"
8 #include "pqServerResource.h"
9 #include <QDialog>
10 
11 #include <QList>
13 class pqServerResource;
14 class QAuthenticator;
15 class QListWidgetItem;
16 class QNetworkReply;
17 
30 {
31  Q_OBJECT
32  typedef QDialog Superclass;
33 
34 public:
40  QWidget* parent = nullptr, const pqServerResource& selector = pqServerResource());
41  ~pqServerConnectDialog() override;
42 
47  const pqServerConfiguration& configurationToConnect() const;
48 
56  static bool selectServer(pqServerConfiguration& selected_configuration,
57  QWidget* dialogParent = nullptr, const pqServerResource& selector = pqServerResource());
58 
59 Q_SIGNALS:
60 
64  void serverAdded();
65 
69  void serverDeleted();
70 
71 protected Q_SLOTS:
75  void updateConfigurations();
76 
80  void onServerSelected();
81 
85  void editServer();
86 
90  void addServer();
91 
95  void updateButtons();
96 
100  void updateServerType();
101 
105  void goToFirstPage();
106 
110  void acceptConfigurationPage1();
111 
115  void acceptConfigurationPage2();
116 
120  void editServerStartup();
121 
122  // called when the "name" on the edit server page changes. We ensure that the
123  // user cannot set a duplicate name.
124  void onNameChanged();
125 
129  void deleteServer();
130  void deleteAllServers();
131 
135  void loadServers();
136  void saveServers();
137 
141  void connect();
142 
147  void updateDialogTitle(int page_number);
148 
152  void fetchServers();
153 
157  void authenticationRequired(QNetworkReply*, QAuthenticator*);
158 
162  void updateImportableConfigurations();
163 
167  void importError(const QString& message);
168 
172  void importServersSelectionChanged();
173 
177  void importServers();
178 
182  void editSources();
183 
184  void saveSourcesList();
185  void cancelEditSources();
186 
187 protected: // NOLINT(readability-redundant-access-specifiers)
188  void editConfiguration(const pqServerConfiguration&);
189  bool serverNameExists(const QString& name);
190 
191 private:
192  Q_DISABLE_COPY(pqServerConnectDialog)
193 
194  class pqInternals;
195  pqInternals* Internals;
196 };
197 
198 #endif
#define PQCOMPONENTS_EXPORT
name
connect
pqServerConnectDialog is a dialog that can be used to show the user a selection of server configurati...
pqServerConfiguration corresponds to a server connection configuration.
pqServerResource encapsulates a resource in ParaView.