#include <GLViewer_Object.h>

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_Drawer * | createDrawer ()=0 |
| Creates correspond drawer. More... | |
| virtual void | setDrawer (GLViewer_Drawer *theDrawer) |
| Installing already exist drawer with same type. More... | |
| GLViewer_Drawer * | getDrawer () 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_Rect * | getRect () const |
| Returns object rectungle. More... | |
| virtual GLViewer_Rect * | getUpdateRect ()=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_Text * | getGLText () const |
| Returns object GLText. More... | |
| virtual void | setAspectLine (GLViewer_AspectLine *aspect) |
| Installs acpect line for object presentation. More... | |
| virtual GLViewer_AspectLine * | getAspectLine () 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_DataOwner * | owner () const |
| void | setOwner (SUIT_DataOwner *owner) |
| void | setGroup (GLViewer_Group *theGroup) |
| Adds object to group theGroup. More... | |
| GLViewer_Group * | getGroup () const |
| Returns object group. More... | |
| virtual GLViewer_Object * | getOwner () |
| 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_Rect * | myRect |
| Object base rect. More... | |
| GLViewer_Rect * | myUpdateRect |
| Update object rect (after some viewer transformations) More... | |
| GLViewer_Text * | myGLText |
| 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_Drawer * | myDrawer |
| Object drawer. More... | |
| GLViewer_AspectLine * | myAspectLine |
| 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_DataOwner * | myOwner |
| GLViewer_Group * | myGroup |
| Object Group. More... | |
Class GLViewer_Object Base Object for all GLViewer objects
Base Viewer for GLViewer
| GLViewer_Object::GLViewer_Object | ( | ) |
A constructor.
Default constructor
References isToolTipHTML, myAspectLine, myDrawer, myGLText, myGroup, myIsHigh, myIsSel, myIsVisible, myOwner, myRect, myType, myUpdateRect, myXGap, myXScale, myYGap, myYScale, and myZoom.
|
virtual |
|
pure virtual |
Main method. Computes all needed information about object for presentation in drawer.
Implemented in GLViewer_TextObject, GLViewer_Polyline, and GLViewer_MarkerSet.
|
pure virtual |
Creates correspond drawer.
Implemented in GLViewer_TextObject, GLViewer_Polyline, and GLViewer_MarkerSet.
|
inlinevirtual |
Finaly recomputing object after moving.
|
inlinevirtual |
|
inlinevirtual |
Returns acpect line of object presentation.
|
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
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().
|
inline |
Returns current drawer.
|
inline |
Returns object GLText.
| GLViewer_Group * GLViewer_Object::getGroup | ( | ) | const |
|
inline |
Returns object name.
|
inline |
Returns object type.
Needs for GLViewer_Drawer
|
inlinevirtual |
|
virtual |
Returns object priority.
References GLViewer_Drawer::getPriority(), and myDrawer.
|
inlinevirtual |
|
inlinevirtual |
Returns object rectungle.
|
inlinevirtual |
Returns scale factors.
|
inlinevirtual |
Returns onject tool tip text.
|
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.
|
inlinevirtual |
Returns visible object status.
|
inlinevirtual |
|
pure virtual |
Computes highlight presentation.
| 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.
|
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
| 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.
|
inlinevirtual |
Returns true if object is highlighted.
|
virtual |
Returns if theRect inside object.
| theRect | - rectangle |
References myRect, and GLViewer_Rect::toQRect().
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
Returns true if object can be selected.
|
inlinevirtual |
Returns true if object is selected.
|
inline |
Returns true if tool tip contains HTML tags.
|
pure virtual |
Moves object per by recomputing.
| 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.
|
inline |
|
inlinevirtual |
|
inlinevirtual |
|
pure virtual |
Computes select presentation.
| 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.
|
inlinevirtual |
Installs acpect line for object presentation.
|
inlinevirtual |
Installing already exist drawer with same type.
Reimplemented in GLViewer_TextObject.
|
inline |
Installs GLText to object.
| void GLViewer_Object::setGroup | ( | GLViewer_Group * | theGroup | ) |
Adds object to group theGroup.
Sets object's group
| theGroup | - group |
References GLViewer_Group::addObject(), myGroup, and GLViewer_Group::removeObject().
|
inline |
Installs object name.
|
inline |
|
inlinevirtual |
Installs object rectangle.
|
inlinevirtual |
Installs scale factors.
|
inlinevirtual |
Installs select status to object.
|
inline |
Installs tool tip supporting of HTML tags.
|
inline |
Installs onject tool tip text.
|
inlinevirtual |
Installs visible object status.
|
virtual |
|
inlinevirtual |
|
pure virtual |
A function translate object in to HPGL file on disk.
| hFile | the name of PostScript file chosen by user |
| aViewerCS | the GLViewer_CoordSystem of window |
| aHPGLCS | the GLViewer_CoordSystem of PostScript page |
Implemented in GLViewer_TextObject, GLViewer_Polyline, and GLViewer_MarkerSet.
|
pure virtual |
A function translate object in to PostScript file on disk.
| hFile | the name of PostScript file chosen by user |
| aViewerCS | the GLViewer_CoordSystem of window |
| aPSCS | the GLViewer_CoordSystem of PostScript page |
Implemented in GLViewer_TextObject, GLViewer_Polyline, and GLViewer_MarkerSet.
|
pure virtual |
Clears all highlight information.
Implemented in GLViewer_TextObject, GLViewer_Polyline, and GLViewer_MarkerSet.
|
pure virtual |
Clears all select information.
Implemented in GLViewer_TextObject, GLViewer_Polyline, and GLViewer_MarkerSet.
|
virtual |
|
protected |
HTML object tool tip status.
= true if tool tip text contains HTML tags
|
protected |
Line aspect for object presentation.
|
protected |
Object drawer.
|
protected |
Object GLText.
|
protected |
Object Group.
|
protected |
Highlight status.
= true after right highlighting
|
protected |
Selectt status.
= true after right selection
|
protected |
Object visibke status.
|
protected |
Object name.
|
protected |
|
protected |
Object base rect.
|
protected |
Objet tool tip text.
|
protected |
Object type.
|
protected |
Update object rect (after some viewer transformations)
|
protected |
Gap for X direction of rect.
|
protected |
X scale factor.
|
protected |
Gap for Y direction of rect.
|
protected |
Y scale factor.
|
protected |