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 
12 class vtkSMProxy;
13 
19 {
20  Q_OBJECT
21  typedef pqReaction Superclass;
22 
23 public:
27  pqSaveStateReaction(QAction* parent);
28  ~pqSaveStateReaction() override = default;
29 
35  static bool saveState();
36 
43  static bool saveState(pqServer* server);
44 
51  static bool saveState(
52  const QString& filename, vtkTypeUInt32 location = 0x10 /*vtkPVSession::CLIENT*/);
53 
55 
65  static bool savePythonState(
66  const QString& filename, vtkTypeUInt32 location = 0x10 /*vtkPVSession::CLIENT*/);
67  static bool savePythonState(const QString& filename, vtkSMProxy* options, vtkTypeUInt32 location);
69 
77  static vtkSMProxy* createPythonStateOptions(bool interactive);
78 
79 public Q_SLOTS: // NOLINT(readability-redundant-access-specifiers)
83  void updateEnableState() override;
84 
85 protected:
90 
91 private:
92  Q_DISABLE_COPY(pqSaveStateReaction)
93 };
94 
95 #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...
proxy for a VTK object(s) on a server
Definition: vtkSMProxy.h:140
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