Version: 9.12.0
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()

GLViewer_Object::~GLViewer_Object ( )
virtual

A destructor.

Destructor

References myAspectLine, myGLText, myRect, and myUpdateRect.

Member Function Documentation

◆ compute()

virtual void GLViewer_Object::compute ( )
pure virtual

Main method. Computes all needed information about object for presentation in drawer.

Implemented in GLViewer_TextObject, GLViewer_Polyline, and GLViewer_MarkerSet.

◆ createDrawer()

virtual GLViewer_Drawer* GLViewer_Object::createDrawer ( )
pure virtual

Creates correspond drawer.

Implemented in GLViewer_TextObject, GLViewer_Polyline, and GLViewer_MarkerSet.

◆ finishMove()

virtual bool GLViewer_Object::finishMove ( )
inlinevirtual

Finaly recomputing object after moving.

◆ finishPulling()

virtual void GLViewer_Object::finishPulling ( )
inlinevirtual
Warning
It is for ouv

◆ getAspectLine()

virtual GLViewer_AspectLine* GLViewer_Object::getAspectLine ( ) const
inlinevirtual

Returns acpect line of object presentation.

◆ getByteCopy()

QByteArray GLViewer_Object::getByteCopy ( )
virtual

A function for coding object to the byte copy.

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

Codes object as byte copy

Returns
byte array

Reimplemented in GLViewer_TextObject, GLViewer_Polyline, and GLViewer_MarkerSet.

References GLViewer_Rect::bottom(), GLViewer_AspectLine::getByteCopy(), GLViewer_Text::getByteCopy(), GLViewer_Rect::left(), myAspectLine, myGLText, myOwner, myRect, myToolTipText, myType, myXGap, myXScale, myYGap, myYScale, GLViewer_Rect::right(), and GLViewer_Rect::top().

◆ getDrawer()

GLViewer_Drawer* GLViewer_Object::getDrawer ( ) const
inline

Returns current drawer.

◆ getGLText()

GLViewer_Text* GLViewer_Object::getGLText ( ) const
inline

Returns object GLText.

◆ getGroup()

GLViewer_Group * GLViewer_Object::getGroup ( ) const

Returns object group.

Returns
object's group

References myGroup.

◆ getName()

QString GLViewer_Object::getName ( ) const
inline

Returns object name.

◆ getObjectType()

QString GLViewer_Object::getObjectType ( ) const
inline

Returns object type.

Needs for GLViewer_Drawer

◆ getOwner()

virtual GLViewer_Object* GLViewer_Object::getOwner ( )
inlinevirtual
Warning
It is for ouv

◆ getPriority()

int GLViewer_Object::getPriority ( ) const
virtual

Returns object priority.

Returns
priority of object

References GLViewer_Drawer::getPriority(), and myDrawer.

◆ getPullingRect()

virtual GLViewer_Rect GLViewer_Object::getPullingRect ( ) const
inlinevirtual
Warning
It is for ouv

◆ getRect()

virtual GLViewer_Rect* GLViewer_Object::getRect ( ) const
inlinevirtual

Returns object rectungle.

◆ getScale()

virtual void GLViewer_Object::getScale ( GLfloat &  xScale,
GLfloat &  yScale 
) const
inlinevirtual

Returns scale factors.

◆ getToolTipText()

virtual QString GLViewer_Object::getToolTipText ( )
inlinevirtual

Returns onject tool tip text.

◆ getUpdateRect()

virtual GLViewer_Rect* GLViewer_Object::getUpdateRect ( )
pure virtual

Returns update object rectangle.

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

Implemented in GLViewer_TextObject, GLViewer_Polyline, and GLViewer_MarkerSet.

◆ getVisible()

virtual bool GLViewer_Object::getVisible ( ) const
inlinevirtual

Returns visible object status.

◆ getZoom()

virtual GLfloat GLViewer_Object::getZoom ( ) const
inlinevirtual
Warning
It is for ouv

