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

GLViewer_Text Class Reference

#include <GLViewer_Text.h>

Public Member Functions

 GLViewer_Text (const QString &, float xPos=0.0, float yPos=0.0, const QColor &color=QColor(0, 255, 0))
 GLViewer_Text (const QString &, float xPos, float yPos, const QColor &, QFont theFont, int theSeparator)
 ~GLViewer_Text ()
void setText (const QString &text)
 Sets text.
QString getText () const
 Returns text.
void setPosition (float xPos, float yPos)
 Sets text position.
void getPosition (float &xPos, float &yPos)
 Returns text position.
void setColor (const QColor &color)
 Sets text color.
QColor getColor () const
 Returns text color.
void setFont (const QFont theQFont)
 Sets text font.
QFont getFont () const
 Returns text font.
int getSeparator ()
 Returns text separator.
void setSeparator (int theSep)
 Sets text separator.
int getWidth ()
 Returns text width.
int getHeight ()
 Returns text height.
QByteArray getByteCopy () const
 A function for coding object to the byte copy.
DisplayTextFormat getDisplayTextFormat () const
 Sets text format BITMAP or TEXTURE.
void setTextDisplayFormat (DisplayTextFormat theDTF)
 Returns text format BITMAP or TEXTURE.

Static Public Member Functions

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

Protected Attributes

QString myText
float myXPos
float myYPos
QColor myColor
QFont myQFont
int mySeparator
DisplayTextFormat myDTF

Detailed Description

Substitution of Prs3d_Text for OpenGL


Constructor & Destructor Documentation

GLViewer_Text::GLViewer_Text ( const QString &  text,
float  xPos = 0.0,
float  yPos = 0.0,
const QColor &  color = QColor( 0, 255, 0 ) 
)

Constructor

References DTF_BITMAP, myColor, myDTF, myQFont, mySeparator, myText, myXPos, and myYPos.

GLViewer_Text::GLViewer_Text ( const QString &  text,
float  xPos,
float  yPos,
const QColor &  color,
QFont  theFont,
int  theSeparator 
)

Constructor

References DTF_BITMAP, myColor, myDTF, myQFont, mySeparator, myText, myXPos, and myYPos.

GLViewer_Text::~GLViewer_Text ( )

Destructor


Member Function Documentation

void GLViewer_Text.setText ( const QString &  text)
QString GLViewer_Text.getText ( ) const
void GLViewer_Text.setPosition ( float  xPos,
float  yPos 
)
void GLViewer_Text.getPosition ( float &  xPos,
float &  yPos 
)
void GLViewer_Text.setColor ( const QColor &  color)
QColor GLViewer_Text.getColor ( ) const
void GLViewer_Text.setFont ( const QFont  theQFont)
QFont GLViewer_Text.getFont ( ) const
int GLViewer_Text.getSeparator ( )
void GLViewer_Text.setSeparator ( int  theSep)
int GLViewer_Text::getWidth ( )
Returns:
width of text

References myQFont, mySeparator, and myText.

int GLViewer_Text::getHeight ( )
Returns:
height of text

References myQFont.

QByteArray GLViewer_Text::getByteCopy ( ) const

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

Codes object as byte copy

Returns:
byte array

References myColor, myQFont, mySeparator, myText, myXPos, and myYPos.

GLViewer_Text * GLViewer_Text::fromByteCopy ( QByteArray  theBuf) [static]

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

Initialize text from binary representation

Parameters:
theBuf- byte array

References GLViewer_Text().

DisplayTextFormat GLViewer_Text.getDisplayTextFormat ( ) const
void GLViewer_Text.setTextDisplayFormat ( DisplayTextFormat  theDTF)

Field Documentation

QString GLViewer_Text.myText [protected]
float GLViewer_Text.myXPos [protected]
float GLViewer_Text.myYPos [protected]
QColor GLViewer_Text.myColor [protected]
QFont GLViewer_Text.myQFont [protected]
int GLViewer_Text.mySeparator [protected]
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