#include <LightApp_Selection.h>

Public Member Functions | |
| LightApp_Selection () | |
| virtual | ~LightApp_Selection () |
| virtual void | init (const QString &, LightApp_SelectionMgr *) |
| virtual bool | processOwner (const LightApp_DataOwner *) |
| virtual int | count () const |
| virtual QVariant | parameter (const int, const QString &) const |
| virtual QVariant | parameter (const QString &) const |
| void | setModuleName (const QString) |
| QString | option (const QString &) const |
| Get an option value. | |
| void | setOption (const QString &, const QString &) |
| Set an option value. | |
Protected Member Functions | |
| QString | entry (const int) const |
| bool | isReference (const int) const |
| LightApp_Study * | study () const |
| QString | activeViewType () const |
| SUIT_ViewWindow * | activeVW () const |
| virtual QString | referencedToEntry (const QString &) const |
Private Attributes | |
| QString | myPopupClient |
| QMap< int, QString > | myEntries |
| QMap< int, bool > | myIsReferences |
| LightApp_Study * | myStudy |
Custom selection class, allowing to build popup with rules on the base of owners selected in all selectors (popup client has more priority). It is able to return values of standard object properties (isVisible,isComponent,canBeDisplayed,isReference, etc)
| LightApp_Selection::LightApp_Selection | ( | ) |
Constructor
| LightApp_Selection::~LightApp_Selection | ( | ) | [virtual] |
Destructor.
| void LightApp_Selection::init | ( | const QString & | client, |
| LightApp_SelectionMgr * | mgr | ||
| ) | [virtual] |
Initialization.
References SUIT_Application.activeStudy(), SUIT_DataOwnerPtrList.append(), LightApp_SelectionMgr.application(), salome_pluginsmanager.entries(), LightApp_DataOwner.entry(), entry(), SUIT_Selector.isEnabled(), myEntries, myIsReferences, myPopupClient, myStudy, processOwner(), referencedToEntry(), SUIT_Selector.selected(), SUIT_SelectionMgr.selected(), SUIT_SelectionMgr.selectors(), and SUIT_Selector.type().
| bool LightApp_Selection::processOwner | ( | const LightApp_DataOwner * | ) | [virtual] |
Perform additional processing of the selected item (to be redefined by successors if necessary). Returns true by default. Note: if this method returns false, the item will be removed from the items list and not taken into account when showing popup menu.
| owner | a data owner being processed |
true if the owner should be collected and false otherwise | int LightApp_Selection::count | ( | ) | const [virtual] |
| QVariant LightApp_Selection::parameter | ( | const int | ind, |
| const QString & | p | ||
| ) | const [virtual] |
Gets QVariant();
Implements QtxPopupSelection.
References SUIT_Study.application(), LightApp_Displayer.canBeDisplayed(), LightApp_Study.componentDataType(), count(), LightApp_Displayer.FindDisplayer(), LightApp_Study.isComponent(), LightApp_Displayer.IsDisplayed(), isReference(), CAM_Application.moduleTitle(), myEntries, and myStudy.
| QVariant LightApp_Selection::parameter | ( | const QString & | p | ) | const [virtual] |
Gets global parameters. client, isActiveView, activeView etc.
Reimplemented from QtxPopupSelection.
References CAM_Application.activeModule(), activeViewType(), activeVW(), SUIT_Study.application(), myPopupClient, myStudy, CAM_Module.name(), and parameter().
| void LightApp_Selection.setModuleName | ( | const QString | ) |
| QString LightApp_Selection::entry | ( | const int | index | ) | const [protected] |
| bool LightApp_Selection::isReference | ( | const int | index | ) | const [protected] |
Returns true if i-th selected object was reference to object with entry( i )
References count(), and myIsReferences.
| LightApp_Study* LightApp_Selection.study | ( | ) | const [protected] |
Gets study.
References PyInterp.myStudy.
| QString LightApp_Selection::activeViewType | ( | ) | const [protected] |
Gets type of active view manager.
References activeVW(), SUIT_ViewManager.getType(), and SUIT_ViewWindow.getViewManager().
| SUIT_ViewWindow * LightApp_Selection::activeVW | ( | ) | const [protected] |
Gets active view window.
References SUIT_Session.activeApplication(), SUIT_Desktop.activeWindow(), SUIT_Application.desktop(), and SUIT_Session.session().
| QString LightApp_Selection::referencedToEntry | ( | const QString & | entry | ) | const [protected, virtual] |
References myStudy, and LightApp_Study.referencedToEntry().
| QString QtxPopupSelection::option | ( | const QString & | optName | ) | const [inherited] |
| optName | option name |
References QtxPopupSelection.myOptions.
| void QtxPopupSelection::setOption | ( | const QString & | optName, |
| const QString & | opt | ||
| ) | [inherited] |
| optName | option name |
| opt | option value |
References QtxPopupSelection.myOptions.
QString LightApp_Selection.myPopupClient [private] |
QMap<int,QString> LightApp_Selection.myEntries [private] |
QMap<int,bool> LightApp_Selection.myIsReferences [private] |
LightApp_Study* LightApp_Selection.myStudy [private] |