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

#include <GLViewer_BaseObjects.h>

Inheritance diagram for GLViewer_MarkerSet:
Inheritance graph

Public Member Functions

 GLViewer_MarkerSet (int number=1, float size=5.0, const QString &toolTip="GLMarker")
 A constructor. More...
 
 ~GLViewer_MarkerSet ()
 A destructor. More...
 
virtual void compute ()
 
virtual GLViewer_DrawercreateDrawer ()
 
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_RectgetUpdateRect ()
 
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. More...
 
void setYCoord (GLfloat *yCoord, int size)
 Sets array of y coords of markers. More...
 
GLfloat * getXCoord () const
 Returns x coords. More...
 
GLfloat * getYCoord () const
 Returns y coords. More...
 
void setNumMarkers (GLint)
 Sets markers number. More...
 
GLint getNumMarkers () const
 returns markers number More...
 
void setMarkerSize (const float size)
 Sets merker radius. More...
 
float getMarkerSize () const
 Returns merker radius. More...
 
void exportNumbers (QList< int > &high, QList< int > &unhigh, QList< int > &sel, QList< int > &unsel)
 Export numbers of heghlighted/selected markers. More...
 
QList< int > getSelectedElements ()
 Returns selected numbers. More...
 
bool addOrRemoveSelected (int index)
 Adds or remove selected number. More...
 
void addSelected (const TColStd_SequenceOfInteger &)
 Adds selected numbers. More...
 
void setSelected (const TColStd_SequenceOfInteger &)
 Sets selected nembers. More...
 
- Public Member Functions inherited from GLViewer_Object
 GLViewer_Object ()
 A constructor. More...
 
virtual ~GLViewer_Object ()
 A destructor. More...
 
virtual void setDrawer (GLViewer_Drawer *theDrawer)
 Installing already exist drawer with same type. More...
 
GLViewer_DrawergetDrawer () const
 Returns current drawer. 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 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 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...
 
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

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
 
- Protected Attributes inherited from GLViewer_Object
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

OpenGL MarkerSet

Constructor & Destructor Documentation

GLViewer_MarkerSet::GLViewer_MarkerSet ( int  number = 1,
float  size = 5.0,
const QString &  toolTip = "GLMarker" 
)
GLViewer_MarkerSet::~GLViewer_MarkerSet ( )

Destructor

References myXCoord, and myYCoord.

Member Function Documentation

bool GLViewer_MarkerSet::addOrRemoveSelected ( int  index)

Adds or remove selected number

Parameters
index- selected index

References mySelNumbers, and myUSelNumbers.

void GLViewer_MarkerSet::addSelected ( const TColStd_SequenceOfInteger &  seq)

Adds some selected numbers

Parameters
seq- sequence of indices

References mySelNumbers.

void GLViewer_MarkerSet::compute ( )
virtual
GLViewer_Drawer * GLViewer_MarkerSet::createDrawer ( )
virtual

Creates corresponding drawer

Implements GLViewer_Object.

References GLViewer_Object::myDrawer.

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.

QByteArray GLViewer_MarkerSet::getByteCopy ( )
virtual

Codes marker set as byte copy

Returns
byte array

Reimplemented from GLViewer_Object.

References GLViewer_Object::getByteCopy(), myMarkerSize, myNumber, myXCoord, and myYCoord.

float GLViewer_MarkerSet::getMarkerSize ( ) const
inline
GLint GLViewer_MarkerSet::getNumMarkers ( ) const
inline
QList<int> GLViewer_MarkerSet::getSelectedElements ( )
inline
GLfloat* GLViewer_MarkerSet::getXCoord ( ) const
inline
GLfloat* GLViewer_MarkerSet::getYCoord ( ) const
inline
GLboolean GLViewer_MarkerSet::highlight ( GLfloat  x,
GLfloat  y,
GLfloat  tol = 15.0,
GLboolean  isCircle = GL_FALSE 
)
virtual

Computes highlight presentation

Parameters
x- x coord
y- y coord
tol- tolerance of detecting
isCircle- true if sensitive area of detection is round
Returns
true if highlight status is changed

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.

bool GLViewer_MarkerSet::initializeFromByteCopy ( QByteArray  theArray)
virtual

Initialize marker set by byte array

Parameters
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.

void GLViewer_MarkerSet::moveObject ( float  theX,
float  theY,
bool  fromGroup = false 
)
virtual

Moves object by recomputing

Parameters
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.

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

Parameters
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.

void GLViewer_MarkerSet::setMarkerSize ( const float  size)
inline
void GLViewer_MarkerSet::setNumMarkers ( GLint  number)

Sets number of markers

Parameters
number- new number of markers

References myNumber, myXCoord, and myYCoord.

void GLViewer_MarkerSet::setSelected ( const TColStd_SequenceOfInteger &  seq)

Sets some numbers as selected

Parameters
seq- sequence of indices

References mySelNumbers, and myUSelNumbers.

void GLViewer_MarkerSet::setXCoord ( GLfloat *  xCoord,
int  size 
)

Sets array of x coords of points

Parameters
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

Parameters
yCoord- array of co-ordinates
size- array size

References myYCoord.

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

Saves to file HPGL set of markers

Parameters
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.

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

Saves to file PostScript set of markers

Parameters
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.

GLboolean GLViewer_MarkerSet::unhighlight ( )
virtual

Unhilights object

Implements GLViewer_Object.

References myHNumbers, myPrevHNumbers, and myUHNumbers.

GLboolean GLViewer_MarkerSet::unselect ( )
virtual

Unselects marker set

Implements GLViewer_Object.

References myCurSelNumbers, mySelNumbers, and myUSelNumbers.

Member Data Documentation

QList<int> GLViewer_MarkerSet::myCurSelNumbers
protected
QList<int> GLViewer_MarkerSet::myHNumbers
protected
GLfloat GLViewer_MarkerSet::myMarkerSize
protected
GLint GLViewer_MarkerSet::myNumber
protected
QList<int> GLViewer_MarkerSet::myPrevHNumbers
protected
TColStd_SequenceOfInteger GLViewer_MarkerSet::mySelectedIndexes
protected
QList<int> GLViewer_MarkerSet::mySelNumbers
protected
QList<int> GLViewer_MarkerSet::myUHNumbers
protected
QList<int> GLViewer_MarkerSet::myUSelNumbers
protected
GLfloat* GLViewer_MarkerSet::myXCoord
protected
GLfloat* GLViewer_MarkerSet::myYCoord
protected

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