Go to the documentation of this file.
5 #ifndef pqPythonEditorActions_h
6 #define pqPythonEditorActions_h
30 static_assert(
static_cast<int>(E::END),
"The input enum must end with END");
31 static_assert(
static_cast<int>(E::END) != 0,
"At least one action is required");
41 for (
int i = 0; i < static_cast<int>(Type::END); ++i)
43 this->
Actions[
static_cast<Type>(i)] =
new QAction();
146 return this->GeneralActions[action];
182 #endif // pqPythonEditorActions_h
const QAction & operator[](const Type action) const
const accessor to an action
QAction & operator[](const Type action)
accessor to an action
A template group of action.
static void connect(pqPythonEditorActions &, T *)
Connects the pqPythonEditorActions to the type T.
Stack array using an enum as indexer.
EditorActionGroup()
Default constructor allocates all the actions listed in the enum.
EnumArray< Type, QPointer< QAction > > Actions
The array of actions.
const QAction & operator[](const GeneralActionType action) const
const accessor to an action
static void disconnect(pqPythonEditorActions &, T *)
Disconnects the pqPythonEditorActions to the type T.
std::vector< ScriptAction > ScriptActions
The variable sized array of script actions.
GeneralActionType
General editor actions.
ScriptActionType
Specialized actions for the scripting part of the editor.
void updateScriptsList(pqPythonManager *python_mgr)
Updates the list of actions by listing the files contained into the default Script dir.
pqPythonEditorActions()
Default constructor initialize the tooltip and text of the various actions.
void FillQMenu(EnumArray< ScriptAction::Type, QMenu * > menus)
Fill the input menus with the current actions listed by this object.
QAction & operator[](const GeneralActionType action)
accessor to an action
pqPythonManager is a class to facilitate the use of a python interpreter by various paraview GUI comp...
TGeneralAction GeneralActions
The list of general actions.