Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
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) static Handle(GEOMGUI_AnnotationAttrs) FindAttributes(const _PTR(SObject)&theObject)
 Find annotation data defined for an object. More...
 
QString ExportAsPropertyString () const
 Exports annotation records as a property string. More...
 
void ImportFromPropertyString (const QString &theString)
 Imports annotation records from a property string. More...
 
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...
 
void SetNbAnnotation (const int theCount) const
 Changes count of annotation definitions stored on the object. More...
 
int GetNbAnnotation () const
 Returns number of annotation definitions stored on the object. More...
 
void SetIsVisible (const int theIndex, const bool theIsVisible)
 Sets application visibility state of an annotation definition. More...
 
bool GetIsVisible (const int theIndex) const
 Returns applicationb visibility state of an annotaion definition. More...
 
void SetText (const int theIndex, const QString &theText)
 Sets annotation label's text. More...
 
QString GetText (const int theIndex) const
 Returns annotation label's text. More...
 
void SetIsScreenFixed (const int theIndex, const bool theIsScreenFixed)
 Sets screen fixed flag of the annotation definition. More...
 
bool GetIsScreenFixed (const int theIndex) const
 Returns screen fixed flag of the annotation definition. More...
 
void SetPosition (const int theIndex, const gp_Pnt &thePosition)
 Sets position of the annotation definition. More...
 
gp_Pnt GetPosition (const int theIndex) const
 Returns position of the annotation definition. More...
 
void SetAttach (const int theIndex, const gp_Pnt &theAttach)
 Sets attach point of the annotation definition. More...
 
gp_Pnt GetAttach (const int theIndex) const
 Returns attach point of the annotation definition. More...
 
void SetShapeSel (const int theIndex, const int theShapeType, const int theSubIdx)
 Sets shape selection arguments. More...
 
void GetShapeSel (const int theIndex, int &theShapeType, int &theSubIdx) const
 Returns shape selection arguments. More...
 
void Append (const Properties &theProps)
 Appends new annotation definition with the given properties. More...
 
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...
 
void Remove (const Standard_Integer theIndex)
 Removes annotation definition by the given index. More...
 
void SetProperties (const int theIndex, const Properties &theProps)
 Sets complete properties of an annotation definition. More...
 
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...
 
void GetProperties (const int theIndex, Properties &theProps) const
 Returns complete properties of an annotation definition. More...
 

Static Public Member Functions

static Handle (GEOMGUI_AnnotationAttrs) FindOrCreateAttributes(const _PTR(SObject)&theObject
 Find or create annotation data fields for an object. More...
 
static void Remove (const _PTR(SObject)&theObject)
 Remove annotation data fields for an object. More...
 
static 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 SalomeApp_Study * theStudy
 

Private Member Functions

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

Constructor & Destructor Documentation

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

Member Function Documentation

GEOMGUI_AnnotationAttrs::_PTR ( SObject  )
private
GEOMGUI_AnnotationAttrs::_PTR ( AttributeParameter  )
private
void GEOMGUI_AnnotationAttrs::Append ( const Properties theProps)
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().

GEOMGUI_AnnotationAttrs::DEFINE_STANDARD_RTTIEXT ( GEOMGUI_AnnotationAttrs  ,
Standard_Transient   
) const
gp_Pnt GEOMGUI_AnnotationAttrs::GetAttach ( const int  theIndex) const
bool GEOMGUI_AnnotationAttrs::GetIsScreenFixed ( const int  theIndex) const
bool GEOMGUI_AnnotationAttrs::GetIsVisible ( const int  theIndex) const
int GEOMGUI_AnnotationAttrs::GetNbAnnotation ( ) const
gp_Pnt GEOMGUI_AnnotationAttrs::GetPosition ( const int  theIndex) const
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.
QString GEOMGUI_AnnotationAttrs::GetText ( const int  theIndex) const
static GEOMGUI_AnnotationAttrs::Handle ( GEOMGUI_AnnotationAttrs  ) const
static
void GEOMGUI_AnnotationAttrs::operator= ( const GEOMGUI_AnnotationAttrs theOther)
inlineprivate
void GEOMGUI_AnnotationAttrs::Remove ( const _PTR(SObject)&  theObject)
static

References _PTR().

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().

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.
void GEOMGUI_AnnotationAttrs::SetIsScreenFixed ( const int  theIndex,
const bool  theIsScreenFixed 
)
Parameters
theIndex[in] the index of the annotation definition.
theIsScreenFixed[in] the presentation flag.
void GEOMGUI_AnnotationAttrs::SetIsVisible ( const int  theIndex,
const bool  theIsVisible 
)
Parameters
theIndex[in] the index of the annotation definition.
theIsVisible[in] the visibility state.
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().

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.
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.
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.

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.
void GEOMGUI_AnnotationAttrs::SetText ( const int  theIndex,
const QString &  theText 
)
Parameters
theIndex[in] the index of the annotation definition.
theText[in] the text string.
void GEOMGUI_AnnotationAttrs::SetupPresentation ( const Handle(GEOM_Annotation)&  thePresentation,
const Properties theProps,
const gp_Ax3 &  theShapeLCS 
)
static
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().

Member Data Documentation

SalomeApp_Study* GEOMGUI_AnnotationAttrs::theStudy

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