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 QWidget * | getDesktop () |
| Get the active application's desktop window. | |
| static QWidget * | getMainFrame () |
| Get current application's main frame widget [obsolete]. | |
| static QMenuBar * | getMainMenuBar () |
| Get current application desktop's main menu. | |
| static QMenu * | getPopupMenu (const MenuName) |
| Get main menu's child popup submenu by its identifier. | |
| static QMenu * | getPopupMenu (const QString &) |
| Get main menu's child popup submenu by its name. | |
| static QTreeView * | getObjectBrowser () |
| Get object browser. | |
| static SALOME_Selection * | getSelection () |
| Get the selection object for the current study. | |
| static int | getStudyId () |
| Get active study's identifier. | |
| static void | putInfo (const QString &, const int=0) |
| Put an information message to the current application's desktop status bar. | |
| static const QString | getActiveComponent () |
| Get the currently active module name (for the current study). | |
| static void | updateObjBrowser (const int=0, bool=true) |
| Update an Object Browser of the specified (by identifier) study. | |
| 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). | |
| 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). | |
| 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). | |
| static QString | createObject (const QString &parent=QString("")) |
| static QString | createObject (const QString &name, const QString &iconname, const QString &tooltip, const QString &parent=QString("")) |
| static void | removeObject (const QString &obj) |
| static void | removeChild (const QString &obj=QString("")) |
| static QStringList | getChildren (const QString &obj=QString(""), const bool rec=false) |
| static void | setName (const QString &obj, const QString &name) |
| static void | setIcon (const QString &obj, const QString &iconname) |
| static void | setToolTip (const QString &obj, const QString &tooltip) |
| static QString | getName (const QString &obj) |
| static QString | getToolTip (const QString &obj) |
| static QIcon | loadIcon (const QString &, const QString &) |
| Load an icon from the module resources by the specified file name. | |
| static void | helpContext (const QString &, const QString &) |
| Open external browser to display context help information. | |
| static bool | dumpView (const QString &) |
| Dump the contents of the currently active view window to the image file in the specified format. | |
| static int | defaultMenuGroup () |
| Get detault menu group identifier which can be used when creating menus (insert custom menu commands). | |
| static int | createTool (const QString &) |
| Create toolbar with specified name. | |
| static int | createTool (const int, const int, const int=-1) |
| Insert action with specified id to the toolbar. | |
| static int | createTool (const int, const QString &, const int=-1) |
| Insert action with specified id to the toolbar. | |
| static int | createTool (QAction *, const int, const int=-1, const int=-1) |
| Insert action to the toolbar. | |
| static int | createTool (QAction *, const QString &, const int=-1, const int=-1) |
| Insert action to the toolbar. | |
| static int | createMenu (const QString &, const int=-1, const int=-1, const int=-1, const int=-1) |
| Create main menu. | |
| static int | createMenu (const QString &, const QString &=QString(), const int=-1, const int=-1, const int=-1) |
| Create main menu. | |
| static int | createMenu (const int, const int=-1, const int=-1, const int=-1) |
| Insert action to the main menu. | |
| static int | createMenu (const int, const QString &=QString(), const int=-1, const int=-1) |
| Insert action to the main menu. | |
| static int | createMenu (QAction *, const int, const int=-1, const int=-1, const int=-1) |
| Insert action to the main menu. | |
| static int | createMenu (QAction *, const QString &, const int=-1, const int=-1, const int=-1) |
| Insert action to the main menu. | |
| static QAction * | createSeparator () |
| Create separator action which can be used in the menu or toolbar. | |
| 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. | |
| static QtxActionGroup * | createActionGroup (const int, const bool=true) |
| Create an action group which can be then used in the menu or toolbar. | |
| static QAction * | action (const int) |
| Get action by specified identifier. | |
| static int | actionId (const QAction *) |
| Get an action identifier. | |
| static void | addSetting (const QString &, const QString &, const double) |
| Add double setting to the application preferences. | |
| static void | addSetting (const QString &, const QString &, const int) |
| Add integer setting to the application preferences. | |
| static void | addSetting (const QString &, const QString &, const bool, const int) |
| Add boolean setting to the application preferences. | |
| static void | addSetting (const QString &, const QString &, const QString &) |
| Add string setting to the application preferences. | |
| static void | addSetting (const QString &, const QString &, const QColor &) |
| Add color setting to the application preferences. | |
| static int | integerSetting (const QString &, const QString &, const int=0) |
| Get integer setting from the application preferences. | |
| static double | doubleSetting (const QString &, const QString &, const double=0) |
| Get double setting from the application preferences. | |
| static bool | boolSetting (const QString &, const QString &, const bool=0) |
| Get boolean setting from the application preferences. | |
| static QString | stringSetting (const QString &, const QString &, const QString &=QString("")) |
| Get string setting from the application preferences. | |
| static QColor | colorSetting (const QString &, const QString &, const QColor &=QColor()) |
| Get color setting from the application preferences. | |
| static void | removeSetting (const QString &, const QString &) |
| Remove setting from the application preferences. | |
| static bool | hasSetting (const QString &, const QString &) |
| Check setting existence in the application preferences. | |
| static void | addStringSetting (const QString &, const QString &, bool=true) |
| Add string setting to the application preferences. | |
| static void | addIntSetting (const QString &, const int, bool=true) |
| Add integer setting to the application preferences. | |
| static void | addBoolSetting (const QString &, const bool, bool=true) |
| Add boolean setting to the application preferences. | |
| static void | addDoubleSetting (const QString &, const double, bool=true) |
| Add double setting to the application preferences. | |
| static void | removeSettings (const QString &) |
| Remove setting from the application preferences. | |
| static QString | getSetting (const QString &) |
| Get application setting value (as string represenation). | |
| static int | addGlobalPreference (const QString &) |
| Add global (not module-related) preferences group. | |
| static int | addPreference (const QString &) |
| Add module-related preferences group. | |
| static int | addPreference (const QString &, const int, const int=PT_Auto, const QString &=QString(), const QString &=QString()) |
| Add module-related preferences. | |
| static QVariant | preferenceProperty (const int, const QString &) |
| Get the preferences property. | |
| static void | setPreferenceProperty (const int, const QString &, const QVariant &) |
| Set the preferences property. | |
| static void | addPreferenceProperty (const int, const QString &, const int, const QVariant &) |
| Add the property value to the list of values. | |
| static void | message (const QString &, bool=true) |
| Put the message to the Log messages output window. | |
| static void | clearMessages () |
| Remove all the messages from the Log messages output window. | |
| static QList< int > | getViews () |
| Get list of integer identifiers of all the currently opened views. | |
| static int | getActiveView () |
| Get integer identifier of the currently active view. | |
| static QString | getViewType (const int) |
| Get type of the specified view, e.g. "OCCViewer". | |
| static bool | setViewTitle (const int, const QString &) |
| Change view caption. | |
| static QString | getViewTitle (const int) |
| Get view caption. | |
| static QList< int > | findViews (const QString &) |
| Get list of integer identifiers of all the currently opened views of the specified type. | |
| static bool | activateView (const int) |
| Activate view. | |
| static int | createView (const QString &) |
| Create new view and activate it. | |
| static int | createView (const QString &, QWidget *) |
| Create new view with custom widget embedded and activate it. | |
| static bool | closeView (const int) |
| Close view. | |
| static int | cloneView (const int) |
| Clone view (if this operation is supported for specified view type) | |
| static bool | isViewVisible (const int) |
| Check whether view is visible ( i.e. it is on the top of the views stack) | |
| 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). | |
| static bool | isViewClosable (const int) |
| Check whether view is closable (i.e. can be closed by the user) | |
| static bool | groupAllViews () |
| Group all views to the single tab area. | |
| static bool | splitView (const int, const Orientation, const Action) |
| Split tab area to which view with identifier belongs to. | |
| 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. | |
| static QList< int > | neighbourViews (const int) |
| Get list of views identifiers that belongs to the same area as specified view (excluding it) | |
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:
from SalomePyQt import * sg = SalomePyQt() # using SalomePyQt class instance desktop = sg.getDesktop() # using SalomePyQt class directly menubar = SalomePyQt.getMainMenuBar()
| QWidget * SalomePyQt::getDesktop | ( | ) | [static] |
References ProcessEvent().
| QWidget * SalomePyQt::getMainFrame | ( | ) | [static] |
Main frame widget is an internal widget of the application desktop window (workspace).
References ProcessEvent().
| QMenuBar * SalomePyQt::getMainMenuBar | ( | ) | [static] |
References ProcessEvent().
This function is obsolete. Use QMenu* SalomePyQt.getPopupMenu( const QString& menu ) instead.
| menu | menu identifier |
References Edit, File, getMenuName(), Help, Preferences, ProcessEvent(), Tools, View, and Window.
| QMenu * SalomePyQt::getPopupMenu | ( | const QString & | menu | ) | [static] |
The function creates menu if it does not exist.
| menu | menu name |
References ProcessEvent().
| QTreeView * SalomePyQt::getObjectBrowser | ( | ) | [static] |
References ProcessEvent().
| SALOME_Selection * SalomePyQt::getSelection | ( | ) | [static] |
Creates a Selection object if it has not been created yet.
References ProcessEvent().
| int SalomePyQt::getStudyId | ( | ) | [static] |
References ProcessEvent().
| void SalomePyQt::putInfo | ( | const QString & | msg, |
| const int | sec = 0 |
||
| ) | [static] |
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().
| const QString SalomePyQt::getActiveComponent | ( | ) | [static] |
References ProcessEvent().
| void SalomePyQt::updateObjBrowser | ( | const int | studyId = 0, |
| bool | updateSelection = true |
||
| ) | [static] |
If studyId <= 0 the active study's object browser is updated. The updateSelection parameter is obsolete and currently is not used. This parameter will be removed in future, so try to avoid its usage in your code.
studyId study identifier updateSelection update selection flag (not used)
References SUIT_Application.activeStudy(), SUIT_Session.applications(), getActiveStudy(), SUIT_Study.id(), PyInterp.myStudyId, ProcessVoidEvent(), SUIT_Session.session(), and LightApp_Application.updateObjectBrowser().
| QString SalomePyQt::getFileName | ( | QWidget * | parent, |
| const QString & | initial, | ||
| const QStringList & | filters, | ||
| const QString & | caption, | ||
| bool | open | ||
| ) | [static] |
| 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().
| QStringList SalomePyQt::getOpenFileNames | ( | QWidget * | parent, |
| const QString & | initial, | ||
| const QStringList & | filters, | ||
| const QString & | caption | ||
| ) | [static] |
| 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().
| QString SalomePyQt::getExistingDirectory | ( | QWidget * | parent, |
| const QString & | initial, | ||
| const QString & | caption | ||
| ) | [static] |
| parent | parent widget |
| initial | initial directory the dialog box to be opened in |
| caption | dialog box title |
References ProcessEvent().
| QString SalomePyQt::createObject | ( | const QString & | parent = QString("") | ) | [static] |
References ProcessEvent().
| QString SalomePyQt::createObject | ( | const QString & | name, |
| const QString & | iconname, | ||
| const QString & | tooltip, | ||
| const QString & | parent = QString("") |
||
| ) | [static] |
References ProcessEvent().
| void SalomePyQt::removeObject | ( | const QString & | obj | ) | [static] |
References ProcessVoidEvent().
| void SalomePyQt::removeChild | ( | const QString & | obj = QString("") | ) | [static] |
References ProcessVoidEvent().
| QStringList SalomePyQt::getChildren | ( | const QString & | obj = QString(""), |
| const bool | rec = false |
||
| ) | [static] |
References ProcessEvent().
| void SalomePyQt::setName | ( | const QString & | obj, |
| const QString & | name | ||
| ) | [static] |
References ProcessVoidEvent().
| void SalomePyQt::setIcon | ( | const QString & | obj, |
| const QString & | iconname | ||
| ) | [static] |
References ProcessVoidEvent().
| void SalomePyQt::setToolTip | ( | const QString & | obj, |
| const QString & | tooltip | ||
| ) | [static] |
References ProcessVoidEvent().
| QString SalomePyQt::getName | ( | const QString & | obj | ) | [static] |
References ProcessEvent().
| QString SalomePyQt::getToolTip | ( | const QString & | obj | ) | [static] |
References ProcessEvent().
| QIcon SalomePyQt::loadIcon | ( | const QString & | module, |
| const QString & | filename | ||
| ) | [static] |
| void SalomePyQt::helpContext | ( | const QString & | source, |
| const QString & | context | ||
| ) | [static] |
Current implementation does nothing.
| source | documentation (HTML) file name |
| context | context (for example, HTML ancor name) |
References getApplication(), and ProcessVoidEvent().
| bool SalomePyQt::dumpView | ( | const QString & | filename | ) | [static] |
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().
| int SalomePyQt::defaultMenuGroup | ( | ) | [static] |
References ProcessEvent().
| int SalomePyQt::createTool | ( | const QString & | tBar | ) | [static] |
| tBar | toolbar name |
References ProcessEvent().
| int SalomePyQt::createTool | ( | const int | id, |
| const int | tBar, | ||
| const int | idx = -1 |
||
| ) | [static] |
| id | action ID |
| tBar | toolbar ID |
| idx | required index in the toolbar |
References ProcessEvent().
| int SalomePyQt::createTool | ( | const int | id, |
| const QString & | tBar, | ||
| const int | idx = -1 |
||
| ) | [static] |
| id | action ID |
| tBar | toolbar name |
| idx | required index in the toolbar |
References ProcessEvent().
| int SalomePyQt::createTool | ( | QAction * | a, |
| const int | tBar, | ||
| const int | id = -1, |
||
| const int | idx = -1 |
||
| ) | [static] |
| a | action |
| tBar | toolbar ID |
| id | required action ID |
| idx | required index in the toolbar |
References ProcessEvent().
| int SalomePyQt::createTool | ( | QAction * | a, |
| const QString & | tBar, | ||
| const int | id = -1, |
||
| const int | idx = -1 |
||
| ) | [static] |
| a | action |
| tBar | toolbar name |
| id | required action ID |
| idx | required index in the toolbar |
References ProcessEvent().
| int SalomePyQt::createMenu | ( | const QString & | subMenu, |
| const int | menu = -1, |
||
| const int | id = -1, |
||
| const int | group = -1, |
||
| const int | idx = -1 |
||
| ) | [static] |
| subMenu | menu name |
| menu | parent menu ID |
| id | required menu ID |
| group | menu group ID |
| idx | required index in the menu |
References ProcessEvent().
| int SalomePyQt::createMenu | ( | const QString & | subMenu, |
| const QString & | menu = QString(), |
||
| const int | id = -1, |
||
| const int | group = -1, |
||
| const int | idx = -1 |
||
| ) | [static] |
| 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().
| int SalomePyQt::createMenu | ( | const int | id, |
| const int | menu = -1, |
||
| const int | group = -1, |
||
| const int | idx = -1 |
||
| ) | [static] |
| id | action ID |
| menu | parent menu ID |
| group | menu group ID |
| idx | required index in the menu |
References ProcessEvent().
| int SalomePyQt::createMenu | ( | const int | id, |
| const QString & | menu = QString(), |
||
| const int | group = -1, |
||
| const int | idx = -1 |
||
| ) | [static] |
| 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().
| int SalomePyQt::createMenu | ( | QAction * | a, |
| const int | menu, | ||
| const int | id = -1, |
||
| const int | group = -1, |
||
| const int | idx = -1 |
||
| ) | [static] |
| a | action |
| menu | parent menu ID |
| group | menu group ID |
| idx | required index in the menu |
References ProcessEvent().
| int SalomePyQt::createMenu | ( | QAction * | a, |
| const QString & | menu, | ||
| const int | id = -1, |
||
| const int | group = -1, |
||
| const int | idx = -1 |
||
| ) | [static] |
| a | action |
| menu | parent menu name (list of menu names separated by "|") |
| group | menu group ID |
| idx | required index in the menu |
References ProcessEvent().
| QAction * SalomePyQt::createSeparator | ( | ) | [static] |
References ProcessEvent().
| QAction * SalomePyQt::createAction | ( | const int | id, |
| const QString & | menuText, | ||
| const QString & | tipText = QString(), |
||
| const QString & | statusText = QString(), |
||
| const QString & | icon = QString(), |
||
| const int | key = 0, |
||
| const bool | toggle = false |
||
| ) | [static] |
| 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().
| QtxActionGroup * SalomePyQt::createActionGroup | ( | const int | id, |
| const bool | exclusive = true |
||
| ) | [static] |
| id | : the unique id action group to be registered to |
| exclusive | : if true the action group does exclusive toggling |
References ProcessEvent().
| QAction * SalomePyQt::action | ( | const int | id | ) | [static] |
References ProcessEvent().
| int SalomePyQt::actionId | ( | const QAction * | a | ) | [static] |
References ProcessEvent().
| void SalomePyQt::addSetting | ( | const QString & | section, |
| const QString & | name, | ||
| const double | value | ||
| ) | [static] |
| section | resources file section name |
| name | setting name |
| value | new setting value |
References ProcessVoidEvent(), SUIT_Session.resourceMgr(), SUIT_Session.session(), and QtxResourceMgr.setValue().
| void SalomePyQt::addSetting | ( | const QString & | section, |
| const QString & | name, | ||
| const int | value | ||
| ) | [static] |
| section | resources file section name |
| name | setting name |
| value | new setting value |
References ProcessVoidEvent(), SUIT_Session.resourceMgr(), SUIT_Session.session(), and QtxResourceMgr.setValue().
| void SalomePyQt::addSetting | ( | const QString & | section, |
| const QString & | name, | ||
| const bool | value, | ||
| const int | |||
| ) | [static] |
| 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().
| void SalomePyQt::addSetting | ( | const QString & | section, |
| const QString & | name, | ||
| const QString & | value | ||
| ) | [static] |
| section | resources file section name |
| name | setting name |
| value | new setting value |
References ProcessVoidEvent(), SUIT_Session.resourceMgr(), SUIT_Session.session(), and QtxResourceMgr.setValue().
| void SalomePyQt::addSetting | ( | const QString & | section, |
| const QString & | name, | ||
| const QColor & | value | ||
| ) | [static] |
| section | resources file section name |
| name | setting name |
| value | new setting value |
References ProcessVoidEvent(), SUIT_Session.resourceMgr(), SUIT_Session.session(), and QtxResourceMgr.setValue().
| int SalomePyQt::integerSetting | ( | const QString & | section, |
| const QString & | name, | ||
| const int | def = 0 |
||
| ) | [static] |
| section | resources file section name |
| name | setting name |
| def | default value which is returned if the setting is not found |
References ProcessEvent().
| double SalomePyQt::doubleSetting | ( | const QString & | section, |
| const QString & | name, | ||
| const double | def = 0 |
||
| ) | [static] |
| section | resources file section name |
| name | setting name |
| def | default value which is returned if the setting is not found |
References ProcessEvent().
| bool SalomePyQt::boolSetting | ( | const QString & | section, |
| const QString & | name, | ||
| const bool | def = 0 |
||
| ) | [static] |
| section | resources file section name |
| name | setting name |
| def | default value which is returned if the setting is not found |
References ProcessEvent().
| QString SalomePyQt::stringSetting | ( | const QString & | section, |
| const QString & | name, | ||
| const QString & | def = QString("") |
||
| ) | [static] |
| section | resources file section name |
| name | setting name |
| def | default value which is returned if the setting is not found |
References ProcessEvent().
| QColor SalomePyQt::colorSetting | ( | const QString & | section, |
| const QString & | name, | ||
| const QColor & | def = QColor() |
||
| ) | [static] |
| section | resources file section name |
| name | setting name |
| def | default value which is returned if the setting is not found |
References ProcessEvent().
| void SalomePyQt::removeSetting | ( | const QString & | section, |
| const QString & | name | ||
| ) | [static] |
| section | resources file section name |
| name | setting name |
References ProcessVoidEvent(), QtxResourceMgr.remove(), SUIT_Session.resourceMgr(), and SUIT_Session.session().
| bool SalomePyQt::hasSetting | ( | const QString & | section, |
| const QString & | name | ||
| ) | [static] |
| section | resources file section name |
| name | setting name |
true if setting exists References ProcessEvent().
| void SalomePyQt::addStringSetting | ( | const QString & | name, |
| const QString & | value, | ||
| bool | autoValue = true |
||
| ) | [static] |
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 DEFAULT_SECTION, ProcessVoidEvent(), SUIT_Session.resourceMgr(), SUIT_Session.session(), and QtxResourceMgr.setValue().
| void SalomePyQt::addIntSetting | ( | const QString & | name, |
| const int | value, | ||
| bool | autoValue = true |
||
| ) | [static] |
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 DEFAULT_SECTION, ProcessVoidEvent(), SUIT_Session.resourceMgr(), SUIT_Session.session(), and QtxResourceMgr.setValue().
| void SalomePyQt::addBoolSetting | ( | const QString & | name, |
| const bool | value, | ||
| bool | autoValue = true |
||
| ) | [static] |
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 DEFAULT_SECTION, ProcessVoidEvent(), SUIT_Session.resourceMgr(), SUIT_Session.session(), and QtxResourceMgr.setValue().
| void SalomePyQt::addDoubleSetting | ( | const QString & | name, |
| const double | value, | ||
| bool | autoValue = true |
||
| ) | [static] |
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 DEFAULT_SECTION, ProcessVoidEvent(), SUIT_Session.resourceMgr(), SUIT_Session.session(), and QtxResourceMgr.setValue().
| void SalomePyQt::removeSettings | ( | const QString & | name | ) | [static] |
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 DEFAULT_SECTION, ProcessVoidEvent(), QtxResourceMgr.remove(), SUIT_Session.resourceMgr(), and SUIT_Session.session().
| QString SalomePyQt::getSetting | ( | const QString & | name | ) | [static] |
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().
| int SalomePyQt::addGlobalPreference | ( | const QString & | label | ) | [static] |
| label | global preferences group name |
References ProcessEvent().
| int SalomePyQt::addPreference | ( | const QString & | label | ) | [static] |
| label | preferences group name |
References ProcessEvent().
| int SalomePyQt::addPreference | ( | const QString & | label, |
| const int | pId, | ||
| const int | type = PT_Auto, |
||
| const QString & | section = QString(), |
||
| const QString & | param = QString() |
||
| ) | [static] |
| label | preferences group name |
| pId | parent preferences group id |
| type | preferences type |
| section | resources file section name |
| param | resources file setting name |
References ProcessEvent().
| QVariant SalomePyQt::preferenceProperty | ( | const int | id, |
| const QString & | prop | ||
| ) | [static] |
| id | preferences identifier |
| prop | preferences property name |
References ProcessEvent().
| void SalomePyQt::setPreferenceProperty | ( | const int | id, |
| const QString & | prop, | ||
| const QVariant & | var | ||
| ) | [static] |
| id | preferences identifier |
| prop | preferences property name |
| var | preferences property value |
References getActiveModule(), ProcessVoidEvent(), and SALOME_PYQT_ModuleLight.setPreferenceProperty().
| void SalomePyQt::addPreferenceProperty | ( | const int | id, |
| const QString & | prop, | ||
| const int | idx, | ||
| const QVariant & | var | ||
| ) | [static] |
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 getActiveModule(), SALOME_PYQT_ModuleLight.preferenceProperty(), ProcessVoidEvent(), and SALOME_PYQT_ModuleLight.setPreferenceProperty().
| void SalomePyQt::message | ( | const QString & | msg, |
| bool | addSeparator = true |
||
| ) | [static] |
| 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().
| void SalomePyQt::clearMessages | ( | ) | [static] |
References LogWindow.clear(), getApplication(), and ProcessVoidEvent().
| QList< int > SalomePyQt::getViews | ( | ) | [static] |
References ProcessEvent().
| int SalomePyQt::getActiveView | ( | ) | [static] |
References ProcessEvent().
| QString SalomePyQt::getViewType | ( | const int | id | ) | [static] |
| bool SalomePyQt::setViewTitle | ( | const int | id, |
| const QString & | title | ||
| ) | [static] |
| id | window identifier |
| title | new window title |
true if operation is completed successfully and false otherwise References ProcessEvent().
| QString SalomePyQt::getViewTitle | ( | const int | id | ) | [static] |
| QList< int > SalomePyQt::findViews | ( | const QString & | type | ) | [static] |
| bool SalomePyQt::activateView | ( | const int | id | ) | [static] |
| id | window identifier |
true if operation is completed successfully and false otherwise References ProcessEvent().
| int SalomePyQt::createView | ( | const QString & | type | ) | [static] |
| type | viewer type |
References ProcessEvent().
| int SalomePyQt::createView | ( | const QString & | type, |
| QWidget * | w | ||
| ) | [static] |
| type | viewer type |
| w | custom widget |
References ProcessEvent().
| bool SalomePyQt::closeView | ( | const int | id | ) | [static] |
| id | window identifier |
true if operation is completed successfully and false otherwise References ProcessEvent().
| int SalomePyQt::cloneView | ( | const int | id | ) | [static] |
| id | window identifier |
References ProcessEvent().
| bool SalomePyQt::isViewVisible | ( | const int | id | ) | [static] |
| id | window identifier |
true if view is visible and false otherwise References ProcessEvent().
| void SalomePyQt::setViewClosable | ( | const int | id, |
| const bool | on | ||
| ) | [static] |
| id | window identifier |
| on | new "closable" option's value |
References getWnd(), ProcessVoidEvent(), and SUIT_ViewWindow.setClosable().
| bool SalomePyQt::isViewClosable | ( | const int | id | ) | [static] |
| id | window identifier |
true if view is closable or false otherwise References ProcessEvent().
| bool SalomePyQt::groupAllViews | ( | ) | [static] |
true if operation is completed successfully and false otherwise References ProcessEvent().
| bool SalomePyQt::splitView | ( | const int | id, |
| const Orientation | ori, | ||
| const Action | action | ||
| ) | [static] |
| id | window identifier |
| ori | orientation of split operation |
| action | action to be performed |
true if operation is completed successfully false otherwise References ProcessEvent().
| bool SalomePyQt::moveView | ( | const int | id, |
| const int | id_to, | ||
| const bool | before | ||
| ) | [static] |
| 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().
| QList< int > SalomePyQt::neighbourViews | ( | const int | id | ) | [static] |