Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef LIGHTAPP_SELECTIONMGR_H
00024 #define LIGHTAPP_SELECTIONMGR_H
00025
00026 #include "LightApp.h"
00027
00028 #include <SUIT_SelectionMgr.h>
00029
00030 #ifndef DISABLE_SALOMEOBJECT
00031 #include <SALOME_InteractiveObject.hxx>
00032 #include <QMap>
00033 #include <NCollection_DataMap.hxx>
00034
00035 class SALOME_ListIO;
00036 class TColStd_IndexedMapOfInteger;
00037 class TColStd_MapOfInteger;
00038 class TCollection_AsciiString;
00039 #else
00040 #include <QStringList>
00041 #endif
00042
00043 class LightApp_Application;
00044
00049 class LIGHTAPP_EXPORT LightApp_SelectionMgr : public SUIT_SelectionMgr
00050 {
00051 Q_OBJECT
00052
00053 public:
00054 LightApp_SelectionMgr( LightApp_Application*, const bool = true );
00055 virtual ~LightApp_SelectionMgr();
00056
00057 LightApp_Application* application() const;
00058
00059 #ifndef DISABLE_SALOMEOBJECT
00060 typedef NCollection_DataMap< Handle(SALOME_InteractiveObject), TColStd_IndexedMapOfInteger > MapIOOfMapOfInteger;
00061 typedef NCollection_DataMap< TCollection_AsciiString, TColStd_IndexedMapOfInteger > MapEntryOfMapOfInteger;
00062
00063 void selectedObjects( SALOME_ListIO&, const QString& = QString(), const bool = true ) const;
00064 void setSelectedObjects( const SALOME_ListIO&, const bool = false );
00065
00066 void GetIndexes( const Handle(SALOME_InteractiveObject)& IObject,
00067 TColStd_IndexedMapOfInteger& theIndex );
00068 void GetIndexes( const QString& theEntry,
00069 TColStd_IndexedMapOfInteger& theIndex );
00070
00071
00072 void AddOrRemoveIndex( const Handle(SALOME_InteractiveObject)& IObject,
00073 const TColStd_MapOfInteger& theIndices,
00074 bool modeShift );
00075
00076 void selectObjects( const Handle(SALOME_InteractiveObject)& IObject,
00077 TColStd_IndexedMapOfInteger theIndex, bool append );
00078 void selectObjects( MapIOOfMapOfInteger theMapIO, bool append );
00079
00080 void selectedSubOwners( MapEntryOfMapOfInteger& theMap );
00081 #else
00082 void selectedObjects( QStringList&, const QString& = QString(), const bool = true ) const;
00083 #endif
00084
00085 signals:
00086 void currentSelectionChanged();
00087
00088 private:
00089 virtual void selectionChanged( SUIT_Selector* );
00090
00091 private:
00092 LightApp_Application* myApp;
00093 };
00094
00095 #endif