Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
pqPythonEditorActions Struct Reference

#include <pqPythonEditorActions.h>

Collaboration diagram for pqPythonEditorActions:
Collaboration graph
[legend]

Public Types

enum  GeneralActionType : std::uint8_t {
  GeneralActionType::NewFile, GeneralActionType::OpenFile, GeneralActionType::SaveFile, GeneralActionType::SaveFileAs,
  GeneralActionType::SaveFileAsMacro, GeneralActionType::SaveFileAsScript, GeneralActionType::DeleteAll, GeneralActionType::Undo,
  GeneralActionType::Redo, GeneralActionType::Copy, GeneralActionType::Cut, GeneralActionType::Paste,
  GeneralActionType::CloseCurrentTab, GeneralActionType::Exit, GeneralActionType::Run, GeneralActionType::END
}
 General editor actions. More...
 
enum  ScriptActionType : std::uint8_t {
  ScriptActionType::Open, ScriptActionType::Load, ScriptActionType::Delete, ScriptActionType::Run,
  ScriptActionType::END
}
 Specialized actions for the scripting part of the editor. More...
 
using TGeneralAction = EditorActionGroup< GeneralActionType >
 
using ScriptAction = EditorActionGroup< ScriptActionType >
 

Public Member Functions

 pqPythonEditorActions ()
 Default constructor initialize the tooltip and text of the various actions. More...
 
const QAction & operator[] (const GeneralActionType action) const
 const accessor to an action More...
 
QAction & operator[] (const GeneralActionType action)
 accessor to an action More...
 
void updateScriptsList (pqPythonManager *python_mgr)
 Updates the list of actions by listing the files contained into the default Script dir. More...
 
void FillQMenu (EnumArray< ScriptAction::Type, QMenu *> menus)
 Fill the input menus with the current actions listed by this object. More...
 

Static Public Member Functions

template<class T >
static void connect (pqPythonEditorActions &, T *)
 Connects the pqPythonEditorActions to the type T. More...
 
template<class T >
static void disconnect (pqPythonEditorActions &, T *)
 Disconnects the pqPythonEditorActions to the type T. More...
 

Public Attributes

TGeneralAction GeneralActions
 The list of general actions. More...
 
std::vector< ScriptActionScriptActions
 The variable sized array of script actions. More...
 

Detailed Description

Definition at line 73 of file pqPythonEditorActions.h.

Member Typedef Documentation

◆ TGeneralAction

Definition at line 127 of file pqPythonEditorActions.h.

◆ ScriptAction

Definition at line 134 of file pqPythonEditorActions.h.

Member Enumeration Documentation

◆ GeneralActionType

enum pqPythonEditorActions::GeneralActionType : std::uint8_t
strong

General editor actions.

Enumerator
NewFile 
OpenFile 
SaveFile 
SaveFileAs 
SaveFileAsMacro 
SaveFileAsScript 
DeleteAll 
Undo 
Redo 
Copy 
Cut 
Paste 
CloseCurrentTab 
Exit 
Run 
END 

Definition at line 85 of file pqPythonEditorActions.h.

◆ ScriptActionType

enum pqPythonEditorActions::ScriptActionType : std::uint8_t
strong

Specialized actions for the scripting part of the editor.

Enumerator
Open 
Load 
Delete 
Run 
END 

Definition at line 117 of file pqPythonEditorActions.h.

Constructor & Destructor Documentation

◆ pqPythonEditorActions()

pqPythonEditorActions::pqPythonEditorActions ( )

Default constructor initialize the tooltip and text of the various actions.

Member Function Documentation

◆ operator[]() [1/2]

const QAction& pqPythonEditorActions::operator[] ( const GeneralActionType  action) const
inline

const accessor to an action

Definition at line 144 of file pqPythonEditorActions.h.

◆ operator[]() [2/2]

QAction& pqPythonEditorActions::operator[] ( const GeneralActionType  action)
inline

accessor to an action

Definition at line 152 of file pqPythonEditorActions.h.

◆ updateScriptsList()

void pqPythonEditorActions::updateScriptsList ( pqPythonManager python_mgr)

Updates the list of actions by listing the files contained into the default Script dir.

Parameters
python_mgrinstance of the python manager

◆ FillQMenu()

void pqPythonEditorActions::FillQMenu ( EnumArray< ScriptAction::Type, QMenu *>  menus)

Fill the input menus with the current actions listed by this object.

◆ connect()

template<class T >
static void pqPythonEditorActions::connect ( pqPythonEditorActions ,
T *   
)
static

Connects the pqPythonEditorActions to the type T.

◆ disconnect()

template<class T >
static void pqPythonEditorActions::disconnect ( pqPythonEditorActions ,
T *   
)
static

Disconnects the pqPythonEditorActions to the type T.

Member Data Documentation

◆ GeneralActions

TGeneralAction pqPythonEditorActions::GeneralActions

The list of general actions.

Definition at line 132 of file pqPythonEditorActions.h.

◆ ScriptActions

std::vector<ScriptAction> pqPythonEditorActions::ScriptActions

The variable sized array of script actions.

Definition at line 139 of file pqPythonEditorActions.h.


The documentation for this struct was generated from the following file: