A help class to process visualization of annotation presentations. It contains a map of presentations shown in each viewer. and correct 2D position persistent properties of annotations of active viewer. When the viewer is closed, information about the viewer is removed from the manager.
#include <GEOMGUI_AnnotationMgr.h>

Public Member Functions | |
| GEOMGUI_AnnotationMgr (SalomeApp_Application *theApplication) | |
| ~GEOMGUI_AnnotationMgr () | |
| SALOME_Prs * | CreatePresentation (const GEOMGUI_AnnotationAttrs::Properties &theProperty, GEOM::GEOM_Object_ptr theObject, SOCC_Viewer *theView=0, const QString &theEntry=QString()) |
| bool | IsDisplayed (const QString &theEntry, const int theIndex, SOCC_Viewer *theView=0) const |
| void | Display (const QString &theEntry, const int theIndex, SOCC_Viewer *theView=0, const bool isStoreViewState=true, const bool isUpdateViewer=true) |
| void | Erase (const QString &theEntry, const int theIndex, SOCC_Viewer *theView=0, const bool isUpdateViewer=true) |
| void | EraseRemovedAnnotation (const QString &theEntry, const int theIndex) |
| void | Redisplay (const QString &theEntry, const int theIndex, const GEOMGUI_AnnotationAttrs::Properties &theProperties) |
| void | Redisplay (const QString &theEntry, const int theIndex, const GEOMGUI_AnnotationAttrs::Properties &theProperties, SOCC_Viewer *theView) |
| void | DisplayVisibleAnnotations (const QString &theEntry, SOCC_Viewer *theView=0, const bool isUpdateViewer=true) |
| void | EraseVisibleAnnotations (const QString &theEntry, SOCC_Viewer *theView=0, const bool isUpdateViewer=true) |
| void | UpdateVisibleAnnotations (const QString &theEntry, SOCC_Viewer *theView=0) |
| void | DisplayAllAnnotations (SOCC_Viewer *theView=0) |
| void | EraseAllAnnotations (SOCC_Viewer *theView=0) |
| void | SetPreviewStyle (const QString &theEntry, const int theIndex, const bool theIsPreview) |
| void | RemoveView (SOCC_Viewer *theView) |
| int | FindAnnotationIndex (Handle(SALOME_InteractiveObject) theIO, SOCC_Viewer *theView=0) |
| Handle (SALOME_InteractiveObject) FindInteractiveObject(const QString &theEntry | |
| QString | getDisplayedIndicesInfo (const QString &theEntry, SOCC_Viewer *theView) const |
| void | setDisplayedIndicesInfo (const QString &theEntry, SOCC_Viewer *theView, const QString theIndicesInfo) |
| QString | makeAnnotationEntry (const QString &theEntry, const int theIndex) |
| void | storeFixedPosition (const QString &theEntry, SOCC_Viewer *theView) |
| bool | getIndexFromEntry (const QString &theEntry, QString &theObjEntry, int &theIndex) |
| bool | isAnnotationEntry (const QString &theEntry) |
Static Public Member Functions | |
| static QString | GetEntrySeparator () |
Public Attributes | |
| const int | theIndex |
| const int SOCC_Viewer * | theView = 0 ) const |
Protected Member Functions | |
| SalomeApp_Application * | getApplication () const |
| GEOM_Displayer * | getDisplayer () const |
| SOCC_Viewer * | viewOrActiveView (SOCC_Viewer *theView) const |
| void | getObject (const QString &theEntry, const int theIndex, GEOM::GEOM_Object_ptr &anObject, GEOMGUI_AnnotationAttrs::Properties &aProperty) |
| void | storeVisibleState (const QString &theEntry, SOCC_Viewer *theView) |
| std::string | getEntry (const GEOM::GEOM_Object_ptr theObject) |
| std::string | getName (const GEOM::GEOM_Object_ptr theObject) |
| void | setDisplayProperties (const Handle(GEOM_Annotation)&thePrs, SOCC_Viewer *theView=0, const QString &theEntry=QString()) |
| Handle (GEOM_Annotation) getAISPresentation(const QString &theEntry | |
Private Types | |
| typedef QMap< int, SALOME_Prs * > | AnnotationToPrs |
| typedef QMap< QString, AnnotationToPrs > | EntryToAnnotations |
Private Attributes | |
| SalomeApp_Application * | myApplication |
| QMap< SOCC_Viewer *, EntryToAnnotations > | myVisualized |
|
private |
|
private |
| GEOMGUI_AnnotationMgr::GEOMGUI_AnnotationMgr | ( | SalomeApp_Application * | theApplication | ) |
|
inline |
| SALOME_Prs * GEOMGUI_AnnotationMgr::CreatePresentation | ( | const GEOMGUI_AnnotationAttrs::Properties & | theProperty, |
| GEOM::GEOM_Object_ptr | theObject, | ||
| SOCC_Viewer * | theView = 0, |
||
| const QString & | theEntry = QString() |
||
| ) |
References GEOM_Client::get_client(), getEntry(), GeometryGUI::GetGeomGen(), GEOM_Client::GetShape(), Handle(), GEOMGUI_AnnotationAttrs::Properties::IsScreenFixed, setDisplayProperties(), GEOMGUI_AnnotationAttrs::SetupPresentation(), GEOMGUI_AnnotationAttrs::Properties::ShapeIndex, GEOMGUI_AnnotationAttrs::Properties::ShapeType, theView, and viewOrActiveView().
| void GEOMGUI_AnnotationMgr::Display | ( | const QString & | theEntry, |
| const int | theIndex, | ||
| SOCC_Viewer * | theView = 0, |
||
| const bool | isStoreViewState = true, |
||
| const bool | isUpdateViewer = true |
||
| ) |
| void GEOMGUI_AnnotationMgr::DisplayAllAnnotations | ( | SOCC_Viewer * | theView = 0 | ) |
| void GEOMGUI_AnnotationMgr::DisplayVisibleAnnotations | ( | const QString & | theEntry, |
| SOCC_Viewer * | theView = 0, |
||
| const bool | isUpdateViewer = true |
||
| ) |
References Display(), getApplication(), Handle(), and theView.
| void GEOMGUI_AnnotationMgr::Erase | ( | const QString & | theEntry, |
| const int | theIndex, | ||
| SOCC_Viewer * | theView = 0, |
||
| const bool | isUpdateViewer = true |
||
| ) |
References getDisplayer(), myVisualized, storeVisibleState(), theIndex, theView, and viewOrActiveView().
| void GEOMGUI_AnnotationMgr::EraseAllAnnotations | ( | SOCC_Viewer * | theView = 0 | ) |
| void GEOMGUI_AnnotationMgr::EraseRemovedAnnotation | ( | const QString & | theEntry, |
| const int | theIndex | ||
| ) |
References getDisplayer(), myVisualized, and theIndex.
| void GEOMGUI_AnnotationMgr::EraseVisibleAnnotations | ( | const QString & | theEntry, |
| SOCC_Viewer * | theView = 0, |
||
| const bool | isUpdateViewer = true |
||
| ) |
References getApplication(), getDisplayer(), Handle(), myVisualized, theView, and viewOrActiveView().
| int GEOMGUI_AnnotationMgr::FindAnnotationIndex | ( | Handle(SALOME_InteractiveObject) | theIO, |
| SOCC_Viewer * | theView = 0 |
||
| ) |
|
inlineprotected |
| QString GEOMGUI_AnnotationMgr::getDisplayedIndicesInfo | ( | const QString & | theEntry, |
| SOCC_Viewer * | theView | ||
| ) | const |
References getApplication(), Handle(), IsDisplayed(), and theView.
|
protected |
References getApplication().
|
protected |
|
static |
| bool GEOMGUI_AnnotationMgr::getIndexFromEntry | ( | const QString & | theEntry, |
| QString & | theObjEntry, | ||
| int & | theIndex | ||
| ) |
References GetEntrySeparator(), and theIndex.
|
protected |
|
protected |
References GeometryGUI::ClientSObjectToObject(), getApplication(), Handle(), and theIndex.
|
protected |
| GEOMGUI_AnnotationMgr::Handle | ( | SALOME_InteractiveObject | ) | const & |
|
inline |
| bool GEOMGUI_AnnotationMgr::IsDisplayed | ( | const QString & | theEntry, |
| const int | theIndex, | ||
| SOCC_Viewer * | theView = 0 |
||
| ) | const |
References myVisualized, theIndex, theView, and viewOrActiveView().
| QString GEOMGUI_AnnotationMgr::makeAnnotationEntry | ( | const QString & | theEntry, |
| const int | theIndex | ||
| ) |
References GetEntrySeparator(), and theIndex.
| void GEOMGUI_AnnotationMgr::Redisplay | ( | const QString & | theEntry, |
| const int | theIndex, | ||
| const GEOMGUI_AnnotationAttrs::Properties & | theProperties | ||
| ) |
References Redisplay(), and theIndex.
| void GEOMGUI_AnnotationMgr::Redisplay | ( | const QString & | theEntry, |
| const int | theIndex, | ||
| const GEOMGUI_AnnotationAttrs::Properties & | theProperties, | ||
| SOCC_Viewer * | theView | ||
| ) |
| void GEOMGUI_AnnotationMgr::RemoveView | ( | SOCC_Viewer * | theView | ) |
References myVisualized, and theView.
| void GEOMGUI_AnnotationMgr::setDisplayedIndicesInfo | ( | const QString & | theEntry, |
| SOCC_Viewer * | theView, | ||
| const QString | theIndicesInfo | ||
| ) |
|
protected |
References getApplication(), GEOM::propertyName(), GEOM_Annotation::SetAutoHide(), GEOM_Annotation::SetDefaultZLayer(), GEOM_Annotation::SetDepthCulling(), GEOM_Annotation::SetFont(), GEOM_Annotation::SetLineColor(), GEOM_Annotation::SetLineStyle(), GEOM_Annotation::SetLineWidth(), GEOM_Annotation::SetTextColor(), GEOM_Annotation::SetTextHeight(), theView, GEOM::TopLevel, and viewOrActiveView().
| void GEOMGUI_AnnotationMgr::SetPreviewStyle | ( | const QString & | theEntry, |
| const int | theIndex, | ||
| const bool | theIsPreview | ||
| ) |
References getDisplayer(), Handle(), myVisualized, and theIndex.
| void GEOMGUI_AnnotationMgr::storeFixedPosition | ( | const QString & | theEntry, |
| SOCC_Viewer * | theView | ||
| ) |
References getApplication(), Handle(), myVisualized, theView, and viewOrActiveView().
|
protected |
References getApplication(), Handle(), myVisualized, theView, and viewOrActiveView().
| void GEOMGUI_AnnotationMgr::UpdateVisibleAnnotations | ( | const QString & | theEntry, |
| SOCC_Viewer * | theView = 0 |
||
| ) |
References GEOM_Client::get_client(), getDisplayer(), GeometryGUI::GetGeomGen(), getObject(), GEOM_Client::GetShape(), Handle(), myVisualized, setDisplayProperties(), GEOMGUI_AnnotationAttrs::SetupPresentation(), GEOMGUI_AnnotationAttrs::Properties::ShapeIndex, GEOMGUI_AnnotationAttrs::Properties::ShapeType, theView, and viewOrActiveView().
|
protected |
References getApplication(), and theView.
|
private |
|
private |
| const int GEOMGUI_AnnotationMgr::theIndex |
| const int SOCC_Viewer * GEOMGUI_AnnotationMgr::theView = 0 ) const |