Version: 9.12.0
SALOME_PYQT_Selector Class Reference

Object browser selection handler class. More...

#include <SALOME_PYQT_Selector.h>

Inheritance diagram for SALOME_PYQT_Selector:
Inheritance graph

Public Member Functions

 SALOME_PYQT_Selector (SALOME_PYQT_ModuleLight *, SUIT_SelectionMgr *)
 Constructor. More...
 
virtual ~SALOME_PYQT_Selector ()
 Destructor. More...
 
SALOME_PYQT_ModuleLightpyModule () const
 Get Python module interface instance. More...
 
virtual QString type () const
 Get selector type. More...
 
unsigned long getModifiedTime () const
 Get the time of the last selection changing. More...
 
void setModified ()
 Update the time of the latest selection changing. More...
 
void setLocalEntries (const QStringList &entries)
 
void clear ()
 Reset selection internally. Used on close study. More...
 
- Public Member Functions inherited from SUIT_Selector
 SUIT_Selector (SUIT_SelectionMgr *, QObject *=0)
 
virtual ~SUIT_Selector ()
 
SUIT_SelectionMgrselectionMgr () const
 
bool isEnabled () const
 
virtual void setEnabled (const bool)
 
bool autoBlock () const
 
virtual void setAutoBlock (const bool)
 
void selected (SUIT_DataOwnerPtrList &) const
 
void setSelected (const SUIT_DataOwnerPtrList &)
 
bool hasSelectionMode (const int) const
 
void selectionModes (QList< int > &) const
 
QObjectowner () const
 

Protected Member Functions

virtual void getSelection (SUIT_DataOwnerPtrList &) const
 Get list of currently selected objects. More...
 
virtual void setSelection (const SUIT_DataOwnerPtrList &)
 Set selection. More...
 
- Protected Member Functions inherited from SUIT_Selector
void selectionChanged ()
 

Private Slots

void onSelectionChanged ()
 Called when the Object browser selection is changed. More...
 

Private Member Functions

void fillEntries (QStringList &)
 Fill map of the data objects currently shown in the Object Browser. More...
 

Private Attributes

QStringList myLocalEntries
 
SALOME_PYQT_ModuleLightmyPyModule
 
SUIT_DataOwnerPtrList mySelectedList
 
QStringList myEntries
 
unsigned long myModifiedTime
 

Detailed Description

Object browser selection handler class.

Constructor & Destructor Documentation

◆ SALOME_PYQT_Selector()

SALOME_PYQT_Selector::SALOME_PYQT_Selector ( SALOME_PYQT_ModuleLight pymod,
SUIT_SelectionMgr mgr 
)

Constructor.

Parameters
pymodPython module interface instance in charge of calling Python module methods from C++
mgrselection manager

References SUIT_DataOwnerPtrList::clear(), myEntries, myLocalEntries, myModifiedTime, myPyModule, mySelectedList, onSelectionChanged(), and setModified().

◆ ~SALOME_PYQT_Selector()

SALOME_PYQT_Selector::~SALOME_PYQT_Selector ( )
virtual

Destructor.

Member Function Documentation

◆ clear()

void SALOME_PYQT_Selector::clear ( )

Reset selection internally. Used on close study.

References SUIT_DataOwnerPtrList::clear(), myEntries, myLocalEntries, and mySelectedList.

◆ fillEntries()

void SALOME_PYQT_Selector::fillEntries ( QStringList &  entries)
private

Fill map of the data objects currently shown in the Object Browser.

Parameters
entriesmap to be filled

References myPyModule, setModified(), and SALOME_PYQT_ModuleLight::setSelected().

◆ getModifiedTime()

unsigned long SALOME_PYQT_Selector::getModifiedTime ( ) const

Get the time of the last selection changing.

Returns
latest selection changing time

References myModifiedTime.

◆ getSelection()

void SALOME_PYQT_Selector::getSelection ( SUIT_DataOwnerPtrList theList) const
protectedvirtual

Get list of currently selected objects.

Parameters
theListlist to be filled with the selected objects owners

Implements SUIT_Selector.

References SUIT_DataOwnerPtrList::append(), LightApp_DataObject::componentDataType(), SALOME_PYQT_BorrowedDataObjectLight::entry(), Handle(), myLocalEntries, mySelectedList, SALOME_PYQT_BorrowedDataObjectLight::name(), and SUIT_Selector::owner().

◆ onSelectionChanged

void SALOME_PYQT_Selector::onSelectionChanged ( )
privateslot

Called when the Object browser selection is changed.

References SUIT_DataOwnerPtrList::clear(), mySelectedList, and SUIT_Selector::selectionChanged().

◆ pyModule()

SALOME_PYQT_ModuleLight * SALOME_PYQT_Selector::pyModule ( ) const

Get Python module interface instance.

Returns
a pointer to the Python module interface instance.

References myPyModule.

◆ setLocalEntries()

void SALOME_PYQT_Selector::setLocalEntries ( const QStringList &  entries)
inline

◆ setModified()

void SALOME_PYQT_Selector::setModified ( )

Update the time of the latest selection changing.

References myModifiedTime.

◆ setSelection()

void SALOME_PYQT_Selector::setSelection ( const SUIT_DataOwnerPtrList theList)
protectedvirtual

Set selection.

Parameters
theListlist of the object owners to be set selected

Implements SUIT_Selector.

References SUIT_DataOwnerPtrList::clear(), fillEntries(), myEntries, myPyModule, mySelectedList, and SUIT_Selector::owner().

◆ type()

QString SALOME_PYQT_Selector::type ( ) const
virtual

Get selector type.

Returns
selector type

Implements SUIT_Selector.

Member Data Documentation

◆ myEntries

QStringList SALOME_PYQT_Selector::myEntries
private

◆ myLocalEntries

QStringList SALOME_PYQT_Selector::myLocalEntries
private

◆ myModifiedTime

unsigned long SALOME_PYQT_Selector::myModifiedTime
private

◆ myPyModule

SALOME_PYQT_ModuleLight* SALOME_PYQT_Selector::myPyModule
private

◆ mySelectedList

SUIT_DataOwnerPtrList SALOME_PYQT_Selector::mySelectedList
private

The documentation for this class was generated from the following files: