pqAlwaysConnectedBehavior.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 pqAlwaysConnectedBehavior_h
5 #define pqAlwaysConnectedBehavior_h
6 
7 #include <QObject>
8 
10 #include "pqServerResource.h"
11 #include "pqTimer.h"
12 
19 {
20  Q_OBJECT
21  typedef QObject Superclass;
22 
23 public:
24  pqAlwaysConnectedBehavior(QObject* parent = nullptr);
25  ~pqAlwaysConnectedBehavior() override;
26 
30  void setDefaultServer(const pqServerResource& resource) { this->DefaultServer = resource; }
31  const pqServerResource& defaultServer() const { return this->DefaultServer; }
32 
33 protected Q_SLOTS:
34  void serverCheck();
35 
36 protected: // NOLINT(readability-redundant-access-specifiers)
38  pqTimer Timer;
39 
40 private:
41  Q_DISABLE_COPY(pqAlwaysConnectedBehavior)
42 };
43 
44 #endif
pqAlwaysConnectedBehavior ensures that the client always remains connected to a server.
#define PQAPPLICATIONCOMPONENTS_EXPORT
const pqServerResource & defaultServer() const
void setDefaultServer(const pqServerResource &resource)
Get/Set the default server resource to connect to.
pqServerResource encapsulates a resource in ParaView.