#include <LightApp_SelectionMgr.h>
Public Types | |
typedef NCollection_DataMap< Handle(SALOME_InteractiveObject), TColStd_IndexedMapOfInteger > | MapIOOfMapOfInteger |
typedef NCollection_DataMap< TCollection_AsciiString, TColStd_IndexedMapOfInteger > | MapEntryOfMapOfInteger |
Signals | |
void | currentSelectionChanged () |
Signals inherited from SUIT_SelectionMgr | |
void | selectionChanged () |
Public Member Functions | |
LightApp_SelectionMgr (LightApp_Application *, const bool=true) | |
virtual | ~LightApp_SelectionMgr () |
LightApp_Application * | application () const |
virtual void | setSelected (const SUIT_DataOwnerPtrList &, const bool=false) |
void | selectedObjects (SALOME_ListIO &, const QString &=QString(), const bool=true, const bool sole=false) const |
Handle (SALOME_InteractiveObject) soleSelectedObject(const QString & | |
void | setSelectedObjects (const SALOME_ListIO &, const bool=false) |
void | GetIndexes (const Handle(SALOME_InteractiveObject)&IObject, TColStd_IndexedMapOfInteger &theIndex) |
void | GetIndexes (const QString &theEntry, TColStd_IndexedMapOfInteger &theIndex) |
void | AddOrRemoveIndex (const Handle(SALOME_InteractiveObject)&IObject, const TColStd_MapOfInteger &theIndices, bool modeShift) |
void | selectObjects (const Handle(SALOME_InteractiveObject)&IObject, TColStd_IndexedMapOfInteger theIndex, bool append) |
void | selectObjects (MapIOOfMapOfInteger theMapIO, bool append) |
void | selectedSubOwners (MapEntryOfMapOfInteger &theMap) |
void | clearSelectionCache () |
bool | isSelectionCacheEnabled () const |
void | setSelectionCacheEnabled (bool) |
Public Member Functions inherited from SUIT_SelectionMgr | |
SUIT_SelectionMgr (const bool=true, QObject *=0) | |
virtual | ~SUIT_SelectionMgr () |
void | clearSelected () |
virtual void | selected (SUIT_DataOwnerPtrList &, const QString &=QString(), const bool=false) const |
void | selectors (QList< SUIT_Selector * > &) const |
void | selectors (const QString &, QList< SUIT_Selector * > &) const |
void | setEnabled (const bool, const QString &=QString()) |
bool | hasSelectionMode (const int) const |
void | selectionModes (QList< int > &) const |
void | setSelectionModes (const int) |
virtual void | setSelectionModes (const QList< int > &) |
void | appendSelectionModes (const int) |
virtual void | appendSelectionModes (const QList< int > &) |
void | removeSelectionModes (const int) |
virtual void | removeSelectionModes (const QList< int > &) |
bool | isOk (const SUIT_DataOwner *) const |
bool | isOk (const SUIT_DataOwnerPtr &) const |
bool | hasFilter (SUIT_SelectionFilter *) const |
virtual void | installFilter (SUIT_SelectionFilter *, const bool=true) |
virtual void | removeFilter (SUIT_SelectionFilter *) |
virtual void | clearFilters () |
bool | autoDeleteFilter () const |
void | setAutoDeleteFilter (const bool) |
bool | isSynchronizing () const |
Public Attributes | |
const | bool = true ) const |
Private Types | |
typedef QList< SelObject > | SelList |
typedef QMap< QString, QTime > | TimeMap |
typedef QMap< QString, SelList > | CacheMap |
Private Member Functions | |
virtual void | selectionChanged (SUIT_Selector *) |
QList< Handle(SALOME_InteractiveObject)> | selectionCache (const QString &=QString()) const |
bool | isActualSelectionCache (const QString &=QString()) const |
QStringList | selectorTypes () const |
typedef | Handle (SALOME_InteractiveObject) SelObject |
Private Attributes | |
LightApp_Application * | myApp |
QTime | myTimeStamp |
bool | myCacheState |
TimeMap | myCacheTimes |
CacheMap | myCacheSelection |
Additional Inherited Members | |
Protected Member Functions inherited from SUIT_SelectionMgr | |
virtual void | installSelector (SUIT_Selector *) |
virtual void | removeSelector (SUIT_Selector *) |
Custom selection manager, allowing to work with object selection (additionally to data owners) and to access to sub-selection of objects
|
private |
typedef NCollection_DataMap< TCollection_AsciiString, TColStd_IndexedMapOfInteger > LightApp_SelectionMgr::MapEntryOfMapOfInteger |
typedef NCollection_DataMap< Handle(SALOME_InteractiveObject), TColStd_IndexedMapOfInteger > LightApp_SelectionMgr::MapIOOfMapOfInteger |
|
private |
|
private |
LightApp_SelectionMgr::LightApp_SelectionMgr | ( | LightApp_Application * | app, |
const bool | fb = true |
||
) |
Constructor.
|
virtual |
Destructor.
void LightApp_SelectionMgr::AddOrRemoveIndex | ( | const Handle(SALOME_InteractiveObject)& | IObject, |
const TColStd_MapOfInteger & | theIndexes, | ||
bool | modeShift | ||
) |
Add or remove interactive objects from selection manager.
References SUIT_DataOwnerPtrList::append(), currentSelectionChanged(), LightApp_DataOwner::entry(), LightApp_DataSubOwner::index(), SUIT_SelectionMgr::selected(), and setSelected().
LightApp_Application * LightApp_SelectionMgr::application | ( | ) | const |
Gets application.
References myApp.
void LightApp_SelectionMgr::clearSelectionCache | ( | ) |
References myCacheSelection, and myCacheTimes.
|
signal |
void LightApp_SelectionMgr::GetIndexes | ( | const Handle(SALOME_InteractiveObject)& | IObject, |
TColStd_IndexedMapOfInteger & | theIndex | ||
) |
get map of indexes for the given SALOME_InteractiveObject
References LightApp_DataOwner::entry(), LightApp_DataSubOwner::index(), and SUIT_SelectionMgr::selected().
void LightApp_SelectionMgr::GetIndexes | ( | const QString & | theEntry, |
TColStd_IndexedMapOfInteger & | theIndex | ||
) |
get map of indexes for the given entry of SALOME_InteractiveObject
References LightApp_DataOwner::entry(), LightApp_DataSubOwner::index(), and SUIT_SelectionMgr::selected().
|
private |
LightApp_SelectionMgr::Handle | ( | SALOME_InteractiveObject | ) | const & |
|
private |
References myCacheTimes, myTimeStamp, and selectorTypes().
bool LightApp_SelectionMgr::isSelectionCacheEnabled | ( | ) | const |
References myCacheState.
void LightApp_SelectionMgr::selectedObjects | ( | SALOME_ListIO & | , |
const QString & | = QString() , |
||
const bool | = true , |
||
const bool | sole = false |
||
) | const |
void LightApp_SelectionMgr::selectedSubOwners | ( | MapEntryOfMapOfInteger & | theMap | ) |
get map of selected subowners : object's entry <-> map of indexes
References LightApp_DataOwner::entry(), LightApp_DataSubOwner::index(), and SUIT_SelectionMgr::selected().
|
private |
References Handle(), myCacheSelection, and selectorTypes().
|
privatevirtual |
Emit current selection changed.
Reimplemented from SUIT_SelectionMgr.
References currentSelectionChanged(), myTimeStamp, and SUIT_SelectionMgr::selectionChanged().
void LightApp_SelectionMgr::selectObjects | ( | const Handle(SALOME_InteractiveObject)& | IObject, |
TColStd_IndexedMapOfInteger | theIndex, | ||
bool | append | ||
) |
select 'subobjects' with given indexes
References SUIT_DataOwnerPtrList::append(), and setSelected().
void LightApp_SelectionMgr::selectObjects | ( | MapIOOfMapOfInteger | theMapIO, |
bool | append | ||
) |
select 'subobjects' with given indexes
References SUIT_DataOwnerPtrList::append(), and setSelected().
|
private |
References SUIT_SelectionMgr::selectors().
|
virtual |
Sets selected data owners from lst and append to list, if append - true.
Reimplemented from SUIT_SelectionMgr.
References myTimeStamp, and SUIT_SelectionMgr::setSelected().
void LightApp_SelectionMgr::setSelectedObjects | ( | const SALOME_ListIO & | , |
const bool | = false |
||
) |
void LightApp_SelectionMgr::setSelectionCacheEnabled | ( | bool | on | ) |
References clearSelectionCache(), and myCacheState.
const LightApp_SelectionMgr::bool = true ) const |
|
private |
|
private |
|
private |
|
private |
|
private |