#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 Attributes | |
const | bool = true ) const |
Private Types | |
typedef Handle_SALOME_InteractiveObject | SelObject |
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 |
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 |
|
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().
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 & | theList, |
const QString & | theType = QString() , |
||
const bool | convertReferences = true , |
||
const bool | sole = false |
||
) | const |
Get all selected objects from selection manager
References SUIT_Application::activeStudy(), application(), LightApp_Study::componentDataType(), LightApp_DataOwner::entry(), Handle(), isActualSelectionCache(), isSelectionCacheEnabled(), myCacheSelection, myCacheTimes, LightApp_Study::referencedToEntry(), SALOME_InteractiveObject(), SUIT_SelectionMgr::selected(), selectionCache(), and selectorTypes().
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 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 & | lst, |
const bool | append = false |
||
) |
Append selected objects.
References SUIT_DataOwnerPtrList::append(), and setSelected().
void LightApp_SelectionMgr::setSelectionCacheEnabled | ( | bool | on | ) |
References clearSelectionCache(), and myCacheState.
|
private |
|
private |
|
private |
|
private |
|
private |