Version: 6.3.1
Public Member Functions | Protected Attributes

GLViewer_Object Class Reference

#include <GLViewer_Object.h>

Inheritance diagram for GLViewer_Object:
Inheritance graph

Public Member Functions

 GLViewer_Object ()
 A constructor.
virtual ~GLViewer_Object ()
 A destructor.
virtual void compute ()=0
 Main method. Computes all needed information about object for presentation in drawer.
virtual GLViewer_DrawercreateDrawer ()=0
 Creates correspond drawer.
virtual void setDrawer (GLViewer_Drawer *theDrawer)
 Installing already exist drawer with same type.
GLViewer_DrawergetDrawer () const
 Returns current drawer.
virtual GLboolean highlight (GLfloat x, GLfloat y, GLfloat tol, GLboolean isCircle=GL_FALSE)=0
 Computes highlight presentation.
virtual GLboolean unhighlight ()=0
 Clears all highlight information.
virtual GLboolean select (GLfloat x, GLfloat y, GLfloat tol, GLViewer_Rect rect, GLboolean isFull=GL_FALSE, GLboolean isCircle=GL_FALSE, GLboolean isShift=GL_FALSE)=0
 Computes select presentation.
virtual GLboolean unselect ()=0
 Clears all select information.
virtual GLboolean isInside (GLViewer_Rect theRect)
 Returns if theRect inside object.
virtual bool portContains (GLViewer_Pnt)
virtual bool startPulling (GLViewer_Pnt)
virtual void pull (GLViewer_Pnt, GLViewer_Object *)
virtual void finishPulling ()
virtual bool isPulling ()
virtual GLViewer_Rect getPullingRect () const
virtual void setRect (GLViewer_Rect *rect)
 Installs object rectangle.
virtual GLViewer_RectgetRect () const
 Returns object rectungle.
virtual GLViewer_RectgetUpdateRect ()=0
 Returns update object rectangle.
virtual void setScale (GLfloat xScale, GLfloat yScale)
 Installs scale factors.
virtual void getScale (GLfloat &xScale, GLfloat &yScale) const
 Returns scale factors.
virtual GLboolean setZoom (GLfloat zoom, bool recompute, bool fromGroup=false)
virtual GLfloat getZoom () const
virtual GLboolean updateZoom (bool zoomIn)
virtual GLboolean isHighlighted () const
 Returns true if object is highlighted.
virtual GLboolean isSelected () const
 Returns true if object is selected.
virtual void setSelected (GLboolean state)
 Installs select status to object.
void setGLText (GLViewer_Text *glText)
 Installs GLText to object.
GLViewer_TextgetGLText () const
 Returns object GLText.
virtual void setAspectLine (GLViewer_AspectLine *aspect)
 Installs acpect line for object presentation.
virtual GLViewer_AspectLinegetAspectLine () const
 Returns acpect line of object presentation.
QString getObjectType () const
 Returns object type.
void setName (QString name)
 Installs object name.
QString getName () const
 Returns object name.
virtual int getPriority () const
 Returns object priority.
virtual void moveObject (float dx, float dy, bool fromGroup=false)=0
 Moves object per by recomputing.
virtual bool finishMove ()
 Finaly recomputing object after moving.
virtual bool getVisible () const
 Returns visible object status.
virtual void setVisible (bool theStatus)
 Installs visible object status.
void setToolTipText (QString str)
 Installs onject tool tip text.
virtual QString getToolTipText ()
 Returns onject tool tip text.
bool isTooTipHTML () const
 Returns true if tool tip contains HTML tags.
void setToolTipFormat (bool isHTML)
 Installs tool tip supporting of HTML tags.
virtual QByteArray getByteCopy ()
 A function for coding object to the byte copy.
virtual bool initializeFromByteCopy (QByteArray)
 A function for decoding object from the byte copy.
virtual bool translateToPS (QFile &hFile, GLViewer_CoordSystem *aViewerCS, GLViewer_CoordSystem *aPSCS)=0
 A function translate object in to PostScript file on disk.
virtual bool translateToHPGL (QFile &hFile, GLViewer_CoordSystem *aViewerCS, GLViewer_CoordSystem *aHPGLCS)=0
 A function translate object in to HPGL file on disk.
SUIT_DataOwnerowner () const
void setOwner (SUIT_DataOwner *owner)
void setGroup (GLViewer_Group *theGroup)
 Adds object to group theGroup.
GLViewer_GroupgetGroup () const
 Returns object group.
virtual GLViewer_ObjectgetOwner ()
virtual bool isSelectable ()
 Returns true if object can be selected.
virtual bool isScalable ()

Protected Attributes

QString myName
 Object name.
QString myType
 Object type.
GLViewer_RectmyRect
 Object base rect.
GLViewer_RectmyUpdateRect
 Update object rect (after some viewer transformations)
GLViewer_TextmyGLText
 Object GLText.
GLfloat myXScale
 X scale factor.
GLfloat myYScale
 Y scale factor.
GLfloat myXGap
 Gap for X direction of rect.
