Version: 9.12.0
GEOMGUI_AnnotationAttrs Class Reference

Attribute-style helper tool to manage shape annotation data of an object.

#include <GEOMGUI_AnnotationAttrs.h>

Inheritance diagram for GEOMGUI_AnnotationAttrs:
Inheritance graph

Classes

struct  Properties
 

Public Member Functions

 DEFINE_STANDARD_RTTIEXT (GEOMGUI_AnnotationAttrs, Standard_Transient) GEOMGUI_EXPORT static Handle(GEOMGUI_AnnotationAttrs) FindAttributes(const _PTR(SObject) &theObject)
 Find annotation data defined for an object. More...
 
GEOMGUI_EXPORT QString ExportAsPropertyString () const
 Exports annotation records as a property string. More...
 
GEOMGUI_EXPORT void ImportFromPropertyString (const QString &theString)
 Imports annotation records from a property string. More...
 
GEOMGUI_EXPORT void SetupPresentation (const Handle(GEOM_Annotation)&thePresentation, const int theIndex, const gp_Ax3 &theShapeLCS)
 Setup parameters of the annotation presentation with the properties of a definition. More...
 
GEOMGUI_EXPORT void SetNbAnnotation (const int theCount) const
 Changes count of annotation definitions stored on the object. More...
 
GEOMGUI_EXPORT int GetNbAnnotation () const
 Returns number of annotation definitions stored on the object. More...
 
GEOMGUI_EXPORT void SetIsVisible (const int theIndex, const bool theIsVisible)
 Sets application visibility state of an annotation definition. More...
 
GEOMGUI_EXPORT bool GetIsVisible (const int theIndex) const
 Returns application visibility state of an annotation definition. More...
 
GEOMGUI_EXPORT void SetText (const int theIndex, const QString &theText)
 Sets annotation label's text. More...
 
GEOMGUI_EXPORT QString GetText (const int theIndex) const
 Returns annotation label's text. More...
 
GEOMGUI_EXPORT void SetIsScreenFixed (const int theIndex, const bool theIsScreenFixed)
 Sets screen fixed flag of the annotation definition. More...
 
GEOMGUI_EXPORT bool GetIsScreenFixed (const int theIndex) const
 Returns screen fixed flag of the annotation definition. More...
 
GEOMGUI_EXPORT void SetPosition (const int theIndex, const gp_Pnt &thePosition)
 Sets position of the annotation definition. More...
 
GEOMGUI_EXPORT gp_Pnt GetPosition (const int theIndex) const
 Returns position of the annotation definition. More...
 
GEOMGUI_EXPORT void SetAttach (const int theIndex, const gp_Pnt &theAttach)
 Sets attach point of the annotation definition. More...
 
GEOMGUI_EXPORT gp_Pnt GetAttach (const int theIndex) const
 Returns attach point of the annotation definition. More...
 
GEOMGUI_EXPORT void SetShapeSel (const int theIndex, const int theShapeType, const int theSubIdx)
 Sets shape selection arguments. More...
 
GEOMGUI_EXPORT void GetShapeSel (const int theIndex, int &theShapeType, int &theSubIdx) const
 Returns shape selection arguments. More...
 
GEOMGUI_EXPORT void Append (const Properties &theProps)
 Appends new annotation definition with the given properties. More...
 
GEOMGUI_EXPORT void Append (const Properties &theProps, const gp_Ax3 &theShapeLCS)
 Appends new annotation definition with the given properties and converts position and attachment points to the given shape's local frame of reference. More...
 
GEOMGUI_EXPORT void Remove (const Standard_Integer theIndex)
 Removes annotation definition by the given index. More...
 
GEOMGUI_EXPORT void SetProperties (const int theIndex, const Properties &theProps)
 Sets complete properties of an annotation definition. More...
 
GEOMGUI_EXPORT void SetProperties (const int theIndex, const Properties &theProps, const gp_Ax3 &theShapeLCS)
 Sets complete properties of an annotation definition with converting position and attachment points to the given shape's local frame of reference. More...
 
GEOMGUI_EXPORT void GetProperties (const int theIndex, Properties &theProps) const
 Returns complete properties of an annotation definition. More...
 

Static Public Member Functions

