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 
13 class PQAPPLICATIONCOMPONENTS_EXPORT pqPythonScriptEditorReaction : public pqMasterOnlyReaction
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
pqMasterOnlyReaction
Definition: pqMasterOnlyReaction.h:24
pqPythonScriptEditorReaction::pqPythonScriptEditorReaction
pqPythonScriptEditorReaction(QAction *action)
Definition: pqPythonScriptEditorReaction.h:18
pqPVApplicationCore::instance
static pqPVApplicationCore * instance()
Returns the pqPVApplicationCore instance.
Definition: pqPVApplicationCore.h:39
pqPythonScriptEditor::setPythonManager
void setPythonManager(pqPythonManager *manager)
Sets the pqPythonManager used for the macros.
pqCoreUtilities.h
pqPythonScriptEditorReaction
Definition: pqPythonScriptEditorReaction.h:13
pqPythonScriptEditor.h
pqPythonScriptEditorReaction::onTriggered
void onTriggered() override
Definition: pqPythonScriptEditorReaction.h:24
pqPythonScriptEditor
Definition: pqPythonScriptEditor.h:40
pqPVApplicationCore.h
pqPythonScriptEditor::getUniqueInstance
static pqPythonScriptEditor * getUniqueInstance()
Utility function that provides a single instance of the editor.
pqMasterOnlyReaction.h
pqPythonManager
pqPythonManager is a class to facilitate the use of a python interpreter by various paraview GUI comp...
Definition: pqPythonManager.h:28
pqPVApplicationCore::pythonManager
pqPythonManager * pythonManager() const
Provides access to the python manager.