pqTriggerOnIdleHelper.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 pqTriggerOnIdleHelper_h
5 #define pqTriggerOnIdleHelper_h
6 
7 #include <QObject>
8 #include <QPointer>
9 
10 #include "pqComponentsModule.h"
11 #include "pqTimer.h"
12 
13 class pqServer;
14 
24 {
25  Q_OBJECT
26  typedef QObject Superclass;
27 
28 public:
29  pqTriggerOnIdleHelper(QObject* parent = nullptr);
30  ~pqTriggerOnIdleHelper() override;
31 
35  pqServer* server() const;
36 
37 Q_SIGNALS:
38  void triggered();
39 
40 public Q_SLOTS:
41  void setServer(pqServer*);
42  void trigger();
43 
44 protected Q_SLOTS:
45  void triggerInternal();
46 
47 private:
48  Q_DISABLE_COPY(pqTriggerOnIdleHelper)
49 
50  QPointer<pqServer> Server;
51  pqTimer Timer;
52 };
53 
54 #endif
#define PQCOMPONENTS_EXPORT
pqServer (should be renamed to pqSession) is a pqServerManagerModelItem subclass that represents a vt...
Definition: pqServer.h:35
Often times we need to call certain slots on idle.