Version: 9.15.0
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() [1/2]

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

◆ GLViewer_Text() [2/2]

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

◆ ~GLViewer_Text()

GLViewer_Text::~GLViewer_Text ( )

Destructor

Member Function Documentation

◆ fromByteCopy()

GLViewer_Text * GLViewer_Text::fromByteCopy ( QByteArray  theBuf)
static

A function for decoding object from the byte copy.

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

Initialize text from binary representation

Parameters
theBuf- byte array

References GLViewer_Text().

◆ getByteCopy()

QByteArray GLViewer_Text::getByteCopy ( ) const

A function for coding object to the byte copy.

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.

◆ getColor()

QColor GLViewer_Text::getColor ( ) const
inline

Returns text color.

◆ getDisplayTextFormat()

DisplayTextFormat GLViewer_Text::getDisplayTextFormat ( ) const
inline

Sets text format BITMAP or TEXTURE.

◆ getFont()

QFont GLViewer_Text::getFont ( ) const
inline

Returns text font.

◆ getHeight()

int GLViewer_Text::getHeight ( )

Returns text height.

Returns
height of text

References myQFont.

◆ getPosition()

void GLViewer_Text::getPosition ( float &  xPos,
float &  yPos 
)
inline

Returns text position.

◆ getSeparator()

int GLViewer_Text::getSeparator ( )
inline

Returns text separator.

◆ getText()

QString GLViewer_Text::getText ( ) const
inline

Returns text.

◆ getWidth()

int GLViewer_Text::getWidth ( )

Returns text width.

Returns
width of text

References myQFont, mySeparator, and myText.

◆ setColor()

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

Sets text color.

References OCCViewer::color().

◆ setFont()

void GLViewer_Text::setFont ( const QFont  theQFont)
inline

Sets text font.

◆ setPosition()

void GLViewer_Text::setPosition ( float  xPos,
float  yPos 
)
inline

Sets text position.

◆ setSeparator()

void GLViewer_Text::setSeparator ( int  theSep)
inline

Sets text separator.

◆ setText()

void GLViewer_Text::setText ( const QString &  text)
inline

Sets text.

◆ setTextDisplayFormat()

void GLViewer_Text::setTextDisplayFormat ( DisplayTextFormat  theDTF)
inline

Returns text format BITMAP or TEXTURE.

Member Data Documentation

◆ myColor

QColor GLViewer_Text::myColor
protected

◆ myDTF

DisplayTextFormat GLViewer_Text::myDTF
protected

◆ myQFont

QFont GLViewer_Text::myQFont
protected

◆ mySeparator

int GLViewer_Text::mySeparator
protected

◆ myText

QString GLViewer_Text::myText
protected

◆ myXPos

float GLViewer_Text::myXPos
protected

◆ myYPos

float GLViewer_Text::myYPos
protected

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