Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

Txq3dLabel Class Reference

A Txq3dLabel is a base class to draw text at a point with respect to the real-world coordinate system using OpenGL. More...

#include <Txq3dLabel.h>

Inheritance diagram for Txq3dLabel::

Txq3dDrawable TxqDrawable Txq3dFontLabel Txq3dStrokeLabel List of all members.

Public Methods

 Txq3dLabel ()
 This constructor is default. More...

 Txq3dLabel (QString thisLabel, double sx, double sy, double sz)
 This constructor takes a label and x,y postion. More...

virtual ~Txq3dLabel ()
 The destructor is default. More...

void setLabel (QString label)
 Set the label to draw. More...

void setLabel (const char *label)
 Set the label to draw. More...

QString getLabel ()
 Get the label. More...

void setLocation (double x, double y, double z)
 Set the point in the real-world coordinate system. More...

void setLocation (int x, int y)
 Overloaded signature to prevent compiler warnings. More...

std::vector<double> getLocation ()
 Get the point in the real-world coordinate system. More...

virtual void setFont (QFont f)
 Set the font using QFont. More...

QFont getFont ()
 Get the label's font. More...

void setFontScale (double fs)
 Set the font scaling factor. More...

double getFontScale ()
 Get the font scaling factor. More...

void setFontThickness (double ft)
 Set the font thickness. More...

double getFontThickness ()
 Get the font thickness. More...

virtual void paintGL ()=0
 Paints the label text. More...


Protected Methods

void dump (QTextStream *ts)
 Dump the object contents to the text stream ts. More...


Protected Attributes

QFont font
 The font. More...

QString label
 The label to draw. More...

std::vector<double> point
 The point location. More...

double xPoint
 The x point location. More...

double yPoint
 The y point location. More...

double zPoint
 The z point location. More...

double fontScale
 The font scaling factor. More...

double fontThickness
 The font thickness. More...


Detailed Description

A Txq3dLabel is a base class to draw text at a point with respect to the real-world coordinate system using OpenGL.

This class is abstract since it contains a pure virtual method to paint the object.

Copyright 1998 - 2001 by Tech-X Corporation

Author:
Kelly G. Luetkemeyer

Version:
Id:
Txq3dLabel.h,v 1.4 2001/10/11 19:54:13 kgl Exp

Definition at line 32 of file Txq3dLabel.h.


Constructor & Destructor Documentation

Txq3dLabel::Txq3dLabel ( )
 

This constructor is default.

Txq3dLabel::Txq3dLabel ( QString thisLabel,
double sx,
double sy,
double sz )
 

This constructor takes a label and x,y postion.

Parameters:
thisLabel   the label to draw
sx   the x position to place the label
sy   the y position to place the label
sz   the z position to place the label

Txq3dLabel::~Txq3dLabel ( ) [virtual]
 

The destructor is default.


Member Function Documentation

void Txq3dLabel::dump ( QTextStream * ts ) [protected, virtual]
 

Dump the object contents to the text stream ts.

Parameters:
ts   the text stream to use

Reimplemented from TxqDrawable.

QFont Txq3dLabel::getFont ( )
 

Get the label's font.

double Txq3dLabel::getFontScale ( )
 

Get the font scaling factor.

Returns:
the font scaling factor

double Txq3dLabel::getFontThickness ( )
 

Get the font thickness.

Returns:
the font thickness

QString Txq3dLabel::getLabel ( )
 

Get the label.

Returns:
return the text as a QString.

Reimplemented from TxqDrawable.

std::vector< double > Txq3dLabel::getLocation ( )
 

Get the point in the real-world coordinate system.

Returns:
the point location as a vector of doubles where the first point is x, the second is y, and the third is z

void Txq3dLabel::paintGL ( ) [pure virtual]
 

Paints the label text.

This method is pure virtual

Reimplemented from Txq3dDrawable.

Reimplemented in Txq3dFontLabel, and Txq3dStrokeLabel.

void Txq3dLabel::setFont ( QFont f ) [virtual]
 

Set the font using QFont.

Reimplemented in Txq3dFontLabel.

void Txq3dLabel::setFontScale ( double fs )
 

Set the font scaling factor.

Parameters:
fs   a font scaling factor

void Txq3dLabel::setFontThickness ( double ft )
 

Set the font thickness.

Parameters:
ft   the desired font thickness which will depend on the derived class interpertation of thickness.

void Txq3dLabel::setLabel ( const char * label )
 

Set the label to draw.

Parameters:
label   a const char* to represent the text to draw.

void Txq3dLabel::setLabel ( QString label )
 

Set the label to draw.

Parameters:
label   the QString representing the text to draw.

void Txq3dLabel::setLocation ( int x,
int y ) [inline, virtual]
 

Overloaded signature to prevent compiler warnings.

This should not be used unless one want the Z-value to default to 0.0

Parameters:
x   the x location to draw
y   the y location to draw

Reimplemented from TxqDrawable.

Definition at line 91 of file Txq3dLabel.h.

void Txq3dLabel::setLocation ( double x,
double y,
double z )
 

Set the point in the real-world coordinate system.

Parameters:
x   the x location to draw
y   the y location to draw
z   the z location to draw


Member Data Documentation

QFont Txq3dLabel::font [protected]
 

The font.

Definition at line 154 of file Txq3dLabel.h.

double Txq3dLabel::fontScale [protected]
 

The font scaling factor.

Definition at line 184 of file Txq3dLabel.h.

double Txq3dLabel::fontThickness [protected]
 

The font thickness.

Definition at line 189 of file Txq3dLabel.h.

QString Txq3dLabel::label [protected]
 

The label to draw.

Reimplemented from TxqDrawable.

Definition at line 159 of file Txq3dLabel.h.

std::vector< double > Txq3dLabel::point [protected]
 

The point location.

Definition at line 164 of file Txq3dLabel.h.

double Txq3dLabel::xPoint [protected]
 

The x point location.

Definition at line 169 of file Txq3dLabel.h.

double Txq3dLabel::yPoint [protected]
 

The y point location.

Definition at line 174 of file Txq3dLabel.h.

double Txq3dLabel::zPoint [protected]
 

The z point location.

Definition at line 179 of file Txq3dLabel.h.


The documentation for this class was generated from the following file: Copyright Tech-X Corporation, all rights reserved.