Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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. More...
 
QString getText () const
 Returns text. More...
 
void setPosition (float xPos, float yPos)
 Sets text position. More...
 
void getPosition (float &xPos, float &yPos)
 Returns text position. More...
 
void setColor (const QColor &color)
 Sets text color. More...
 
QColor getColor () const
 Returns text color. More...
 
void setFont (const QFont theQFont)
 Sets text font. More...
 
QFont getFont () const
 Returns text font. More...
 
int getSeparator ()
 Returns text separator. More...
 
void setSeparator (int theSep)
 Sets text separator. More...
 
int getWidth ()
 Returns text width. More...
 
int getHeight ()
 Returns text height. More...
 
QByteArray getByteCopy () const
 A function for coding object to the byte copy. More...
 
DisplayTextFormat getDisplayTextFormat () const
 Sets text format BITMAP or TEXTURE. More...
 
void setTextDisplayFormat (DisplayTextFormat theDTF)
 Returns text format BITMAP or TEXTURE. More...
 

Static Public Member Functions

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

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 ) 
)
GLViewer_Text::GLViewer_Text ( const QString &  text,
float  xPos,
float  yPos,
const QColor &  color,
QFont  theFont,
int  theSeparator 
)
GLViewer_Text::~GLViewer_Text ( )

Destructor

Member Function Documentation

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().

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.

QColor GLViewer_Text::getColor ( ) const
inline
DisplayTextFormat GLViewer_Text::getDisplayTextFormat ( ) const
inline
QFont GLViewer_Text::getFont ( ) const
inline
int GLViewer_Text::getHeight ( )
Returns
height of text

References myQFont.

void GLViewer_Text::getPosition ( float &  xPos,
float &  yPos 
)
inline
int GLViewer_Text::getSeparator ( )
inline
QString GLViewer_Text::getText ( ) const
inline
int GLViewer_Text::getWidth ( )
Returns
width of text

References myQFont, mySeparator, and myText.

void GLViewer_Text::setColor ( const QColor &  color)
inline

References OCCViewer::color().

void GLViewer_Text::setFont ( const QFont  theQFont)
inline
void GLViewer_Text::setPosition ( float  xPos,
float  yPos 
)
inline
void GLViewer_Text::setSeparator ( int  theSep)
inline
void GLViewer_Text::setText ( const QString &  text)
inline
void GLViewer_Text::setTextDisplayFormat ( DisplayTextFormat  theDTF)
inline

Member Data Documentation

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

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