Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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
Handle_SALOME_InteractiveObject 
SelObject
 
typedef QList< SelObjectSelList
 
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
 

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

typedef QMap<QString, SelList> LightApp_SelectionMgr::CacheMap
private
typedef NCollection_DataMap< TCollection_AsciiString, TColStd_IndexedMapOfInteger > LightApp_SelectionMgr::MapEntryOfMapOfInteger
typedef NCollection_DataMap< Handle(SALOME_InteractiveObject), TColStd_IndexedMapOfInteger > LightApp_SelectionMgr::MapIOOfMapOfInteger
typedef Handle_SALOME_InteractiveObject LightApp_SelectionMgr::SelObject
private
typedef QMap<QString, QTime> LightApp_SelectionMgr::TimeMap
private

Constructor & Destructor Documentation

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

Constructor.

LightApp_SelectionMgr::~LightApp_SelectionMgr ( )
virtual

Destructor.

Member Function Documentation

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

Gets application.

References myApp.

void LightApp_SelectionMgr::clearSelectionCache ( )

References myCacheSelection, and myCacheTimes.

void LightApp_SelectionMgr::currentSelectionChanged ( )
signal
void LightApp_SelectionMgr::GetIndexes ( const Handle(SALOME_InteractiveObject)&  IObject,
TColStd_IndexedMapOfInteger &  theIndex 
)
void LightApp_SelectionMgr::GetIndexes ( const QString &  theEntry,
TColStd_IndexedMapOfInteger &  theIndex 
)
LightApp_SelectionMgr::Handle ( SALOME_InteractiveObject  ) const
bool LightApp_SelectionMgr::isActualSelectionCache ( const QString &  type = QString()) const
private
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
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().

QList< Handle(SALOME_InteractiveObject)> LightApp_SelectionMgr::selectionCache ( const QString &  type = QString()) const
private
void LightApp_SelectionMgr::selectionChanged ( SUIT_Selector theSel)
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().

QStringList LightApp_SelectionMgr::selectorTypes ( ) const
private
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().

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)

Member Data Documentation

const LightApp_SelectionMgr::bool = true ) const
LightApp_Application* LightApp_SelectionMgr::myApp
private
CacheMap LightApp_SelectionMgr::myCacheSelection
private
bool LightApp_SelectionMgr::myCacheState
private
TimeMap LightApp_SelectionMgr::myCacheTimes
private
QTime LightApp_SelectionMgr::myTimeStamp
private

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