The class provides utility functions which can be used in the Python to operate with the SALOME GUI. More...
#include <SalomePyQt.h>
Static Public Member Functions | |
static QString | getAppName () |
Get application name. More... | |
static bool | isLightApp () |
Check if SALOME GUI is running in "light" mode. More... | |
static QWidget * | getDesktop () |
Get the active application's desktop window. More... | |
static QWidget * | getMainFrame () |
Get current application's main frame widget [obsolete]. More... | |
static QMenuBar * | getMainMenuBar () |
Get current application desktop's main menu. More... | |
static QMenu * | getPopupMenu (const MenuName) |
Get main menu's child popup submenu by its identifier. More... | |
static QMenu * | getPopupMenu (const QString &) |
Get main menu's child popup submenu by its name. More... | |
static QTreeView * | getObjectBrowser () |
Get object browser. More... | |
static void | enableSelector () |
enable PyQt_Selector (on module activation, for instance) More... | |
static void | disableSelector () |
disable PyQt_Selector (on module activation, for instance) More... | |
static SALOME_Selection * | getSelection () |
Get the selection object for the current study. More... | |
static QStringList | getComponents () |
Get all modules used in current GUI session. More... | |
static void | setSelection (const QStringList &) |
Send local selection for notification. More... | |
static const QString | getActiveComponent () |
Get the currently active module name (for the current study). More... | |
static PyObject * | getActivePythonModule () |
Access to Python module object currently loaded into SALOME_PYQT_ModuleLight container. More... | |
static bool | activateModule (const QString &) |
Activates SALOME module with the given name. More... | |
static void | registerModule (const QString &) |
Registers module in the study tree. More... | |
static void | updateObjBrowser () |
Update an Object Browser of the study. More... | |
static void | infoSetTitle (const QString &) |
Set the title to the Help panel. More... | |
static int | infoAddLabel (const QString &, const int=-1) |
Insert left-aligned text label into the Help panel. More... | |
static int | infoAddLabel (const QString &, Qt::Alignment, const int=-1) |
Insert text label into the Help panel. More... | |
static int | infoAddAction (QAction *, const int=-1) |
Insert action button into the Help panel. More... | |
static int | infoAddGroup (const QString &, const int=-1) |
Create a (sub-)group in the Help panel. More... | |
static void | infoRemove (const int) |
Remove item from the Help panel. More... | |
static void | infoClear (const int=-1) |
Clear Help panel's contents. More... | |
static void | infoSetVisible (const int, bool) |
Set item's visibility in the Help panel. More... | |
static void | infoSetEnabled (const int, bool) |
Enable/disable item in the Help panel. More... | |
static void | putInfo (const QString &, const int=0) |
Put an information message to the current application's desktop status bar. More... | |
static int | showNotification (const QString &, const QString &, const int=-1) |
Show notification in the application's desktop window. More... | |
static void | hideNotification (const QString &) |
Remove notification with given message text from the application's desktop. More... | |
static void | hideNotification (const int) |
Remove notification with given id from the application's desktop. More... | |
static bool | isModified () |
static void | setModified (bool) |
static QString | getFileName (QWidget *, const QString &, const QStringList &, const QString &, bool) |
Show 'Open/Save file' dialog box for file selection and return a user's choice (selected file name). More... | |
static QStringList | getOpenFileNames (QWidget *, const QString &, const QStringList &, const QString &) |
Show 'Open files' dialog box for multiple files selection and return a user's choice (selected file names list). More... | |
static QString | getExistingDirectory (QWidget *, const QString &, const QString &) |
Show 'Get Directory' dialog box for the directory selection and return a user's choice (selected directory name). More... | |
static void | createRoot () |
Initialize root data object. More... | |
static QString | createObject (const QString &parent=QString()) |
Create empty data object. More... | |
static QString | createObject (const QString &, const QString &, const QString &, const QString &=QString()) |
Create new data object with specified name, icon and tooltip. More... | |
static void | removeObject (const QString &) |
Remove object by entry. More... | |
static void | removeChildren (const QString &=QString()) |
Remove all child data objects from specified data object. More... | |
static QStringList | getChildren (const QString &=QString(), const bool=false) |
Get entries of all child data objects of specified data object. More... | |
static void | setName (const QString &, const QString &) |
Set data object name. More... | |
static void | setIcon (const QString &, const QString &) |
Set data object icon. More... | |
static void | setToolTip (const QString &, const QString &) |
Set data object tooltip. More... | |
static QString | getName (const QString &) |
Get data object name. More... | |
static QString | getToolTip (const QString &) |
Get data object tooltip. More... | |
static void | setVisibilityState (const QString &, VisibilityState) |
Set visibility state for given object. More... | |
static VisibilityState | getVisibilityState (const QString &) |
Get visibility state for given object. More... | |
static void | setObjectPosition (const QString &, int) |
Set position of given object in the tree. More... | |
static int | getObjectPosition (const QString &) |
Get position of given object in the tree. More... | |
static void | setColor (const QString &, const QColor &) |
Set data object color. More... | |
static QColor | getColor (const QString &) |
Get data object color. More... | |
static void | setReference (const QString &, const QString &) |
Set reference to another data object. More... | |
static QString | getReference (const QString &) |
static QIcon | loadIcon (const QString &, const QString &) |
Load an icon from the module resources by the specified file name. More... | |
static void | helpContext (const QString &, const QString &) |
Open external browser to display context help information. More... | |
static bool | dumpView (const QString &, const int=0) |
Dump the contents of the id view window. If id is 0 then current active view is processed. to the image file in the specified format. More... | |
static int | defaultMenuGroup () |
Get detault menu group identifier which can be used when creating menus (insert custom menu commands). More... | |
static int | createTool (const QString &, const QString &=QString()) |
Create toolbar with specified name. More... | |
static int | createTool (const int, const int, const int=-1) |
Insert action with specified id to the toolbar. More... | |
static int | createTool (const int, const QString &, const int=-1) |
Insert action with specified id to the toolbar. More... | |
static int | createTool (QAction *, const int, const int=-1, const int=-1) |
Insert action to the toolbar. More... | |
static int | createTool (QAction *, const QString &, const int=-1, const int=-1) |
Insert action to the toolbar. More... | |
static void | clearTool (const QString &) |
Clear given toolbar. More... | |
static int | createMenu (const QString &, const int=-1, const int=-1, const int=-1, const int=-1) |
Create main menu. More... | |
static int | createMenu (const QString &, const QString &=QString(), const int=-1, const int=-1, const int=-1) |
Create main menu. More... | |
static int | createMenu (const int, const int=-1, const int=-1, const int=-1) |
Insert action to the main menu. More... | |
static int | createMenu (const int, const QString &=QString(), const int=-1, const int=-1) |
Insert action to the main menu. More... | |
static int | createMenu (QAction *, const int, const int=-1, const int=-1, const int=-1) |
Insert action to the main menu. More... | |
static int | createMenu (QAction *, const QString &, const int=-1, const int=-1, const int=-1) |
Insert action to the main menu. More... | |
static QAction * | createSeparator () |
Create separator action which can be used in the menu or toolbar. More... | |
static QAction * | createAction (const int, const QString &, const QString &=QString(), const QString &=QString(), const QString &=QString(), const int=0, const bool=false) |
Create an action which can be then used in the menu or toolbar. More... | |
static QtxActionGroup * | createActionGroup (const int, const bool=true) |
Create an action group which can be then used in the menu or toolbar. More... | |
static QAction * | action (const int) |
Get action by specified identifier. More... | |
static int | actionId (const QAction *) |
Get an action identifier. More... | |
static QString | constant (const QString &) |
Get constant's value from application's resource manager. More... | |
static void | setConstant (const QString &, const QString &) |
Add constant to the application's resource manager. More... | |
static void | addSetting (const QString &, const QString &, const double) |
Add double setting to the application preferences. More... | |
static void | addSetting (const QString &, const QString &, const int) |
Add integer setting to the application preferences. More... | |
static void | addSetting (const QString &, const QString &, const bool, const int) |
Add boolean setting to the application preferences. More... | |
static void | addSetting (const QString &, const QString &, const QString &) |
Add string setting to the application preferences. More... | |
static void | addSetting (const QString &, const QString &, const QColor &) |
Add color setting to the application preferences. More... | |
static void | addSetting (const QString &, const QString &, const QByteArray &) |
Add byte array setting to the application preferences. More... | |
static void | addSetting (const QString &, const QString &, const QFont &) |
Add font setting to the application preferences. More... | |
static int | integerSetting (const QString &, const QString &, const int=0) |
Get integer setting from the application preferences. More... | |
static double | doubleSetting (const QString &, const QString &, const double=0) |
Get double setting from the application preferences. More... | |
static bool | boolSetting (const QString &, const QString &, const bool=0) |
Get boolean setting from the application preferences. More... | |
static QString | stringSetting (const QString &, const QString &, const QString &=QString(""), const bool=true) |
Get string setting from the application preferences. More... | |
static QColor | colorSetting (const QString &, const QString &, const QColor &=QColor()) |
Get color setting from the application preferences. More... | |
static QByteArray | byteArraySetting (const QString &, const QString &, const QByteArray &=QByteArray()) |
Get byte array setting from the application preferences. More... | |
static QFont | fontSetting (const QString &, const QString &, const QFont &=QFont()) |
Get font setting from the application preferences. More... | |
static void | removeSetting (const QString &, const QString &) |
Remove setting from the application preferences. More... | |
static bool | hasSetting (const QString &, const QString &) |
Check setting existence in the application preferences. More... | |
static QStringList | parameters (const QString &) |
Get names of preference items stored within the given section. More... | |
static QStringList | parameters (const QStringList &) |
Get names of preference items stored within the given section. More... | |
static int | addGlobalPreference (const QString &) |
Add global (not module-related) preferences group. More... | |
static int | addPreference (const QString &) |
Add module-related preferences group. More... | |
static int | addPreference (const QString &, const int, const int=PT_Auto, const QString &=QString(), const QString &=QString()) |
Add module-related preferences. More... | |
static QVariant | preferenceProperty (const int, const QString &) |
Get the preferences property. More... | |
static void | setPreferenceProperty (const int, const QString &, const QVariant &) |
Set the preferences property. More... | |
static void | setPreferencePropertyWg (const int, const QString &, UserDefinedContent *) |
Set specific widget as a custom preferences item. More... | |
static void | addPreferenceProperty (const int, const QString &, const int, const QVariant &) |
Add the property value to the list of values. More... | |
static void | message (const QString &, bool=true) |
Put the message to the Log messages output window. More... | |
static void | clearMessages () |
Remove all the messages from the Log messages output window. More... | |
static QList< int > | getViews () |
Get list of integer identifiers of all the currently opened views. More... | |
static int | getActiveView () |
Get integer identifier of the currently active view. More... | |
static QString | getViewType (const int) |
Get type of the specified view, e.g. "OCCViewer". More... | |
static bool | setViewTitle (const int, const QString &) |
Change view caption More... | |
static QString | getViewTitle (const int) |
Get view caption More... | |
static bool | setViewSize (const int, const int, const int=0) |
Set view size. More... | |
static bool | setViewRotationPoint (const double, const double, const double, const int=0) |
Set view rotation point. More... | |
static QList< int > | findViews (const QString &) |
Get list of integer identifiers of all the currently opened views of the specified type. More... | |
static bool | activateView (const int) |
Activate view. More... | |
static bool | activateViewManagerAndView (const int) |
static QWidget * | getViewWidget (const int) |
static int | createView (const QString &, bool visible=true, const int width=0, const int height=0, bool detached=false) |
static int | createView (const QString &, QWidget *) |
Create new view with custom widget embedded and activate it. More... | |
static bool | closeView (const int) |
Close view. More... | |
static int | cloneView (const int) |
Clone view (if this operation is supported for specified view type) More... | |
static void | setViewVisible (const int id, bool visible=true) |
Set view visibility. More... | |
static bool | isViewVisible (const int) |
Check whether view is visible ( i.e. it is on the top of the views stack) More... | |
static void | setViewClosable (const int, const bool) |
Set / clear view's "closable" option. By default any view is closable (i.e. can be closed by the user). More... | |
static bool | isViewClosable (const int) |
Check whether view is closable (i.e. can be closed by the user) More... | |
static bool | groupAllViews () |
Group all views to the single tab area. More... | |
static bool | splitView (const int, const Orientation, const Action) |
Split tab area to which view with identifier belongs to. More... | |
static bool | moveView (const int, const int, const bool) |
Move view with the first identifier to the same area which another view with the second identifier belongs to. More... | |
static QList< int > | neighbourViews (const int) |
Get list of views identifiers that belongs to the same area as specified view (excluding it) More... | |
static void | displayCurve (const int, Plot2d_Curve *) |
Display theCurve in view. More... | |
static void | eraseCurve (const int, Plot2d_Curve *) |
Erase theCurve in view. More... | |
static void | eraseCurve (Plot2d_Curve *) |
static void | updateCurves (const int) |
updateCurves (repaint) curves in view window. More... | |
static QString | getPlot2dTitle (const int, ObjectType=MainTitle) |
Get title of corresponding type. More... | |
static void | setPlot2dTitle (const int, const QString &, ObjectType=MainTitle, bool=true) |
Set title of corresponding type. More... | |
static QList< double > | getPlot2dFitRangeByCurves (const int) |
Get list of Plot2d view ranges. More... | |
static QList< double > | getPlot2dFitRangeCurrent (const int) |
Get list of current Plot2d view ranges. More... | |
static void | setPlot2dFitRange (const int, const double XMin, const double XMax, const double YMin, const double YMax) |
Set range of Plot2d view. More... | |
static void | processEvents () |
Process Qt event loop. More... | |
static void | addStringSetting (const QString &, const QString &, bool=true) |
Add string setting to the application preferences. More... | |
static void | addIntSetting (const QString &, const int, bool=true) |
Add integer setting to the application preferences. More... | |
static void | addBoolSetting (const QString &, const bool, bool=true) |
Add boolean setting to the application preferences. More... | |
static void | addDoubleSetting (const QString &, const double, bool=true) |
Add double setting to the application preferences. More... | |
static void | removeSettings (const QString &) |
Remove setting from the application preferences. More... | |
static QString | getSetting (const QString &) |
Get application setting value (as string represenation). More... | |
static void | removeChild (const QString &=QString()) |
static void | startPyLog (const QString &) |
Start recordind a log of Python commands from embedded console. More... | |
static void | stopPyLog () |
Stop recordind a log of Python commands from embedded console. More... | |
static void | logUserEvent (const QString &) |
Log GUI event. More... | |
static void | logAction (QAction *, const QString &=QString()) |
Log given action. More... | |
static void | setActionLoggingEnabled (bool) |
Enable/disable action logging. More... | |
The class provides utility functions which can be used in the Python to operate with the SALOME GUI.
All the functionality of this class is implemented as static methods, so they can be called with the class name prefixed or via creation of the class instance. For example, next both ways of SalomePyQt class usage are legal:
|
static |
Get action by specified identifier.
References ProcessEvent().
|
static |
Get an action identifier.
References ProcessEvent().
|
static |
Activates SALOME module with the given name.
References ProcessEvent().
|
static |
Activate view.
id | window identifier |
true
if operation is completed successfully and false
otherwise References ProcessEvent().
|
static |
References ProcessEvent().
|
static |
Add boolean setting to the application preferences.
The parameter autoValue is obsolete parameter and currently is not used. This parameter will be removed in future, so try to avoid its usage in your code.
This function is obsolete. Use one of addSetting() instead.
name | setting name (it should be of kind <section:setting> where section is resources section name and setting is setting name) |
value | new setting value |
autoValue | (not used) |
References ProcessVoidEvent(), SUIT_Session::resourceMgr(), SUIT_Session::session(), and QtxResourceMgr::setValue().
|
static |
Add double setting to the application preferences.
The parameter autoValue is obsolete parameter and currently is not used. This parameter will be removed in future, so try to avoid its usage in your code.
This function is obsolete. Use one of addSetting() instead.
name | setting name (it should be of kind <section:setting> where section is resources section name and setting is setting name) |
value | new setting value |
autoValue | (not used) |
References ProcessVoidEvent(), SUIT_Session::resourceMgr(), SUIT_Session::session(), and QtxResourceMgr::setValue().
|
static |
Add global (not module-related) preferences group.
label | global preferences group name |
References ProcessEvent().
|
static |
Add integer setting to the application preferences.
The parameter autoValue is obsolete parameter and currently is not used. This parameter will be removed in future, so try to avoid its usage in your code.
This function is obsolete. Use one of addSetting() instead.
name | setting name (it should be of kind <section:setting> where section is resources section name and setting is setting name) |
value | new setting value |
autoValue | (not used) |
References ProcessVoidEvent(), SUIT_Session::resourceMgr(), SUIT_Session::session(), and QtxResourceMgr::setValue().
|
static |
Add module-related preferences group.
label | preferences group name |
References ProcessEvent().
|
static |
Add module-related preferences.
label | preferences group name |
pId | parent preferences group id |
type | preferences type |
section | resources file section name |
param | resources file setting name |
References ProcessEvent().
|
static |
Add the property value to the list of values.
This method allows creating properties which are QList<QVariant>
id | preferences identifier |
prop | preferences property name |
idx | preferences property index |
var | preferences property value for the index idx |
References LightApp_Module::getApp(), SUIT_PreferenceMgr::itemProperty(), LightApp_Application::preferences(), ProcessVoidEvent(), and SUIT_PreferenceMgr::setItemProperty().
|
static |
Add boolean setting to the application preferences.
section | resources file section name |
name | setting name |
value | new setting value |
dumb | this parameter is used in order to avoid sip compilation error because of conflicting int and bool types |
References ProcessVoidEvent(), SUIT_Session::resourceMgr(), SUIT_Session::session(), and QtxResourceMgr::setValue().
|
static |
Add double setting to the application preferences.
section | resources file section name |
name | setting name |
value | new setting value |
References ProcessVoidEvent(), SUIT_Session::resourceMgr(), SUIT_Session::session(), and QtxResourceMgr::setValue().
|
static |
Add integer setting to the application preferences.
section | resources file section name |
name | setting name |
value | new setting value |
References ProcessVoidEvent(), SUIT_Session::resourceMgr(), SUIT_Session::session(), and QtxResourceMgr::setValue().
|
static |
Add byte array setting to the application preferences.
section | resources file section name |
name | setting name |
value | new setting value |
References ProcessVoidEvent(), SUIT_Session::resourceMgr(), SUIT_Session::session(), and QtxResourceMgr::setValue().
|
static |
Add color setting to the application preferences.
section | resources file section name |
name | setting name |
value | new setting value |
References ProcessVoidEvent(), SUIT_Session::resourceMgr(), SUIT_Session::session(), and QtxResourceMgr::setValue().
|
static |
Add font setting to the application preferences.
section | resources file section name |
name | setting name |
value | new setting value |
References ProcessVoidEvent(), SUIT_Session::resourceMgr(), SUIT_Session::session(), and QtxResourceMgr::setValue().
|
static |
Add string setting to the application preferences.
section | resources file section name |
name | setting name |
value | new setting value |
References ProcessVoidEvent(), SUIT_Session::resourceMgr(), SUIT_Session::session(), and QtxResourceMgr::setValue().
|
static |
Add string setting to the application preferences.
The parameter autoValue is obsolete parameter and currently is not used. This parameter will be removed in future, so try to avoid its usage in your code.
This function is obsolete. Use one of addSetting() instead.
name | setting name (it should be of kind <section:setting> where section is resources section name and setting is setting name) |
value | new setting value |
autoValue | (not used) |
References ProcessVoidEvent(), SUIT_Session::resourceMgr(), SUIT_Session::session(), and QtxResourceMgr::setValue().
|
static |
Get boolean setting from the application preferences.
section | resources file section name |
name | setting name |
def | default value which is returned if the setting is not found |
References ProcessEvent().
|
static |
Get byte array setting from the application preferences.
section | resources file section name |
name | setting name |
def | default value which is returned if the setting is not found |
References ProcessEvent().
|
static |
Remove all the messages from the Log messages output window.
References LogWindow::clear(), getApplication(), and ProcessVoidEvent().
|
static |
Clear given toolbar.
title | toolbar's title |
References SUIT_Application::clearTool(), getApplication(), and ProcessVoidEvent().
|
static |
Clone view (if this operation is supported for specified view type)
id | window identifier |
References ProcessEvent().
|
static |
Close view.
id | window identifier |
true
if operation is completed successfully and false
otherwise References ProcessEvent().
|
static |
Get color setting from the application preferences.
section | resources file section name |
name | setting name |
def | default value which is returned if the setting is not found |
References ProcessEvent().
|
static |
Get constant's value from application's resource manager.
name | name of the constant |
References ProcessEvent().
|
static |
Create an action which can be then used in the menu or toolbar.
id | the unique id action to be registered to |
menuText | action text which should appear in menu |
tipText | text which should appear in the tooltip |
statusText | text which should appear in the status bar when action is activated |
icon | the name of the icon file (the actual icon file name can be coded in the translation files) |
key | the key accelrator for the action |
toggle | if true the action is checkable |
References ProcessEvent().
|
static |
Create an action group which can be then used in the menu or toolbar.
id | : the unique id action group to be registered to |
exclusive | : if true the action group does exclusive toggling |
References ProcessEvent().
|
static |
Insert action to the main menu.
id | action ID |
menu | parent menu ID |
group | menu group ID |
idx | required index in the menu |
References ProcessEvent().
|
static |
Insert action to the main menu.
id | action ID |
menu | parent menu name (list of menu names separated by "|") |
group | menu group ID |
idx | required index in the menu |
References ProcessEvent().
|
static |
Create main menu.
subMenu | menu name |
menu | parent menu ID |
id | required menu ID |
group | menu group ID |
idx | required index in the menu |
References ProcessEvent().
|
static |
Create main menu.
subMenu | menu name |
menu | parent menu name (list of menu names separated by "|") |
id | required menu ID |
group | menu group ID |
idx | required index in the menu |
References ProcessEvent().
|
static |
Insert action to the main menu.
a | action |
menu | parent menu ID |
group | menu group ID |
idx | required index in the menu |
References ProcessEvent().
|
static |
Insert action to the main menu.
a | action |
menu | parent menu name (list of menu names separated by "|") |
group | menu group ID |
idx | required index in the menu |
References ProcessEvent().
|
static |
Create new data object with specified name, icon and tooltip.
name | data object name |
icon | data object icon |
toolTip | data object tooltip |
parent | entry of parent data object |
References ProcessEvent().
|
static |
Create empty data object.
parent | entry of parent data object |
References ProcessEvent().
|
static |
Initialize root data object.
Does nothing if root is already initialized.
References CAM_Module::dataModel(), SALOME_PYQT_DataModelLight::getRoot(), and ProcessVoidEvent().
|
static |
Create separator action which can be used in the menu or toolbar.
References ProcessEvent().
|
static |
Insert action with specified id to the toolbar.
id | action ID |
tBar | toolbar ID |
idx | required index in the toolbar |
References ProcessEvent().
|
static |
Insert action with specified id to the toolbar.
id | action ID |
tBar | toolbar name |
idx | required index in the toolbar |
References ProcessEvent().
|
static |
Create toolbar with specified name.
tBar | toolbar title (language-dependent) |
nBar | toolbar name (language-independent) [optional] |
References ProcessEvent().
|
static |
Insert action to the toolbar.
a | action |
tBar | toolbar ID |
id | required action ID |
idx | required index in the toolbar |
References ProcessEvent().
|
static |
Insert action to the toolbar.
a | action |
tBar | toolbar name |
id | required action ID |
idx | required index in the toolbar |
References ProcessEvent().
|
static |
References ProcessEvent().
|
static |
Create new view with custom widget embedded and activate it.
type | viewer type |
w | custom widget |
References ProcessEvent().
|
static |
Get detault menu group identifier which can be used when creating menus (insert custom menu commands).
References ProcessEvent().
|
static |
disable PyQt_Selector (on module activation, for instance)
References ProcessVoidEvent().
|
static |
Display theCurve in view.
id | window identifier |
theCurve | curve to display |
References ProcessVoidEvent().
|
static |
Get double setting from the application preferences.
section | resources file section name |
name | setting name |
def | default value which is returned if the setting is not found |
References ProcessEvent().
|
static |
Dump the contents of the id view window. If id is 0 then current active view is processed. to the image file in the specified format.
For the current moment JPEG, PNG and BMP images formats are supported. The image format is defined automatically by the file name extension. By default, BMP format is used.
filename | image file name |
true
on success) References ProcessEvent().
|
static |
enable PyQt_Selector (on module activation, for instance)
References ProcessVoidEvent().
|
static |
Erase theCurve in view.
id | window identifier |
theCurve | curve to erase |
References ProcessVoidEvent().
|
static |
References ProcessVoidEvent().
|
static |
Get list of integer identifiers of all the currently opened views of the specified type.
type | viewer type |
References ProcessEvent().
|
static |
Get font setting from the application preferences.
section | resources file section name |
name | setting name |
def | default value which is returned if the setting is not found |
References ProcessEvent().
|
static |
Get the currently active module name (for the current study).
References ProcessEvent().
|
static |
Access to Python module object currently loaded into SALOME_PYQT_ModuleLight container.
References ProcessEvent().
|
static |
Get integer identifier of the currently active view.
References ProcessEvent().
|
static |
|
static |
Get entries of all child data objects of specified data object.
entry | data object entry |
recursive | true for recursive processing |
References ProcessEvent().
|
static |
Get data object color.
entry | data object entry |
References ProcessEvent().
|
static |
|
static |
Get the active application's desktop window.
References ProcessEvent().
|
static |
Show 'Get Directory' dialog box for the directory selection and return a user's choice (selected directory name).
parent | parent widget |
initial | initial directory the dialog box to be opened in |
caption | dialog box title |
References ProcessEvent().
|
static |
Show 'Open/Save file' dialog box for file selection and return a user's choice (selected file name).
parent | parent widget |
initial | initial directory the dialog box to be opened in |
filters | list of files filters (wildcards) |
caption | dialog box title |
open | if true , "Open File" dialog box is shown; otherwise "Save File" dialog box is shown |
References ProcessEvent().
|
static |
Get current application's main frame widget [obsolete].
Main frame widget is an internal widget of the application desktop window (workspace).
References ProcessEvent().
|
static |
Get current application desktop's main menu.
References ProcessEvent().
|
static |
Get data object name.
entry | data object entry |
References ProcessEvent().
|
static |
Get object browser.
References ProcessEvent().
|
static |
Get position of given object in the tree.
theEntry | study ID of the object |
References ProcessEvent().
|
static |
Show 'Open files' dialog box for multiple files selection and return a user's choice (selected file names list).
parent | parent widget |
initial | initial directory the dialog box to be opened in |
filters | list of files filters (wildcards) |
caption | dialog box title |
References ProcessEvent().
|
static |
Get list of Plot2d view ranges.
id | window identifier |
References ProcessEvent().
|
static |
Get list of current Plot2d view ranges.
id | window identifier |
References ProcessEvent().
|
static |
Get title of corresponding type.
id | window identifier |
type | is type of title |
References ProcessEvent().
Get main menu's child popup submenu by its identifier.
This function is obsolete. Use QMenu* SalomePyQt::getPopupMenu( const QString& menu ) instead.
menu | menu identifier |
References Edit, File, Help, Preferences, ProcessEvent(), Tools, View, and Window.
|
static |
Get main menu's child popup submenu by its name.
The function creates menu if it does not exist.
menu | menu name |
References ProcessEvent().
|
static |
References ProcessEvent().
|
static |
Get the selection object for the current study.
Creates a Selection object if it has not been created yet.
References ProcessEvent().
|
static |
Get application setting value (as string represenation).
This function is obsolete. Use stringSetting(), integerSetting(), boolSetting(), stringSetting() or colorSetting() instead.
name | setting name (it should be of kind <section:setting> where section is resources section name and setting is setting name) |
References ProcessEvent().
|
static |
Get data object tooltip.
entry | data object entry |
References ProcessEvent().
|
static |
Get list of integer identifiers of all the currently opened views.
References ProcessEvent().
|
static |
|
static |
Get type of the specified view, e.g. "OCCViewer".
id | window identifier |
References ProcessEvent().
|
static |
References ProcessEvent().
|
static |
Get visibility state for given object.
theEntry | study ID of the object |
References ProcessEvent().
|
static |
Group all views to the single tab area.
true
if operation is completed successfully and false
otherwise References ProcessEvent().
|
static |
Check setting existence in the application preferences.
section | resources file section name |
name | setting name |
true
if setting exists References ProcessEvent().
|
static |
Open external browser to display context help information.
Current implementation does nothing.
source | documentation (HTML) file name |
context | context (for example, HTML ancor name) |
References getApplication(), and ProcessVoidEvent().
|
static |
Remove notification with given id from the application's desktop.
id | notification id |
References ProcessVoidEvent().
|
static |
Remove notification with given message text from the application's desktop.
msg | message text |
References ProcessVoidEvent().
|
static |
Insert action button into the Help panel.
action | Action being added |
groupId | Parent group's identifier (defaults to -1 for top-level group) |
References action(), and ProcessEvent().
|
static |
Create a (sub-)group in the Help panel.
text | Group title |
groupId | Parent group's identifier (defaults to -1 for top-level group) |
References ProcessEvent().
|
static |
Insert left-aligned text label into the Help panel.
text | Label text |
groupId | Parent group's identifier (defaults to -1 for top-level group) |
References ProcessEvent().
|
static |
Insert text label into the Help panel.
text | Label text |
alignment | Alignment flag for text label |
groupId | Parent group's identifier (defaults to -1 for top-level group) |
References ProcessEvent().
|
static |
Clear Help panel's contents.
groupId | Group's identifier (default is -1, to clear whole panel) |
References QtxInfoPanel::clear(), getApplication(), and ProcessVoidEvent().
|
static |
Remove item from the Help panel.
id | Item's (label's, action's, group's, ...) identifier |
References getApplication(), ProcessVoidEvent(), and QtxInfoPanel::remove().
|
static |
Enable/disable item in the Help panel.
id | Item's (label's, action's, group's, ...) identifier |
enabled | Enabled state |
References getApplication(), ProcessVoidEvent(), and QtxInfoPanel::setEnabled().
|
static |
Set the title to the Help panel.
title | Title text (empty string removes title) |
References getApplication(), ProcessVoidEvent(), and QtxInfoPanel::setTitle().
|
static |
Set item's visibility in the Help panel.
id | Item's (label's, action's, group's, ...) identifier |
visible | Visibility flag |
References getApplication(), ProcessVoidEvent(), and QtxInfoPanel::setVisible().
|
static |
Get integer setting from the application preferences.
section | resources file section name |
name | setting name |
def | default value which is returned if the setting is not found |
References ProcessEvent().
|
static |
Check if SALOME GUI is running in "light" mode.
true
if this is a "light" application; false
otherwise References getAppName().
|
static |
References ProcessEvent().
|
static |
Check whether view is closable (i.e. can be closed by the user)
id | window identifier |
true
if view is closable or false
otherwise References ProcessEvent().
|
static |
Check whether view is visible ( i.e. it is on the top of the views stack)
id | window identifier |
true
if view is visible and false
otherwise References ProcessEvent().
|
static |
Load an icon from the module resources by the specified file name.
fileName | icon file name |
References ProcessEvent().
|
static |
Log given action.
action | GUI action being logged. |
moduleName | optional name of module, owning an action |
References action(), CAM_Application::logAction(), and ProcessVoidEvent().
|
static |
Log GUI event.
eventDescription | GUI event description. |
References CAM_Application::logUserEvent(), and ProcessVoidEvent().
|
static |
Put the message to the Log messages output window.
msg | message text (it can be of simple rich text format) |
addSeparator | boolean flag which specifies if it is necessary to separate the message with predefined separator |
References getApplication(), ProcessVoidEvent(), and LogWindow::putMessage().
|
static |
Move view with the first identifier to the same area which another view with the second identifier belongs to.
id | source window identifier |
id_to | destination window identifier param before specifies whether the first viewt has to be moved before or after the second view |
true
if operation is completed successfully and false
otherwise References ProcessEvent().
|
static |
Get list of views identifiers that belongs to the same area as specified view (excluding it)
id | window identifier |
References ProcessEvent().
|
static |
Get names of preference items stored within the given section.
section | resources file section's name |
list
of preferences items References ProcessEvent().
|
static |
Get names of preference items stored within the given section.
section | resources file section's name |
list
of preferences items References ProcessEvent().
|
static |
Get the preferences property.
id | preferences identifier |
prop | preferences property name |
References ProcessEvent().
|
static |
Process Qt event loop.
|
static |
Put an information message to the current application's desktop status bar.
Optional second delay parameter (sec) can be used to specify time of the message diplaying in seconds. If this parameter is less or equal to zero, the constant message will be put.
msg | message text |
sec | message displaying time in seconds |
References ProcessVoidEvent().
|
static |
Registers module in the study tree.
References getApplication(), and ProcessVoidEvent().
|
static |
References removeChildren().
|
static |
Remove all child data objects from specified data object.
entry | data object entry |
References ProcessVoidEvent().
|
static |
|
static |
Remove setting from the application preferences.
section | resources file section name |
name | setting name |
References ProcessVoidEvent(), QtxResourceMgr::remove(), SUIT_Session::resourceMgr(), and SUIT_Session::session().
|
static |
Remove setting from the application preferences.
This function is obsolete. Use removeSetting() instead.
name | setting name (it should be of kind <section:setting> where section is resources section name and setting is setting name) |
References ProcessVoidEvent(), QtxResourceMgr::remove(), SUIT_Session::resourceMgr(), and SUIT_Session::session().
|
static |
Enable/disable action logging.
References ProcessVoidEvent(), and CAM_Module::setActionLoggingEnabled().
|
static |
Set data object color.
entry | data object entry |
color | data object color |
References OCCViewer::color(), and ProcessVoidEvent().
|
static |
Add constant to the application's resource manager.
This function is useful to specify programmatically specific variables that are referenced in the resource setting.
For example, some resource value can be set as "$(myroot)/data/files". Then, "mypath" constant can be set programmatically by the application depending on run-time requirements.
section | resources file section name |
name | name of the constant |
value | value of the constant |
References ProcessVoidEvent(), SUIT_Session::resourceMgr(), SUIT_Session::session(), and QtxResourceMgr::setConstant().
|
static |
Set data object icon.
entry | data object entry |
icon | data object icon file name (icon is loaded from module resources) |
References ProcessVoidEvent().
|
static |
Sets the modification status of the data model for the currently active Python module. This method should be used by the Python code in order to enable/disable "Save" operation depending on the module's data state.
New | modification status of the data model |
References CAM_Module::dataModel(), LightApp_Module::getApp(), ProcessVoidEvent(), SALOME_PYQT_DataModelLight::setModified(), and LightApp_Application::updateActions().
|
static |
Set data object name.
entry | data object entry |
name | data object name |
References ProcessVoidEvent().
|
static |
Set position of given object in the tree.
theEntry | study ID of the object |
thePos | position |
References ProcessVoidEvent(), and SALOME_PYQT_ModuleLight::setObjectPosition().
|
static |
Set range of Plot2d view.
id | window identifier |
XMin | |
XMax | |
YMin | |
YMax |
References ProcessVoidEvent().
|
static |
Set title of corresponding type.
id | window identifier |
title | |
type | is type of title |
show |
References ProcessVoidEvent().
|
static |
Set the preferences property.
id | preferences identifier |
prop | preferences property name |
var | preferences property value |
References LightApp_Module::getApp(), LightApp_Application::preferences(), ProcessVoidEvent(), and SUIT_PreferenceMgr::setItemProperty().
|
static |
Set specific widget as a custom preferences item.
id | preferences identifier |
prop | preferences property name |
widget | custom widget |
References LightApp_Module::getApp(), LightApp_Application::preferences(), ProcessVoidEvent(), and SUIT_PreferenceMgr::setItemProperty().
|
static |
Set reference to another data object.
entry | data object entry |
refEntry | referenced data object entry |
References ProcessVoidEvent().
|
static |
Send local selection for notification.
The list of locally selected objects (study entries) is sent for notification of other listening entities (modules, viewers...).
References ProcessVoidEvent().
|
static |
Set data object tooltip.
entry | data object entry |
toolTip | data object tooltip |
References ProcessVoidEvent().
|
static |
Set / clear view's "closable" option. By default any view is closable (i.e. can be closed by the user).
id | window identifier |
on | new "closable" option's value |
References ProcessVoidEvent(), and SUIT_ViewWindow::setClosable().
|
static |
Set view rotation point.
x | coordinate X view rotation point |
y | coordinate Y view rotation point |
z | coordinate Z view rotation point |
id | window identifier |
true
if operation is completed successfully and false
otherwise References ProcessEvent().
|
static |
Set view size.
w | window width |
h | window height |
id | window identifier |
true
if operation is completed successfully and false
otherwise References ProcessEvent().
|
static |
Change view caption
id | window identifier |
title | new window title |
true
if operation is completed successfully and false
otherwise References ProcessEvent().
|
static |
Set view visibility.
id | window identifier |
visible | new visiblity |
References ProcessVoidEvent(), and SUIT_ViewWindow::setVisible().
|
static |
Set visibility state for given object.
theEntry | study ID of the object |
theState | visibility state |
References getActiveStudy(), ProcessVoidEvent(), and LightApp_Study::setVisibilityState().
|
static |
Show notification in the application's desktop window.
Optional third delay parameter (sec) can be used to specify time of the notification diplaying in seconds. If this parameter is less or equal to zero, the permanent notification will be put.
Notification can be forcibly hidden via hideNotification() method.
msg | message text |
title | title text |
sec | notification displaying time in seconds |
References ProcessEvent().
|
static |
Split tab area to which view with identifier belongs to.
id | window identifier |
ori | orientation of split operation |
action | action to be performed |
true
if operation is completed successfully false
otherwise References action(), and ProcessEvent().
|
static |
Start recordind a log of Python commands from embedded console.
theFileName | output lof file name |
References getApplication(), ProcessVoidEvent(), and LightApp_Application::pythonConsole().
|
static |
Stop recordind a log of Python commands from embedded console.
References getApplication(), ProcessVoidEvent(), and LightApp_Application::pythonConsole().
|
static |
Get string setting from the application preferences.
section | resources file section name |
name | setting name |
def | default value which is returned if the setting is not found |
subst | true to make substitution, false to get "raw" value |
References ProcessEvent().
|
static |
updateCurves (repaint) curves in view window.
References Plot2d_ViewFrame::DisplayAll(), Plot2d_ViewWindow::getViewFrame(), and ProcessVoidEvent().
|
static |
Update an Object Browser of the study.
References SUIT_Application::activeStudy(), SUIT_Session::applications(), getActiveStudy(), ProcessVoidEvent(), SUIT_Session::session(), and LightApp_Application::updateObjectBrowser().