20 #ifndef GEOMGUI_ANNOTATIONMGR_H
21 #define GEOMGUI_ANNOTATIONMGR_H
25 #include <SALOMEconfig.h>
26 #include CORBA_SERVER_HEADER(GEOM_Gen)
31 #include <SALOME_Prs.h>
32 #include <SALOME_InteractiveObject.hxx>
34 #include <SOCC_ViewModel.h>
36 class SalomeApp_Application;
54 static QString GetEntrySeparator();
57 GEOM::GEOM_Object_ptr theObject,
58 SOCC_Viewer* theView = 0,
59 const QString& theEntry = QString() );
61 bool IsDisplayed(
const QString& theEntry,
const int theIndex, SOCC_Viewer* theView = 0 )
const;
62 void Display(
const QString& theEntry,
const int theIndex, SOCC_Viewer* theView = 0,
63 const bool isStoreViewState =
true,
const bool isUpdateViewer =
true );
64 void Erase(
const QString& theEntry,
const int theIndex, SOCC_Viewer* theView = 0,
65 const bool isUpdateViewer =
true );
66 void EraseRemovedAnnotation(
const QString& theEntry,
const int theIndex );
67 void Redisplay(
const QString& theEntry,
const int theIndex,
69 void Redisplay(
const QString& theEntry,
const int theIndex,
72 void DisplayVisibleAnnotations(
const QString& theEntry, SOCC_Viewer* theView = 0,
73 const bool isUpdateViewer =
true );
74 void EraseVisibleAnnotations(
const QString& theEntry, SOCC_Viewer* theView = 0,
75 const bool isUpdateViewer =
true );
76 void UpdateVisibleAnnotations(
const QString& theEntry, SOCC_Viewer* theView = 0 );
78 void DisplayAllAnnotations( SOCC_Viewer* theView = 0 );
79 void EraseAllAnnotations( SOCC_Viewer* theView = 0 );
81 void SetPreviewStyle(
const QString& theEntry,
const int theIndex,
const bool theIsPreview );
83 void RemoveView( SOCC_Viewer* theView );
86 SOCC_Viewer* theView = 0 );
89 SOCC_Viewer* theView = 0 ) const;
91 QString getDisplayedIndicesInfo( const QString& theEntry, SOCC_Viewer* theView ) const;
93 void setDisplayedIndicesInfo( const QString& theEntry, SOCC_Viewer* theView, const QString theIndicesInfo );
95 QString makeAnnotationEntry( const QString& theEntry, const
int theIndex );
97 void storeFixedPosition( const QString& theEntry, SOCC_Viewer* theView );
99 bool getIndexFromEntry( const QString& theEntry, QString& theObjEntry,
int& theIndex );
101 bool isAnnotationEntry( const QString& theEntry ) {
return theEntry.indexOf( GetEntrySeparator() ) != -1; }
109 SOCC_Viewer* viewOrActiveView( SOCC_Viewer* theView )
const;
111 void getObject(
const QString& theEntry,
const int theIndex,
112 GEOM::GEOM_Object_ptr& anObject,
115 void storeVisibleState(
const QString& theEntry, SOCC_Viewer* theView );
117 std::string
getEntry(
const GEOM::GEOM_Object_ptr theObject );
119 std::string
getName(
const GEOM::GEOM_Object_ptr theObject );
122 SOCC_Viewer* theView = 0,
123 const QString& theEntry = QString() );
127 SOCC_Viewer* theView );
130 SalomeApp_Application* myApplication;
134 QMap<SOCC_Viewer*, EntryToAnnotations> myVisualized;