◆ highlight()

virtual GLboolean GLViewer_Object::highlight ( GLfloat  x,
GLfloat  y,
GLfloat  tol,
GLboolean  isCircle = GL_FALSE 
)
pure virtual

Computes highlight presentation.

Parameters
x- x coord
y- y coord
tol- tolerance of detecting
isCircle- = true if sensitive area of detection is round

Implemented in GLViewer_Polyline, GLViewer_MarkerSet, and GLViewer_TextObject.

◆ initializeFromByteCopy()

bool GLViewer_Object::initializeFromByteCopy ( QByteArray  theArray)
virtual

A function for decoding object from the byte copy.

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_AspectLine::fromByteCopy(), GLViewer_Text::fromByteCopy(), GLViewer_AspectLine::getByteCopy(), GLViewer_Text::getByteCopy(), myAspectLine, myGLText, myIsHigh, myIsSel, myIsVisible, myRect, myToolTipText, myType, myXGap, myXScale, myYGap, and myYScale.

◆ isHighlighted()

virtual GLboolean GLViewer_Object::isHighlighted ( ) const
inlinevirtual

Returns true if object is highlighted.

◆ isInside()

GLboolean GLViewer_Object::isInside ( GLViewer_Rect  theRect)
virtual

Returns if theRect inside object.

Returns
true if object is inside rectangle
Parameters
theRect- rectangle

References myRect, and GLViewer_Rect::toQRect().

◆ isPulling()

virtual bool GLViewer_Object::isPulling ( )
inlinevirtual
Warning
It is for ouv

◆ isScalable()

virtual bool GLViewer_Object::isScalable ( )
inlinevirtual
Warning
It is for ouv

◆ isSelectable()

virtual bool GLViewer_Object::isSelectable ( )
inlinevirtual

Returns true if object can be selected.

◆ isSelected()

virtual GLboolean GLViewer_Object::isSelected ( ) const
inlinevirtual

Returns true if object is selected.

◆ isTooTipHTML()

bool GLViewer_Object::isTooTipHTML ( ) const
inline

Returns true if tool tip contains HTML tags.

◆ moveObject()

virtual void GLViewer_Object::moveObject ( float  dx,
float  dy,
bool  fromGroup = false 
)
pure virtual

Moves object per by recomputing.

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.

◆ owner()

SUIT_DataOwner* GLViewer_Object::owner ( ) const
inline
Warning
It is for ouv

◆ portContains()

virtual bool GLViewer_Object::portContains ( GLViewer_Pnt  )
inlinevirtual
Warning
It is for ouv

◆ pull()

virtual void GLViewer_Object::pull ( GLViewer_Pnt  ,
GLViewer_Object  
)
inlinevirtual
Warning
It is for ouv

◆ select()

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

Computes select presentation.

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.

◆ setAspectLine()

virtual void GLViewer_Object::setAspectLine ( GLViewer_AspectLine aspect)
inlinevirtual

Installs acpect line for object presentation.

◆ setDrawer()

virtual void GLViewer_Object::setDrawer ( GLViewer_Drawer theDrawer)
inlinevirtual

Installing already exist drawer with same type.

Reimplemented in GLViewer_TextObject.

◆ setGLText()

void GLViewer_Object::setGLText ( GLViewer_Text glText)
inline

Installs GLText to object.

◆ setGroup()

void GLViewer_Object::setGroup ( GLViewer_Group theGroup)

Adds object to group theGroup.

Sets object's group

Parameters
theGroup- group

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

◆ setName()

void GLViewer_Object::setName ( QString  name)
inline

Installs object name.

◆ setOwner()

void GLViewer_Object::setOwner ( SUIT_DataOwner owner)
inline
Warning
It is for ouv

◆ setRect()

virtual void GLViewer_Object::setRect ( GLViewer_Rect rect)
inlinevirtual

Installs object rectangle.

◆ setScale()

