pqServerConnectReaction.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 pqServerConnectReaction_h
5 #define pqServerConnectReaction_h
6 
7 #include "pqReaction.h"
8 
10 class pqServerResource;
11 
16 class PQAPPLICATIONCOMPONENTS_EXPORT pqServerConnectReaction : public pqReaction
17 {
18  Q_OBJECT
19  typedef pqReaction Superclass;
20 
21 public:
25  pqServerConnectReaction(QAction* parent);
26 
32  static void connectToServerWithWarning();
33  static void connectToServerWithWarning(
34  const pqServerConfiguration& config, bool showConnectionDialog = true);
35  static void connectToServer();
36 
41  static bool connectToServerUsingConfigurationName(
42  const char* config_name, bool showConnectionDialog = true);
43 
47  static bool connectToServerUsingConfiguration(
48  const pqServerConfiguration& config, bool showConnectionDialog = true);
49 
54  static bool connectToServer(const pqServerResource& resource, bool showConnectionDialog = true);
55 
56 protected:
61 
62 private Q_SLOTS:
66  void updateEnableState() override;
67 
68 private: // NOLINT(readability-redundant-access-specifiers)
69  Q_DISABLE_COPY(pqServerConnectReaction)
70 
71 
74  static bool canProceedWithConnection();
75 };
76 
77 #endif
Reaction for connecting to a server.
virtual void updateEnableState()
Definition: pqReaction.h:48
This is a superclass just to make it easier to collect all such reactions.
Definition: pqReaction.h:25
static void connectToServerWithWarning()
Creates a server connection using the server connection dialog.
pqServerConfiguration corresponds to a server connection configuration.
void onTriggered() override
Called when the action is triggered.
pqServerResource encapsulates a resource in ParaView.