Version: 6.3.1
Public Member Functions | Static Public Member Functions | Protected Attributes

GLViewer_AspectLine Class Reference

Class for manage of presentations in GLViewer. More...

#include <GLViewer_AspectLine.h>

Public Member Functions

 GLViewer_AspectLine ()
 A default constructor.
 GLViewer_AspectLine (int theType, float theWidth)
 A conctructor by type and width of line.
 ~GLViewer_AspectLine ()
 A destructor.
void setLineColors (QColor nc=Qt::black, QColor hc=Qt::cyan, QColor sc=Qt::red)
 A function for installing the line colors.
int setLineWidth (const float theWidth)
 A function for installing the line width.
int setLineType (const int theType)
 A function for installing the line type.
void getLineColors (QColor &theNC, QColor &theHC, QColor &theSC) const
 A function for getting line colors information.
float getLineWidth () const
 A function for getting information about line width.
int getLineType () const
 A function for getting information about line type.
QByteArray getByteCopy () const
 A function for coding object to the byte copy.

Static Public Member Functions

static GLViewer_AspectLinefromByteCopy (QByteArray)
 A function for decoding object from the byte copy.

Protected Attributes

QColor myNColor
 A normal color.
QColor myHColor
 A highlight color.
QColor mySColor
 A select color.
float myLineWidth
 A line width.
int myLineType
 A line type.

Detailed Description

GLViewer_AspectLine Substitution of Prs2d_AspectLine for OpenGL


Constructor & Destructor Documentation

GLViewer_AspectLine::GLViewer_AspectLine ( )

Default constructor

References myHColor, myLineType, myLineWidth, myNColor, and mySColor.

GLViewer_AspectLine::GLViewer_AspectLine ( int  type,
float  width 
)
Parameters:
theTypeequals 0 for normal line and 1 for strip line
theWidthis a width of new line

Constructor

Parameters:
type,:0 for normal line and 1 for strip line
width- width of line

References myHColor, myLineType, myLineWidth, myNColor, and mySColor.

GLViewer_AspectLine::~GLViewer_AspectLine ( )

Destructor


Member Function Documentation

void GLViewer_AspectLine::setLineColors ( QColor  nc = Qt::black,
QColor  hc = Qt::cyan,
QColor  sc = Qt::red 
)
Parameters:
ncis normal color
hcis highlight color
scis select color

Sets line color

Parameters:
nc- normal color
hc- hilighting color
sc- selection color

References myHColor, myNColor, and mySColor.

int GLViewer_AspectLine::setLineWidth ( const float  width)

Sets width of line

Parameters:
width- new width of line

References myLineWidth.

int GLViewer_AspectLine::setLineType ( const int  type)
Parameters:
theTypeequals 0 for normal line and 1 for strip line

Sets type of line

Parameters:
type,:0 for normal line and 1 for strip line

References myLineType.

void GLViewer_AspectLine::getLineColors ( QColor &  nc,
QColor &  hc,
QColor &  sc 
) const
Parameters:
theNCis normal color
theHCis highlight color
theSCis select color
Returns:
colors of line
Parameters:
nc- variable for normal color
hc- variable for hilighting color
sc- variable for selection color

References myHColor, myNColor, and mySColor.

float GLViewer_AspectLine.getLineWidth ( ) const
int GLViewer_AspectLine.getLineType ( ) const
QByteArray GLViewer_AspectLine::getByteCopy ( ) const

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

Returns:
binary representation of line aspect

References myHColor, myLineType, myLineWidth, myNColor, and mySColor.

GLViewer_AspectLine * GLViewer_AspectLine::fromByteCopy ( QByteArray  theBytes) [static]

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

Sets line aspect from binary representation

References GLViewer_AspectLine(), and setLineColors().


Field Documentation

QColor GLViewer_AspectLine.myNColor [protected]
QColor GLViewer_AspectLine.myHColor [protected]
QColor GLViewer_AspectLine.mySColor [protected]

equals 0 for normal line and 1 for strip line

Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS