Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
GLViewer_Object Class Referenceabstract

#include <GLViewer_Object.h>

Inheritance diagram for GLViewer_Object:
Inheritance graph

Public Member Functions

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

Protected Attributes

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

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 bool GLViewer_Object::finishMove ( )
inlinevirtual
virtual void GLViewer_Object::finishPulling ( )
inlinevirtual
Warning
It is for ouv
virtual GLViewer_AspectLine* GLViewer_Object::getAspectLine ( ) const
inlinevirtual
QByteArray GLViewer_Object::getByteCopy ( )
virtual
GLViewer_Drawer* GLViewer_Object::getDrawer ( ) const
inline
GLViewer_Text* GLViewer_Object::getGLText ( ) const
inline
GLViewer_Group * GLViewer_Object::getGroup ( ) const
Returns
object's group

References myGroup.

QString GLViewer_Object::getName ( ) const
inline

References myName.

QString GLViewer_Object::getObjectType ( ) const
inline

Needs for GLViewer_Drawer

virtual GLViewer_Object* GLViewer_Object::getOwner ( )
inlinevirtual
Warning
It is for ouv
int GLViewer_Object::getPriority ( ) const
virtual
Returns
priority of object

References GLViewer_Drawer::getPriority(), and myDrawer.

virtual GLViewer_Rect GLViewer_Object::getPullingRect ( ) const
inlinevirtual
Warning
It is for ouv
virtual GLViewer_Rect* GLViewer_Object::getRect ( ) const
inlinevirtual
virtual void GLViewer_Object::getScale ( GLfloat &  xScale,
GLfloat &  yScale 
) const
inlinevirtual
virtual QString GLViewer_Object::getToolTipText ( )
inlinevirtual
virtual GLViewer_Rect* GLViewer_Object::getUpdateRect ( )
pure virtual

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

Implemented in GLViewer_TextObject, GLViewer_Polyline, and GLViewer_MarkerSet.

virtual bool GLViewer_Object::getVisible ( ) const
inlinevirtual
virtual GLfloat GLViewer_Object::getZoom ( ) const
inlinevirtual
Warning
It is for ouv
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_TextObject, GLViewer_Polyline, and GLViewer_MarkerSet.

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_TextObject, GLViewer_Polyline, and GLViewer_MarkerSet.

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

virtual GLboolean GLViewer_Object::isHighlighted ( ) const
inlinevirtual
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::isPulling ( )
inlinevirtual
Warning
It is for ouv
virtual bool GLViewer_Object::isScalable ( )
inlinevirtual
Warning
It is for ouv
virtual bool GLViewer_Object::isSelectable ( )
inlinevirtual
virtual GLboolean GLViewer_Object::isSelected ( ) const
inlinevirtual
bool GLViewer_Object::isTooTipHTML ( ) const
inline
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_TextObject, GLViewer_Polyline, and GLViewer_MarkerSet.

SUIT_DataOwner* GLViewer_Object::owner ( ) const
inline
Warning
It is for ouv
virtual bool GLViewer_Object::portContains ( GLViewer_Pnt  )
inlinevirtual
Warning
It is for ouv
virtual void GLViewer_Object::pull ( GLViewer_Pnt  ,
GLViewer_Object  
)
inlinevirtual
Warning
It is for ouv
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_TextObject, GLViewer_Polyline, and GLViewer_MarkerSet.

virtual void GLViewer_Object::setAspectLine ( GLViewer_AspectLine aspect)
inlinevirtual
virtual void GLViewer_Object::setDrawer ( GLViewer_Drawer theDrawer)
inlinevirtual

Reimplemented in GLViewer_TextObject.

void GLViewer_Object::setGLText ( GLViewer_Text glText)
inline
void GLViewer_Object::setGroup ( GLViewer_Group theGroup)

Sets object's group

Parameters
theGroup- group

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

void GLViewer_Object::setName ( QString  name)
inline

References myName.

void GLViewer_Object::setOwner ( SUIT_DataOwner owner)
inline
Warning
It is for ouv
virtual void GLViewer_Object::setRect ( GLViewer_Rect rect)
inlinevirtual
virtual void GLViewer_Object::setScale ( GLfloat  xScale,
GLfloat  yScale 
)
inlinevirtual
virtual void GLViewer_Object::setSelected ( GLboolean  state)
inlinevirtual
void GLViewer_Object::setToolTipFormat ( bool  isHTML)
inline
void GLViewer_Object::setToolTipText ( QString  str)
inline
virtual void GLViewer_Object::setVisible ( bool  theStatus)
inlinevirtual
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 bool GLViewer_Object::startPulling ( GLViewer_Pnt  )
inlinevirtual
Warning
It is for ouv
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_TextObject, GLViewer_Polyline, and GLViewer_MarkerSet.

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_TextObject, GLViewer_Polyline, and GLViewer_MarkerSet.

virtual GLboolean GLViewer_Object::unhighlight ( )
pure virtual
virtual GLboolean GLViewer_Object::unselect ( )
pure virtual
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().

Member Data Documentation

bool GLViewer_Object::isToolTipHTML
protected

= true if tool tip text contains HTML tags

GLViewer_AspectLine* GLViewer_Object::myAspectLine
protected
GLViewer_Drawer* GLViewer_Object::myDrawer
protected
GLViewer_Text* GLViewer_Object::myGLText
protected
GLViewer_Group* GLViewer_Object::myGroup
protected
GLboolean GLViewer_Object::myIsHigh
protected

= true after right highlighting

GLboolean GLViewer_Object::myIsSel
protected

= true after right selection

bool GLViewer_Object::myIsVisible
protected
QString GLViewer_Object::myName
protected
SUIT_DataOwner* GLViewer_Object::myOwner
protected
Warning
It is for ouv
GLViewer_Rect* GLViewer_Object::myRect
protected
QString GLViewer_Object::myToolTipText
protected
QString GLViewer_Object::myType
protected
GLViewer_Rect* GLViewer_Object::myUpdateRect
protected
GLfloat GLViewer_Object::myXGap
protected
GLfloat GLViewer_Object::myXScale
protected
GLfloat GLViewer_Object::myYGap
protected
GLfloat GLViewer_Object::myYScale
protected
GLfloat GLViewer_Object::myZoom
protected
Warning
It is for ouv

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