virtual void GLViewer_Object::setScale ( GLfloat  xScale,
GLfloat  yScale 
)
inlinevirtual

Installs scale factors.

◆ setSelected()

virtual void GLViewer_Object::setSelected ( GLboolean  state)
inlinevirtual

Installs select status to object.

◆ setToolTipFormat()

void GLViewer_Object::setToolTipFormat ( bool  isHTML)
inline

Installs tool tip supporting of HTML tags.

◆ setToolTipText()

void GLViewer_Object::setToolTipText ( QString  str)
inline

Installs onject tool tip text.

◆ setVisible()

virtual void GLViewer_Object::setVisible ( bool  theStatus)
inlinevirtual

Installs visible object status.

◆ setZoom()

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.

◆ startPulling()

virtual bool GLViewer_Object::startPulling ( GLViewer_Pnt  )
inlinevirtual
Warning
It is for ouv

◆ translateToHPGL()

virtual bool GLViewer_Object::translateToHPGL ( QFile hFile,
GLViewer_CoordSystem aViewerCS,
GLViewer_CoordSystem aHPGLCS 
)
pure virtual

A function translate object in to HPGL file on disk.

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.

◆ translateToPS()

virtual bool GLViewer_Object::translateToPS ( QFile hFile,
GLViewer_CoordSystem aViewerCS,
GLViewer_CoordSystem aPSCS 
)
pure virtual

A function translate object in to PostScript file on disk.

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.

◆ unhighlight()

virtual GLboolean GLViewer_Object::unhighlight ( )
pure virtual

Clears all highlight information.

Implemented in GLViewer_TextObject, GLViewer_Polyline, and GLViewer_MarkerSet.

◆ unselect()

virtual GLboolean GLViewer_Object::unselect ( )
pure virtual

Clears all select information.

Implemented in GLViewer_TextObject, GLViewer_Polyline, and GLViewer_MarkerSet.

◆ updateZoom()

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

◆ isToolTipHTML

bool GLViewer_Object::isToolTipHTML
protected

HTML object tool tip status.

= true if tool tip text contains HTML tags

◆ myAspectLine

GLViewer_AspectLine* GLViewer_Object::myAspectLine
protected

Line aspect for object presentation.

◆ myDrawer

GLViewer_Drawer* GLViewer_Object::myDrawer
protected

Object drawer.

◆ myGLText

GLViewer_Text* GLViewer_Object::myGLText
protected

Object GLText.

◆ myGroup

GLViewer_Group* GLViewer_Object::myGroup
protected

Object Group.

◆ myIsHigh

GLboolean GLViewer_Object::myIsHigh
protected

Highlight status.

= true after right highlighting

◆ myIsSel

GLboolean GLViewer_Object::myIsSel
protected

Selectt status.

= true after right selection

◆ myIsVisible

bool GLViewer_Object::myIsVisible
protected

Object visibke status.

◆ myName

QString GLViewer_Object::myName
protected

Object name.

◆ myOwner

SUIT_DataOwner* GLViewer_Object::myOwner
protected
Warning
It is for ouv

◆ myRect

GLViewer_Rect* GLViewer_Object::myRect
protected

Object base rect.

◆ myToolTipText

QString GLViewer_Object::myToolTipText
protected

Objet tool tip text.

◆ myType

QString GLViewer_Object::myType
protected

Object type.

◆ myUpdateRect

GLViewer_Rect* GLViewer_Object::myUpdateRect
protected

Update object rect (after some viewer transformations)

◆ myXGap

GLfloat GLViewer_Object::myXGap
protected

Gap for X direction of rect.

◆ myXScale

GLfloat GLViewer_Object::myXScale
protected

X scale factor.

◆ myYGap

GLfloat GLViewer_Object::myYGap
protected

Gap for Y direction of rect.

◆ myYScale

GLfloat GLViewer_Object::myYScale
protected

Y scale factor.

◆ myZoom

GLfloat GLViewer_Object::myZoom
protected
Warning
It is for ouv

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