#include <GLViewer_BaseObjects.h>

Public Member Functions | |
| GLViewer_MarkerSet (int number=1, float size=5.0, const QString &toolTip="GLMarker") | |
| A constructor. | |
| ~GLViewer_MarkerSet () | |
| A destructor. | |
| virtual void | compute () |
| virtual GLViewer_Drawer * | createDrawer () |
| virtual GLboolean | highlight (GLfloat x, GLfloat y, GLfloat tol=15.0, GLboolean isCircle=GL_FALSE) |
| virtual GLboolean | unhighlight () |
| virtual GLboolean | select (GLfloat x, GLfloat y, GLfloat tol, GLViewer_Rect rect, GLboolean isFull=GL_FALSE, GLboolean isCircle=GL_FALSE, GLboolean isShift=GL_FALSE) |
| virtual GLboolean | unselect () |
| virtual GLViewer_Rect * | getUpdateRect () |
| virtual void | moveObject (float, float, bool fromGroup=false) |
| virtual QByteArray | getByteCopy () |
| virtual bool | initializeFromByteCopy (QByteArray) |
| virtual bool | translateToPS (QFile &hFile, GLViewer_CoordSystem *aViewerCS, GLViewer_CoordSystem *aPSCS) |
| virtual bool | translateToHPGL (QFile &hFile, GLViewer_CoordSystem *aViewerCS, GLViewer_CoordSystem *aHPGLCS) |
| void | setXCoord (GLfloat *xCoord, int size) |
| Sets array of x coords of markers. | |
| void | setYCoord (GLfloat *yCoord, int size) |
| Sets array of y coords of markers. | |
| GLfloat * | getXCoord () const |
| Returns x coords. | |
| GLfloat * | getYCoord () const |
| Returns y coords. | |
| void | setNumMarkers (GLint) |
| Sets markers number. | |
| GLint | getNumMarkers () const |
| returns markers number | |
| void | setMarkerSize (const float size) |
| Sets merker radius. | |
| float | getMarkerSize () const |
| Returns merker radius. | |
| void | exportNumbers (QList< int > &high, QList< int > &unhigh, QList< int > &sel, QList< int > &unsel) |
| Export numbers of heghlighted/selected markers. | |
| QList< int > | getSelectedElements () |
| Returns selected numbers. | |
| bool | addOrRemoveSelected (int index) |
| Adds or remove selected number. | |
| void | addSelected (const TColStd_SequenceOfInteger &) |
| Adds selected numbers. | |
| void | setSelected (const TColStd_SequenceOfInteger &) |
| Sets selected nembers. | |
| virtual void | setDrawer (GLViewer_Drawer *theDrawer) |
| Installing already exist drawer with same type. | |
| GLViewer_Drawer * | getDrawer () const |
| Returns current drawer. | |
| 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_Rect * | getRect () const |
| Returns object rectungle. | |
| 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_Text * | getGLText () const |
| Returns object GLText. | |
| virtual void | setAspectLine (GLViewer_AspectLine *aspect) |
| Installs acpect line for object presentation. | |
| virtual GLViewer_AspectLine * | getAspectLine () 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 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. | |
| SUIT_DataOwner * | owner () const |
| void | setOwner (SUIT_DataOwner *owner) |
| void | setGroup (GLViewer_Group *theGroup) |
| Adds object to group theGroup. | |
| GLViewer_Group * | getGroup () const |
| Returns object group. | |
| virtual GLViewer_Object * | getOwner () |
| virtual bool | isSelectable () |
| Returns true if object can be selected. | |
| virtual bool | isScalable () |
Protected Attributes | |
| GLint | myNumber |
| GLfloat * | myXCoord |
| GLfloat * | myYCoord |
| GLfloat | myMarkerSize |
| QList< int > | myHNumbers |
| QList< int > | myUHNumbers |
| QList< int > | mySelNumbers |
| QList< int > | myCurSelNumbers |
| QList< int > | myUSelNumbers |
| QList< int > | myPrevHNumbers |
| TColStd_SequenceOfInteger | mySelectedIndexes |
| QString | myName |
| Object name. | |
| QString | myType |
| Object type. | |
| GLViewer_Rect * | myRect |
| Object base rect. | |
| GLViewer_Rect * | myUpdateRect |
| Update object rect (after some viewer transformations) | |
| GLViewer_Text * | myGLText |
| 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_Drawer * | myDrawer |
| Object drawer. | |
| GLViewer_AspectLine * | myAspectLine |
| Line aspect for object presentation. | |
| QString | myToolTipText |
| Objet tool tip text. | |
| bool | isToolTipHTML |
| HTML object tool tip status. | |
| bool | myIsVisible |
| Object visibke status. | |
| SUIT_DataOwner * | myOwner |
| GLViewer_Group * | myGroup |
| Object Group. | |
OpenGL MarkerSet
| GLViewer_MarkerSet::GLViewer_MarkerSet | ( | int | number = 1, |
| float | size = 5.0, |
||
| const QString & | toolTip = "GLMarker" |
||
| ) |
Constructor
References myCurSelNumbers, myHNumbers, myMarkerSize, myPrevHNumbers, mySelNumbers, GLViewer_Object.myToolTipText, GLViewer_Object.myType, myUHNumbers, myUSelNumbers, and setNumMarkers().
| void GLViewer_MarkerSet::compute | ( | ) | [virtual] |
Computes all necessary information about object for presentation in drawer
Implements GLViewer_Object.
References myNumber, GLViewer_Object.myRect, myXCoord, GLViewer_Object.myXGap, myYCoord, GLViewer_Object.myYGap, GLViewer_Rect.setBottom(), GLViewer_Rect.setLeft(), GLViewer_Rect.setRight(), and GLViewer_Rect.setTop().
| GLViewer_Drawer * GLViewer_MarkerSet::createDrawer | ( | ) | [virtual] |
| GLboolean GLViewer_MarkerSet::highlight | ( | GLfloat | x, |
| GLfloat | y, | ||
| GLfloat | tol = 15.0, |
||
| GLboolean | isCircle = GL_FALSE |
||
| ) | [virtual] |
Computes highlight presentation
| x | - x coord |
| y | - y coord |
| tol | - tolerance of detecting |
| isCircle | - true if sensitive area of detection is round |
Implements GLViewer_Object.
References isFound(), myCurSelNumbers, myHNumbers, GLViewer_Object.myIsHigh, GLViewer_Object.myIsVisible, myMarkerSize, myNumber, myPrevHNumbers, myUHNumbers, myXCoord, GLViewer_Object.myXScale, myYCoord, and GLViewer_Object.myYScale.
| GLboolean GLViewer_MarkerSet::unhighlight | ( | ) | [virtual] |
Unhilights object
Implements GLViewer_Object.
References myHNumbers, myPrevHNumbers, and myUHNumbers.
| GLboolean GLViewer_MarkerSet::select | ( | GLfloat | x, |
| GLfloat | y, | ||
| GLfloat | tol, | ||
| GLViewer_Rect | rect, | ||
| GLboolean | isFull = GL_FALSE, |
||
| GLboolean | isCircle = GL_FALSE, |
||
| GLboolean | isShift = GL_FALSE |
||
| ) | [virtual] |
Selects marker set /param x, y - co-ordinates of mouse /param tol - tolerance /param rect - rectangle (in case of rectangular selection) /param isFull - if it is true, then object may selected only if it lays whole in selection zone
| isCircle | - true if sensitive area of detection is round |
| isShift | - true if selection exec with append option |
Implements GLViewer_Object.
References isFound(), myCurSelNumbers, myHNumbers, GLViewer_Object.myIsSel, GLViewer_Object.myIsVisible, myMarkerSize, myNumber, mySelNumbers, myUHNumbers, myUSelNumbers, myXCoord, GLViewer_Object.myXScale, myYCoord, and GLViewer_Object.myYScale.
| GLboolean GLViewer_MarkerSet::unselect | ( | ) | [virtual] |
Unselects marker set
Implements GLViewer_Object.
References myCurSelNumbers, mySelNumbers, and myUSelNumbers.
| GLViewer_Rect * GLViewer_MarkerSet::getUpdateRect | ( | ) | [virtual] |
Implements GLViewer_Object.
References GLViewer_Rect.bottom(), GLViewer_Rect.left(), myMarkerSize, GLViewer_Object.myRect, GLViewer_Object.myXGap, GLViewer_Object.myXScale, GLViewer_Object.myYGap, GLViewer_Object.myYScale, GLViewer_Rect.right(), GLViewer_Rect.setBottom(), GLViewer_Rect.setLeft(), GLViewer_Rect.setRight(), GLViewer_Rect.setTop(), and GLViewer_Rect.top().
| void GLViewer_MarkerSet::moveObject | ( | float | theX, |
| float | theY, | ||
| bool | fromGroup = false |
||
| ) | [virtual] |
Moves object by recomputing
| dx | - moving along X coord |
| dy | - moving along Y coord |
| fromGroup | - is true if this method called from group |
Implements GLViewer_Object.
References compute(), GLViewer_Group.dragingObjects(), GLViewer_Object.myGroup, myNumber, myXCoord, and myYCoord.
| QByteArray GLViewer_MarkerSet::getByteCopy | ( | ) | [virtual] |
Codes marker set as byte copy
Reimplemented from GLViewer_Object.
References myMarkerSize, myNumber, myXCoord, and myYCoord.
| bool GLViewer_MarkerSet::initializeFromByteCopy | ( | QByteArray | theArray | ) | [virtual] |
Initialize marker set by byte array
| theArray | - byte array |
Reimplemented from GLViewer_Object.
References GLViewer_Object.initializeFromByteCopy(), myCurSelNumbers, myHNumbers, myMarkerSize, myNumber, myPrevHNumbers, mySelNumbers, GLViewer_Object.myType, myUHNumbers, myUSelNumbers, myXCoord, and myYCoord.
| bool GLViewer_MarkerSet::translateToPS | ( | QFile & | hFile, |
| GLViewer_CoordSystem * | aViewerCS, | ||
| GLViewer_CoordSystem * | aPSCS | ||
| ) | [virtual] |
Saves to file PostScript set of markers
| hFile | - file instance |
| aViewerCS | - viewer co-ordinates system |
| aPSCS | - paper co-ordinates system |
Implements GLViewer_Object.
References AddCoordsToPS(), AddLineAspectToPS(), GLViewer_Object.getAspectLine(), GLViewer_CoordSystem.getStretching(), myMarkerSize, myNumber, myXCoord, myYCoord, and PI.
| bool GLViewer_MarkerSet::translateToHPGL | ( | QFile & | hFile, |
| GLViewer_CoordSystem * | aViewerCS, | ||
| GLViewer_CoordSystem * | aHPGLCS | ||
| ) | [virtual] |
Saves to file HPGL set of markers
| hFile | - file instance |
| aViewerCS | - viewer co-ordinates system |
| aHPGLCS | - paper co-ordinates system |
Implements GLViewer_Object.
References AddCoordsToHPGL(), GLViewer_CoordSystem.getStretching(), myMarkerSize, myNumber, myXCoord, myYCoord, and PI.
| void GLViewer_MarkerSet::setXCoord | ( | GLfloat * | xCoord, |
| int | size | ||
| ) |
Sets array of x coords of points
| xCoord | - array of co-ordinates |
| size | - array size |
References myXCoord.
| void GLViewer_MarkerSet::setYCoord | ( | GLfloat * | yCoord, |
| int | size | ||
| ) |
Sets array of y coords of points
| yCoord | - array of co-ordinates |
| size | - array size |
References myYCoord.
| GLfloat* GLViewer_MarkerSet.getXCoord | ( | ) | const |
| GLfloat* GLViewer_MarkerSet.getYCoord | ( | ) | const |
| void GLViewer_MarkerSet::setNumMarkers | ( | GLint | number | ) |
| GLint GLViewer_MarkerSet.getNumMarkers | ( | ) | const |
| void GLViewer_MarkerSet.setMarkerSize | ( | const float | size | ) |
| float GLViewer_MarkerSet.getMarkerSize | ( | ) | const |
| void GLViewer_MarkerSet::exportNumbers | ( | QList< int > & | highlight, |
| QList< int > & | unhighlight, | ||
| QList< int > & | select, | ||
| QList< int > & | unselect | ||
| ) |
Export numbers of highlighted/selected lines
References myHNumbers, mySelNumbers, myUHNumbers, and myUSelNumbers.
| QList<int> GLViewer_MarkerSet.getSelectedElements | ( | ) |
| bool GLViewer_MarkerSet::addOrRemoveSelected | ( | int | index | ) |
Adds or remove selected number
| index | - selected index |
References mySelNumbers, and myUSelNumbers.
| void GLViewer_MarkerSet::addSelected | ( | const TColStd_SequenceOfInteger & | seq | ) |
| void GLViewer_MarkerSet::setSelected | ( | const TColStd_SequenceOfInteger & | seq | ) |
Sets some numbers as selected
| seq | - sequence of indices |
References mySelNumbers, and myUSelNumbers.
| virtual void GLViewer_Object.setDrawer | ( | GLViewer_Drawer * | theDrawer | ) | [virtual, inherited] |
Reimplemented in GLViewer_TextObject.
| GLViewer_Drawer* GLViewer_Object.getDrawer | ( | ) | const [inherited] |
| GLboolean GLViewer_Object::isInside | ( | GLViewer_Rect | theRect | ) | [virtual, inherited] |
| theRect | - rectangle |
References GLViewer_Object.myRect, and GLViewer_Rect.toQRect().
| virtual bool GLViewer_Object.portContains | ( | GLViewer_Pnt | ) | [virtual, inherited] |
| virtual bool GLViewer_Object.startPulling | ( | GLViewer_Pnt | ) | [virtual, inherited] |
| virtual void GLViewer_Object.pull | ( | GLViewer_Pnt | , |
| GLViewer_Object * | |||
| ) | [virtual, inherited] |
| virtual void GLViewer_Object.finishPulling | ( | ) | [virtual, inherited] |
| virtual bool GLViewer_Object.isPulling | ( | ) | [virtual, inherited] |
| virtual GLViewer_Rect GLViewer_Object.getPullingRect | ( | ) | const [virtual, inherited] |
| virtual void GLViewer_Object.setRect | ( | GLViewer_Rect * | rect | ) | [virtual, inherited] |
| virtual GLViewer_Rect* GLViewer_Object.getRect | ( | ) | const [virtual, inherited] |
| virtual void GLViewer_Object.setScale | ( | GLfloat | xScale, |
| GLfloat | yScale | ||
| ) | [virtual, inherited] |
| virtual void GLViewer_Object.getScale | ( | GLfloat & | xScale, |
| GLfloat & | yScale | ||
| ) | const [virtual, inherited] |
| GLboolean GLViewer_Object::setZoom | ( | GLfloat | zoom, |
| bool | recompute, | ||
| bool | fromGroup = false |
||
| ) | [virtual, inherited] |
Sets zoom factor
| zoom | - zoom factor |
References GLViewer_Object.myZoom.
| virtual GLfloat GLViewer_Object.getZoom | ( | ) | const [virtual, inherited] |
| GLboolean GLViewer_Object::updateZoom | ( | bool | zoomIn | ) | [virtual, inherited] |
Performs zoom change by step
| zoomIn | - to increase to decrease zoom |
References GLViewer_Object.myZoom, and GLViewer_Object.setZoom().
| virtual GLboolean GLViewer_Object.isHighlighted | ( | ) | const [virtual, inherited] |
| virtual GLboolean GLViewer_Object.isSelected | ( | ) | const [virtual, inherited] |
| virtual void GLViewer_Object.setSelected | ( | GLboolean | state | ) | [virtual, inherited] |
| void GLViewer_Object.setGLText | ( | GLViewer_Text * | glText | ) | [inherited] |
| GLViewer_Text* GLViewer_Object.getGLText | ( | ) | const [inherited] |
| virtual void GLViewer_Object.setAspectLine | ( | GLViewer_AspectLine * | aspect | ) | [virtual, inherited] |
| virtual GLViewer_AspectLine* GLViewer_Object.getAspectLine | ( | ) | const [virtual, inherited] |
| QString GLViewer_Object.getObjectType | ( | ) | const [inherited] |
Needs for GLViewer_Drawer
| void GLViewer_Object.setName | ( | QString | name | ) | [inherited] |
| QString GLViewer_Object.getName | ( | ) | const [inherited] |
| int GLViewer_Object::getPriority | ( | ) | const [virtual, inherited] |
References GLViewer_Drawer.getPriority(), and GLViewer_Object.myDrawer.
| virtual bool GLViewer_Object.finishMove | ( | ) | [virtual, inherited] |
| virtual bool GLViewer_Object.getVisible | ( | ) | const [virtual, inherited] |
| virtual void GLViewer_Object.setVisible | ( | bool | theStatus | ) | [virtual, inherited] |
| void GLViewer_Object.setToolTipText | ( | QString | str | ) | [inherited] |
| virtual QString GLViewer_Object.getToolTipText | ( | ) | [virtual, inherited] |
| bool GLViewer_Object.isTooTipHTML | ( | ) | const [inherited] |
| void GLViewer_Object.setToolTipFormat | ( | bool | isHTML | ) | [inherited] |
| SUIT_DataOwner* GLViewer_Object.owner | ( | ) | const [inherited] |
| void GLViewer_Object.setOwner | ( | SUIT_DataOwner * | owner | ) | [inherited] |
| void GLViewer_Object::setGroup | ( | GLViewer_Group * | theGroup | ) | [inherited] |
Sets object's group
| theGroup | - group |
References GLViewer_Group.addObject(), GLViewer_Object.myGroup, and GLViewer_Group.removeObject().
| GLViewer_Group * GLViewer_Object::getGroup | ( | ) | const [inherited] |
References GLViewer_Object.myGroup.
| virtual GLViewer_Object* GLViewer_Object.getOwner | ( | ) | [virtual, inherited] |
| virtual bool GLViewer_Object.isSelectable | ( | ) | [virtual, inherited] |
| virtual bool GLViewer_Object.isScalable | ( | ) | [virtual, inherited] |
GLint GLViewer_MarkerSet.myNumber [protected] |
GLfloat* GLViewer_MarkerSet.myXCoord [protected] |
GLfloat* GLViewer_MarkerSet.myYCoord [protected] |
GLfloat GLViewer_MarkerSet.myMarkerSize [protected] |
QList<int> GLViewer_MarkerSet.myHNumbers [protected] |
QList<int> GLViewer_MarkerSet.myUHNumbers [protected] |
QList<int> GLViewer_MarkerSet.mySelNumbers [protected] |
QList<int> GLViewer_MarkerSet.myCurSelNumbers [protected] |
QList<int> GLViewer_MarkerSet.myUSelNumbers [protected] |
QList<int> GLViewer_MarkerSet.myPrevHNumbers [protected] |
TColStd_SequenceOfInteger GLViewer_MarkerSet.mySelectedIndexes [protected] |
QString GLViewer_Object.myName [protected, inherited] |
QString GLViewer_Object.myType [protected, inherited] |
GLViewer_Rect* GLViewer_Object.myRect [protected, inherited] |
GLViewer_Rect* GLViewer_Object.myUpdateRect [protected, inherited] |
GLViewer_Text* GLViewer_Object.myGLText [protected, inherited] |
GLfloat GLViewer_Object.myXScale [protected, inherited] |
GLfloat GLViewer_Object.myYScale [protected, inherited] |
GLfloat GLViewer_Object.myXGap [protected, inherited] |
GLfloat GLViewer_Object.myYGap [protected, inherited] |
GLfloat GLViewer_Object.myZoom [protected, inherited] |
GLboolean GLViewer_Object.myIsHigh [protected, inherited] |
= true after right highlighting
GLboolean GLViewer_Object.myIsSel [protected, inherited] |
= true after right selection
GLViewer_Drawer* GLViewer_Object.myDrawer [protected, inherited] |
GLViewer_AspectLine* GLViewer_Object.myAspectLine [protected, inherited] |
QString GLViewer_Object.myToolTipText [protected, inherited] |
bool GLViewer_Object.isToolTipHTML [protected, inherited] |
= true if tool tip text contains HTML tags
bool GLViewer_Object.myIsVisible [protected, inherited] |
SUIT_DataOwner* GLViewer_Object.myOwner [protected, inherited] |
GLViewer_Group* GLViewer_Object.myGroup [protected, inherited] |