pqPythonScriptEditorReaction.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 
5 #ifndef pqPythonScriptEditorReaction_h
6 #define pqPythonScriptEditorReaction_h
7 
8 #include <pqCoreUtilities.h>
9 #include <pqMasterOnlyReaction.h>
10 #include <pqPVApplicationCore.h>
11 #include <pqPythonScriptEditor.h>
12 
14 {
15  Q_OBJECT
16 
17 public:
19  : pqMasterOnlyReaction(action)
20  {
21  }
22 
23 protected Q_SLOTS:
24  void onTriggered() override
25  {
28 
29  pyEditor->setPythonManager(pythonManager);
30  pyEditor->show();
31  pyEditor->raise();
32  pyEditor->activateWindow();
33  }
34 
35 private:
36  Q_DISABLE_COPY(pqPythonScriptEditorReaction)
37 };
38 
39 #endif // pqPythonScriptEditorReaction_h
static pqPVApplicationCore * instance()
Returns the pqPVApplicationCore instance.
#define PQAPPLICATIONCOMPONENTS_EXPORT
static pqPythonScriptEditor * getUniqueInstance()
Utility function that provides a single instance of the editor.
pqPythonManager * pythonManager() const
Provides access to the python manager.
This is a superclass just to make it easier to collect all such reactions.
pqPythonManager is a class to facilitate the use of a python interpreter by various paraview GUI comp...
void setPythonManager(pqPythonManager *manager)
Sets the pqPythonManager used for the macros.