Version: 9.12.0
LightApp_SelectionMgr Class Reference

#include <LightApp_SelectionMgr.h>

Inheritance diagram for LightApp_SelectionMgr:
Inheritance graph

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_Applicationapplication () 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, SelListCacheMap
 

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_ApplicationmyApp
 
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 *)
 

Detailed Description

Custom selection manager, allowing to work with object selection (additionally to data owners) and to access to sub-selection of objects

Member Typedef Documentation

◆ CacheMap

typedef QMap<QString, SelList> LightApp_SelectionMgr::CacheMap
private

◆ MapEntryOfMapOfInteger

typedef NCollection_DataMap< TCollection_AsciiString, TColStd_IndexedMapOfInteger > LightApp_SelectionMgr::MapEntryOfMapOfInteger

◆ MapIOOfMapOfInteger

typedef NCollection_DataMap< Handle(SALOME_InteractiveObject), TColStd_IndexedMapOfInteger > LightApp_SelectionMgr::MapIOOfMapOfInteger

◆ SelList

typedef QList<SelObject> LightApp_SelectionMgr::SelList
private

◆ TimeMap

typedef QMap<QString, QTime> LightApp_SelectionMgr::TimeMap
private

Constructor & Destructor Documentation

◆ LightApp_SelectionMgr()

LightApp_SelectionMgr::LightApp_SelectionMgr ( LightApp_Application app,
const bool  fb = true 
)

Constructor.

◆ ~LightApp_SelectionMgr()

LightApp_SelectionMgr::~LightApp_SelectionMgr ( )
virtual

Destructor.

Member Function Documentation

◆ AddOrRemoveIndex()

void LightApp_SelectionMgr::AddOrRemoveIndex ( const Handle(SALOME_InteractiveObject)&  IObject,
const TColStd_MapOfInteger &  theIndexes,
bool  modeShift 
)

◆ application()

LightApp_Application * LightApp_SelectionMgr::application ( ) const

Gets application.

References myApp.

◆ clearSelectionCache()

void LightApp_SelectionMgr::clearSelectionCache ( )

References myCacheSelection, and myCacheTimes.

◆ currentSelectionChanged

void LightApp_SelectionMgr::currentSelectionChanged ( )
signal

◆ GetIndexes() [1/2]

void LightApp_SelectionMgr::GetIndexes ( const Handle(SALOME_InteractiveObject)&  IObject,
TColStd_IndexedMapOfInteger &  theIndex 
)

◆ GetIndexes() [2/2]

void LightApp_SelectionMgr::GetIndexes ( const QString &  theEntry,
TColStd_IndexedMapOfInteger &  theIndex 
)

◆ Handle() [1/2]

typedef LightApp_SelectionMgr::Handle ( SALOME_InteractiveObject  )
private

◆ Handle() [2/2]

LightApp_SelectionMgr::Handle ( SALOME_InteractiveObject  ) const &

◆ isActualSelectionCache()

bool LightApp_SelectionMgr::isActualSelectionCache ( const QString &  type = QString()) const
private

◆ isSelectionCacheEnabled()

bool LightApp_SelectionMgr::isSelectionCacheEnabled ( ) const

References myCacheState.

◆ selectedObjects()

void LightApp_SelectionMgr::selectedObjects ( SALOME_ListIO ,
const QString &  = QString(),
const bool  = true,
const bool  sole = false 
) const

◆ selectedSubOwners()

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().

◆ selectionCache()

QList< Handle(SALOME_InteractiveObject)> LightApp_SelectionMgr::selectionCache ( const QString &  type = QString()) const
private

◆ selectionChanged()

void LightApp_SelectionMgr::selectionChanged ( SUIT_Selector theSel)
privatevirtual

Emit current selection changed.

Reimplemented from SUIT_SelectionMgr.

References currentSelectionChanged(), myTimeStamp, and SUIT_SelectionMgr::selectionChanged().

◆ selectObjects() [1/2]

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().

◆ selectObjects() [2/2]

void LightApp_SelectionMgr::selectObjects ( MapIOOfMapOfInteger  theMapIO,
bool  append 
)

select 'subobjects' with given indexes

References SUIT_DataOwnerPtrList::append(), and setSelected().

◆ selectorTypes()

QStringList LightApp_SelectionMgr::selectorTypes ( ) const
private

◆ setSelected()

void LightApp_SelectionMgr::setSelected ( const SUIT_DataOwnerPtrList lst,
const bool  append = false 
)
virtual

Sets selected data owners from lst and append to list, if append - true.

Reimplemented from SUIT_SelectionMgr.

References myTimeStamp, and SUIT_SelectionMgr::setSelected().

◆ setSelectedObjects()

void LightApp_SelectionMgr::setSelectedObjects ( const SALOME_ListIO ,
const bool  = false 
)

◆ setSelectionCacheEnabled()

void LightApp_SelectionMgr::setSelectionCacheEnabled ( bool  on)

Member Data Documentation

◆ bool

const LightApp_SelectionMgr::bool = true ) const

◆ myApp

LightApp_Application* LightApp_SelectionMgr::myApp
private

◆ myCacheSelection

CacheMap LightApp_SelectionMgr::myCacheSelection
private

◆ myCacheState

bool LightApp_SelectionMgr::myCacheState
private

◆ myCacheTimes

TimeMap LightApp_SelectionMgr::myCacheTimes
private

◆ myTimeStamp

QTime LightApp_SelectionMgr::myTimeStamp
private

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