GLfloat myYGap
 Gap for Y direction of rect.
GLfloat myZoom
GLboolean myIsHigh
 Highlight status.
GLboolean myIsSel
 Selectt status.
GLViewer_DrawermyDrawer
 Object drawer.
GLViewer_AspectLinemyAspectLine
 Line aspect for object presentation.
QString myToolTipText
 Objet tool tip text.
bool isToolTipHTML
 HTML object tool tip status.
bool myIsVisible
 Object visibke status.
SUIT_DataOwnermyOwner
GLViewer_GroupmyGroup
 Object Group.

Detailed Description

Class GLViewer_Object Base Object for all GLViewer objects

Base Viewer for GLViewer


Constructor & Destructor Documentation

GLViewer_Object::GLViewer_Object ( )
GLViewer_Object::~GLViewer_Object ( ) [virtual]

Destructor

References myAspectLine, myGLText, myRect, and myUpdateRect.


Member Function Documentation

virtual void GLViewer_Object.compute ( ) [pure virtual]
virtual GLViewer_Drawer* GLViewer_Object.createDrawer ( ) [pure virtual]
virtual void GLViewer_Object.setDrawer ( GLViewer_Drawer theDrawer) [virtual]

Reimplemented in GLViewer_TextObject.

GLViewer_Drawer* GLViewer_Object.getDrawer ( ) const
virtual GLboolean GLViewer_Object.highlight ( GLfloat  x,
GLfloat  y,
GLfloat  tol,
GLboolean  isCircle = GL_FALSE 
) [pure virtual]
Parameters:
x- x coord
y- y coord
tol- tolerance of detecting
isCircle- = true if sensitive area of detection is round

Implemented in GLViewer_MarkerSet, GLViewer_Polyline, and GLViewer_TextObject.

virtual GLboolean GLViewer_Object.unhighlight ( ) [pure virtual]
virtual GLboolean GLViewer_Object.select ( GLfloat  x,
GLfloat  y,
GLfloat  tol,
GLViewer_Rect  rect,
GLboolean  isFull = GL_FALSE,
GLboolean  isCircle = GL_FALSE,
GLboolean  isShift = GL_FALSE 
) [pure virtual]
Parameters:
x- x coord
y- y coord
tol- tolerance of detecting
rect- Non empty for rectangle selection
isFull- = true if
isCircle- = true if sensitive area of detection is round
isShift- = true if selection exec with append option

Implemented in GLViewer_MarkerSet, GLViewer_Polyline, and GLViewer_TextObject.

virtual GLboolean GLViewer_Object.unselect ( ) [pure virtual]
GLboolean GLViewer_Object::isInside ( GLViewer_Rect  theRect) [virtual]
Returns:
true if object is inside rectangle
Parameters:
theRect- rectangle

References myRect, and GLViewer_Rect.toQRect().

virtual bool GLViewer_Object.portContains ( GLViewer_Pnt  ) [virtual]
Warning:
It is for ouv
virtual bool GLViewer_Object.startPulling ( GLViewer_Pnt  ) [virtual]
Warning:
It is for ouv
virtual void GLViewer_Object.pull ( GLViewer_Pnt  ,
GLViewer_Object  
) [virtual]
Warning:
It is for ouv
virtual void GLViewer_Object.finishPulling ( ) [virtual]
Warning:
It is for ouv
virtual bool GLViewer_Object.isPulling ( ) [virtual]
Warning:
It is for ouv
virtual GLViewer_Rect GLViewer_Object.getPullingRect ( ) const [virtual]
Warning:
It is for ouv
virtual void GLViewer_Object.setRect ( GLViewer_Rect rect) [virtual]
virtual GLViewer_Rect* GLViewer_Object.getRect ( ) const [virtual]
virtual GLViewer_Rect* GLViewer_Object.getUpdateRect ( ) [pure virtual]

Does not equal getRect() if object have a persistence to some viewer transformations

Implemented in GLViewer_MarkerSet, GLViewer_Polyline, and GLViewer_TextObject.

virtual void GLViewer_Object.setScale ( GLfloat  xScale,
GLfloat  yScale 
) [virtual]
virtual void GLViewer_Object.getScale ( GLfloat &  xScale,
GLfloat &  yScale 
) const [virtual]
GLboolean GLViewer_Object::setZoom ( GLfloat  zoom,
bool  recompute,
bool  fromGroup = false 
) [virtual]
Warning:
It is for ouv

Sets zoom factor

Parameters:
zoom- zoom factor

References myZoom.

virtual GLfloat GLViewer_Object.getZoom ( ) const [virtual]
Warning:
It is for ouv
GLboolean GLViewer_Object::updateZoom ( bool  zoomIn) [virtual]
Warning:
It is for ouv

Performs zoom change by step

Parameters:
zoomIn- to increase to decrease zoom

References myZoom, and setZoom().

