pqSaveStateReaction.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 pqSaveStateReaction_h
5 #define pqSaveStateReaction_h
6 
7 #include "pqReaction.h"
8 #include "vtkType.h" // needed for vtkTypeUInt32
9 
10 class pqServer;
11 
17 {
18  Q_OBJECT
19  typedef pqReaction Superclass;
20 
21 public:
25  pqSaveStateReaction(QAction* parent);
26  ~pqSaveStateReaction() override = default;
27 
33  static bool saveState();
34 
41  static bool saveState(pqServer* server);
42 
49  static bool saveState(
50  const QString& filename, vtkTypeUInt32 location = 0x10 /*vtkPVSession::CLIENT*/);
51 
58  static bool savePythonState(
59  const QString& filename, vtkTypeUInt32 location = 0x10 /*vtkPVSession::CLIENT*/);
60 
61 public Q_SLOTS: // NOLINT(readability-redundant-access-specifiers)
65  void updateEnableState() override;
66 
67 protected:
72 
73 private:
74  Q_DISABLE_COPY(pqSaveStateReaction)
75 };
76 
77 #endif
location
virtual void updateEnableState()
Definition: pqReaction.h:48
#define PQAPPLICATIONCOMPONENTS_EXPORT
This is a superclass just to make it easier to collect all such reactions.
Definition: pqReaction.h:25
static bool saveState()
Open File dialog, with the active server, in order to choose the location and the type of the state f...
Reaction for saving state file.
void onTriggered() override
Called when the action is triggered.
pqServer (should be renamed to pqSession) is a pqServerManagerModelItem subclass that represents a vt...
Definition: pqServer.h:35