static GEOMGUI_EXPORT Handle (GEOMGUI_AnnotationAttrs) FindOrCreateAttributes(const _PTR(SObject) &theObject
 Find or create annotation data fields for an object. More...
 
static GEOMGUI_EXPORT void Remove (const _PTR(SObject)&theObject)
 Remove annotation data fields for an object. More...
 
static GEOMGUI_EXPORT void SetupPresentation (const Handle(GEOM_Annotation)&thePresentation, const Properties &theProps, const gp_Ax3 &theShapeLCS)
 Setup parameters of the annotation presentation with the properties given. More...
 

Public Attributes

static GEOMGUI_EXPORT SalomeApp_Study * theStudy
 

Private Member Functions

 GEOMGUI_AnnotationAttrs (const _PTR(SObject)&theObject, const _PTR(AttributeParameter)&theParameter)
 
 GEOMGUI_AnnotationAttrs (const GEOMGUI_AnnotationAttrs &)
 
void operator= (const GEOMGUI_AnnotationAttrs &)
 
 _PTR (SObject) myObj
 
 _PTR (AttributeParameter) myParameterMap
 

Constructor & Destructor Documentation

◆ GEOMGUI_AnnotationAttrs() [1/2]

GEOMGUI_AnnotationAttrs::GEOMGUI_AnnotationAttrs ( const _PTR(SObject)&  theObject,
const _PTR(AttributeParameter)&  theParameter 
)
inlineprivate

◆ GEOMGUI_AnnotationAttrs() [2/2]

GEOMGUI_AnnotationAttrs::GEOMGUI_AnnotationAttrs ( const GEOMGUI_AnnotationAttrs )
private

Member Function Documentation

◆ _PTR() [1/2]

GEOMGUI_AnnotationAttrs::_PTR ( AttributeParameter  )
private

◆ _PTR() [2/2]

GEOMGUI_AnnotationAttrs::_PTR ( SObject  )
private

◆ Append() [1/2]

void GEOMGUI_AnnotationAttrs::Append ( const Properties theProps)

◆ Append() [2/2]

void GEOMGUI_AnnotationAttrs::Append ( const Properties theProps,
const gp_Ax3 &  theShapeLCS 
)
Parameters
theShapeLCS[in] the position of shape's local frame of reference with respect to the world frame of reference.

References GetNbAnnotation(), SetNbAnnotation(), and SetProperties().

◆ DEFINE_STANDARD_RTTIEXT()

GEOMGUI_AnnotationAttrs::DEFINE_STANDARD_RTTIEXT ( GEOMGUI_AnnotationAttrs  ,
Standard_Transient   
) const &

◆ ExportAsPropertyString()

◆ GetAttach()

gp_Pnt GEOMGUI_AnnotationAttrs::GetAttach ( const int  theIndex) const

◆ GetIsScreenFixed()

bool GEOMGUI_AnnotationAttrs::GetIsScreenFixed ( const int  theIndex) const

◆ GetIsVisible()

bool GEOMGUI_AnnotationAttrs::GetIsVisible ( const int  theIndex) const

◆ GetNbAnnotation()

int GEOMGUI_AnnotationAttrs::GetNbAnnotation ( ) const

◆ GetPosition()

gp_Pnt GEOMGUI_AnnotationAttrs::GetPosition ( const int  theIndex) const

◆ GetProperties()

◆ GetShapeSel()

void GEOMGUI_AnnotationAttrs::GetShapeSel ( const int  theIndex,
int &  theShapeType,
int &  theSubIdx 
) const
Parameters
theIndex[in] the index of the annotation definition.
theShapeType,theSubIdx[out] the type of the selected shape and the sub-shape index.

◆ GetText()

QString GEOMGUI_AnnotationAttrs::GetText ( const int  theIndex) const

◆ Handle()

static GEOMGUI_EXPORT GEOMGUI_AnnotationAttrs::Handle ( GEOMGUI_AnnotationAttrs  ) const &
static

◆ ImportFromPropertyString()

◆ operator=()

void GEOMGUI_AnnotationAttrs::operator= ( const GEOMGUI_AnnotationAttrs )
private

◆ Remove() [1/2]

void GEOMGUI_AnnotationAttrs::Remove ( const _PTR(SObject)&  theObject)
static

References _PTR().

◆ Remove() [2/2]

void GEOMGUI_AnnotationAttrs::Remove ( const Standard_Integer  theIndex)

This methods performs iterative reindexing of elements starting from the given index, so sequential removal should be performed from the last element, or avoided at all.

References Append(), GetNbAnnotation(), GetProperties(), and SetNbAnnotation().

◆ SetAttach()

void GEOMGUI_AnnotationAttrs::SetAttach ( const int  theIndex,
const gp_Pnt &  theAttach 
)
Parameters
theIndex[in] the index of the annotation definition.
theAttach[in] the attach point of the annotation.

◆ SetIsScreenFixed()

void GEOMGUI_AnnotationAttrs::SetIsScreenFixed ( const int  theIndex,
const bool  theIsScreenFixed 
)
Parameters
theIndex[in] the index of the annotation definition.
theIsScreenFixed[in] the presentation flag.

◆ SetIsVisible()

void GEOMGUI_AnnotationAttrs::SetIsVisible ( const int  theIndex,
const bool  theIsVisible 
)
Parameters
theIndex[in] the index of the annotation definition.
theIsVisible[in] the visibility state.

◆ SetNbAnnotation()

void GEOMGUI_AnnotationAttrs::SetNbAnnotation ( const int  theCount) const

If the count is decreased the extra annotation definitions are cleared out from the attribute.

Parameters
theNumber[in] the new number of annotation definitions.

References GetNbAnnotation().

◆ SetPosition()

void GEOMGUI_AnnotationAttrs::SetPosition ( const int  theIndex,
const gp_Pnt &  thePosition 
)
Parameters
theIndex[in] the index of the annotation definition.
thePosition[in] the position of the annotation label.

◆ SetProperties() [1/2]

void GEOMGUI_AnnotationAttrs::SetProperties ( const int  theIndex,
const Properties theProps 
)
Parameters
theIndex[in] the index of the annotation definition.
theProps[in] the structure containing the properties.

◆ SetProperties() [2/2]

void GEOMGUI_AnnotationAttrs::SetProperties ( const int  theIndex,
const Properties theProps,
const gp_Ax3 &  theShapeLCS 
)
Parameters
theIndex[in] the index of the annotation definition.
theProps[in] the structure containing the properties.
theShapeLCS[in] the position of shape's local frame of reference with respect to the world frame of reference.

References GEOMGUI_AnnotationAttrs::Properties::Attach, GEOMGUI_AnnotationAttrs::Properties::IsScreenFixed, GEOMGUI_AnnotationAttrs::Properties::IsVisible, GEOMGUI_AnnotationAttrs::Properties::Position, SetAttach(), SetIsScreenFixed(), SetIsVisible(), SetPosition(), SetShapeSel(), SetText(), GEOMGUI_AnnotationAttrs::Properties::ShapeIndex, GEOMGUI_AnnotationAttrs::Properties::ShapeType, and GEOMGUI_AnnotationAttrs::Properties::Text.

◆ SetShapeSel()

void GEOMGUI_AnnotationAttrs::SetShapeSel ( const int  theIndex,
const int  theShapeType,
const int  theSubIdx 
)
Parameters
theIndex[in] the index of the annotation definition.
theShapeType,theSubIdx[in] the type of the selected shape and the sub-shape index.

◆ SetText()

void GEOMGUI_AnnotationAttrs::SetText ( const int  theIndex,
const QString &  theText 
)
Parameters
theIndex[in] the index of the annotation definition.
theText[in] the text string.

◆ SetupPresentation() [1/2]

void GEOMGUI_AnnotationAttrs::SetupPresentation ( const Handle(GEOM_Annotation)&  thePresentation,
const int  theIndex,
const gp_Ax3 &  theShapeLCS 
)
Parameters
thePresentation[in] the presentation to setup.
theIndex[in] the index of the annotation definition.
theShapeLCS[in] the local coordinate system of the shape.

References GetProperties(), and SetupPresentation().

◆ SetupPresentation() [2/2]

void GEOMGUI_AnnotationAttrs::SetupPresentation ( const Handle(GEOM_Annotation)&  thePresentation,
const Properties theProps,
const gp_Ax3 &  theShapeLCS 
)
static

Member Data Documentation

◆ theStudy

GEOMGUI_EXPORT SalomeApp_Study* GEOMGUI_AnnotationAttrs::theStudy

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