virtual GLboolean GLViewer_Object.isHighlighted ( ) const [virtual]
virtual GLboolean GLViewer_Object.isSelected ( ) const [virtual]
virtual void GLViewer_Object.setSelected ( GLboolean  state) [virtual]
void GLViewer_Object.setGLText ( GLViewer_Text glText)
GLViewer_Text* GLViewer_Object.getGLText ( ) const
virtual void GLViewer_Object.setAspectLine ( GLViewer_AspectLine aspect) [virtual]
virtual GLViewer_AspectLine* GLViewer_Object.getAspectLine ( ) const [virtual]
QString GLViewer_Object.getObjectType ( ) const

Needs for GLViewer_Drawer

void GLViewer_Object.setName ( QString  name)
QString GLViewer_Object.getName ( ) const
int GLViewer_Object::getPriority ( ) const [virtual]
Returns:
priority of object

References GLViewer_Drawer.getPriority(), and myDrawer.

virtual void GLViewer_Object.moveObject ( float  dx,
float  dy,
bool  fromGroup = false 
) [pure virtual]
Parameters:
dx- moving along X coord
dy- moving along Y coord
fromGroup- = true if this method called from group

Implemented in GLViewer_MarkerSet, GLViewer_Polyline, and GLViewer_TextObject.

virtual bool GLViewer_Object.finishMove ( ) [virtual]
virtual bool GLViewer_Object.getVisible ( ) const [virtual]
virtual void GLViewer_Object.setVisible ( bool  theStatus) [virtual]
void GLViewer_Object.setToolTipText ( QString  str)
virtual QString GLViewer_Object.getToolTipText ( ) [virtual]
bool GLViewer_Object.isTooTipHTML ( ) const
void GLViewer_Object.setToolTipFormat ( bool  isHTML)
QByteArray GLViewer_Object::getByteCopy ( ) [virtual]
bool GLViewer_Object::initializeFromByteCopy ( QByteArray  theArray) [virtual]

A function is used for copy-past technollogy in past method

Initialize object by byte array

Parameters:
theArray- byte array

Reimplemented in GLViewer_MarkerSet, GLViewer_Polyline, and GLViewer_TextObject.

References GLViewer_Text.fromByteCopy(), GLViewer_AspectLine.fromByteCopy(), GLViewer_AspectLine.getByteCopy(), GLViewer_Text.getByteCopy(), myAspectLine, myGLText, myIsHigh, myIsSel, myIsVisible, myRect, myToolTipText, myType, myXGap, myXScale, myYGap, and myYScale.

virtual bool GLViewer_Object.translateToPS ( QFile &  hFile,
GLViewer_CoordSystem aViewerCS,
GLViewer_CoordSystem aPSCS 
) [pure virtual]
Parameters:
hFilethe name of PostScript file chosen by user
aViewerCSthe GLViewer_CoordSystem of window
aPSCSthe GLViewer_CoordSystem of PostScript page

Implemented in GLViewer_MarkerSet, GLViewer_Polyline, and GLViewer_TextObject.

virtual bool GLViewer_Object.translateToHPGL ( QFile &  hFile,
GLViewer_CoordSystem aViewerCS,
GLViewer_CoordSystem aHPGLCS 
) [pure virtual]
Parameters:
hFilethe name of PostScript file chosen by user
aViewerCSthe GLViewer_CoordSystem of window
aHPGLCSthe GLViewer_CoordSystem of PostScript page

Implemented in GLViewer_MarkerSet, GLViewer_Polyline, and GLViewer_TextObject.

SUIT_DataOwner* GLViewer_Object.owner ( ) const
Warning:
It is for ouv
void GLViewer_Object.setOwner ( SUIT_DataOwner owner)
Warning:
It is for ouv
void GLViewer_Object::setGroup ( GLViewer_Group theGroup)

Sets object's group

Parameters:
theGroup- group

References GLViewer_Group.addObject(), myGroup, and GLViewer_Group.removeObject().

GLViewer_Group * GLViewer_Object::getGroup ( ) const
Returns:
object's group

References myGroup.

virtual GLViewer_Object* GLViewer_Object.getOwner ( ) [virtual]
Warning:
It is for ouv
virtual bool GLViewer_Object.isSelectable ( ) [virtual]
virtual bool GLViewer_Object.isScalable ( ) [virtual]
Warning:
It is for ouv

Field Documentation

QString GLViewer_Object.myName [protected]
QString GLViewer_Object.myType [protected]
GLfloat GLViewer_Object.myXScale [protected]
GLfloat GLViewer_Object.myYScale [protected]
GLfloat GLViewer_Object.myXGap [protected]
GLfloat GLViewer_Object.myYGap [protected]
GLfloat GLViewer_Object.myZoom [protected]
Warning:
It is for ouv
GLboolean GLViewer_Object.myIsHigh [protected]

= true after right highlighting

GLboolean GLViewer_Object.myIsSel [protected]

= true after right selection

QString GLViewer_Object.myToolTipText [protected]

= true if tool tip text contains HTML tags

bool GLViewer_Object.myIsVisible [protected]
Warning:
It is for ouv
Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS