A help class to process visualizatin 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 anIO, aPrs, aView, GEOM_Client::get_client(), getEntry(), GeometryGUI::GetGeomGen(), GEOM_Client::GetShape(), Handle(), GEOMGUI_AnnotationAttrs::Properties::IsScreenFixed, NULL, setDisplayProperties(), GEOMGUI_AnnotationAttrs::SetupPresentation(), GEOMGUI_AnnotationAttrs::Properties::ShapeIndex, GEOMGUI_AnnotationAttrs::Properties::ShapeType, 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(), and Handle().
void GEOMGUI_AnnotationMgr::Erase | ( | const QString & | theEntry, |
const int | theIndex, | ||
SOCC_Viewer * | theView = 0 , |
||
const bool | isUpdateViewer = true |
||
) |
References anAnnotationToPrs, anEntryToAnnotation, aPrs, aView, getDisplayer(), myVisualized, storeVisibleState(), theIndex, and viewOrActiveView().
void GEOMGUI_AnnotationMgr::EraseAllAnnotations | ( | SOCC_Viewer * | theView = 0 | ) |
void GEOMGUI_AnnotationMgr::EraseRemovedAnnotation | ( | const QString & | theEntry, |
const int | theIndex | ||
) |
References anAnnotationToPrs, anEntryToAnnotation, aPrs, aView, getDisplayer(), and myVisualized.
void GEOMGUI_AnnotationMgr::EraseVisibleAnnotations | ( | const QString & | theEntry, |
SOCC_Viewer * | theView = 0 , |
||
const bool | isUpdateViewer = true |
||
) |
References anAnnotationToPrs, anEntryToAnnotation, aPrs, aView, getApplication(), getDisplayer(), Handle(), myVisualized, and viewOrActiveView().
int GEOMGUI_AnnotationMgr::FindAnnotationIndex | ( | Handle(SALOME_InteractiveObject) | theIO, |
SOCC_Viewer * | theView = 0 |
||
) |
References anAnnotationToPrs, anEntryToAnnotation, anIOs, anIter(), anOCCPrs, aPrs, aView, Handle(), myVisualized, and viewOrActiveView().
|
inlineprotected |
QString GEOMGUI_AnnotationMgr::getDisplayedIndicesInfo | ( | const QString & | theEntry, |
SOCC_Viewer * | theView | ||
) | const |
References anIndices, getApplication(), Handle(), and IsDisplayed().
|
protected |
References getApplication().
|
protected |
|
static |
bool GEOMGUI_AnnotationMgr::getIndexFromEntry | ( | const QString & | theEntry, |
QString & | theObjEntry, | ||
int & | theIndex | ||
) |
References GetEntrySeparator().
|
protected |
|
protected |
References GeometryGUI::ClientSObjectToObject(), getApplication(), and Handle().
GEOMGUI_AnnotationMgr::Handle | ( | SALOME_InteractiveObject | ) | const |
|
protected |
|
inline |
bool GEOMGUI_AnnotationMgr::IsDisplayed | ( | const QString & | theEntry, |
const int | theIndex, | ||
SOCC_Viewer * | theView = 0 |
||
) | const |
References anAnnotationToPrs, anEntryToAnnotation, aView, myVisualized, and viewOrActiveView().
QString GEOMGUI_AnnotationMgr::makeAnnotationEntry | ( | const QString & | theEntry, |
const int | theIndex | ||
) |
References GetEntrySeparator().
void GEOMGUI_AnnotationMgr::Redisplay | ( | const QString & | theEntry, |
const int | theIndex, | ||
const GEOMGUI_AnnotationAttrs::Properties & | theProperties | ||
) |
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.
void GEOMGUI_AnnotationMgr::setDisplayedIndicesInfo | ( | const QString & | theEntry, |
SOCC_Viewer * | theView, | ||
const QString | theIndicesInfo | ||
) |
|
protected |
References aFont, aView, 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(), GEOM::TopLevel, and viewOrActiveView().
void GEOMGUI_AnnotationMgr::SetPreviewStyle | ( | const QString & | theEntry, |
const int | theIndex, | ||
const bool | theIsPreview | ||
) |
References getDisplayer(), Handle(), and myVisualized.
void GEOMGUI_AnnotationMgr::storeFixedPosition | ( | const QString & | theEntry, |
SOCC_Viewer * | theView | ||
) |
References anAnnotationToPrs, anEntryToAnnotation, aPrs, aView, getApplication(), Handle(), myVisualized, and viewOrActiveView().
|
protected |
References anAnnotationToPrs, anEntryToAnnotation, aView, getApplication(), Handle(), myVisualized, and viewOrActiveView().
void GEOMGUI_AnnotationMgr::UpdateVisibleAnnotations | ( | const QString & | theEntry, |
SOCC_Viewer * | theView = 0 |
||
) |
References anAnnotationToPrs, anEntryToAnnotation, aPrs, aView, 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, and viewOrActiveView().
|
protected |
References aView, getApplication(), and theView.
|
private |
|
private |
const int GEOMGUI_AnnotationMgr::theIndex |
const int SOCC_Viewer * GEOMGUI_AnnotationMgr::theView = 0 ) const |