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

Txq2dLabel Class Reference

A Txq2dLabel is a class to draw text on the Txq2dCanvas at a certain point with respect to the real-world coordinate system. More...

#include <Txq2dLabel.h>

Inheritance diagram for Txq2dLabel::

Txq2dDrawable TxqDrawable List of all members.

Public Methods

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

 Txq2dLabel (QString thisLabel, double sx, double sy)
 This constructor draws a text at a x,y position. More...

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

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

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

void setLocation (TxqDoublePoint p)
 Set the point in the real-world coordinate system. More...

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

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

void setLocation (QPoint p)
 Set the point in the real-world coordinate system. More...

TxqDoublePoint getLocation ()
 Returns the point in the real-world coordinate system. More...

void setFont (QFont f)
 Set the font for the text. More...

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

void paint (QPainter *g)
 Paints the label text. More...


Protected Methods

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


Protected Attributes

TxqDoublePoint point
 The location to draw the label. More...

QFont font
 The font. More...

QString label
 The label to draw. More...


Detailed Description

A Txq2dLabel is a class to draw text on the Txq2dCanvas at a certain point with respect to the real-world coordinate system.

Definition at line 24 of file Txq2dLabel.h.


Constructor & Destructor Documentation

Txq2dLabel::Txq2dLabel ( )
 

This constructor is default.

Txq2dLabel::Txq2dLabel ( QString thisLabel,
double sx,
double sy )
 

This constructor draws a text at a x,y position.

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

Txq2dLabel::~Txq2dLabel ( ) [virtual]
 

The destructor is default.


Member Function Documentation

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

Dump the object's contents to the text stream ts.

Parameters:
ts   the text stream to write the contents.

Reimplemented from TxqDrawable.

QFont Txq2dLabel::getFont ( )
 

Get the label's font.

Returns:
the label's font

QString Txq2dLabel::getLabel ( )
 

Get the label.

Returns:
the QString text label.

Reimplemented from TxqDrawable.

TxqDoublePoint Txq2dLabel::getLocation ( )
 

Returns the point in the real-world coordinate system.

Returns:
the point location as a TxqDoublePoint.

void Txq2dLabel::paint ( QPainter * g ) [virtual]
 

Paints the label text.

Parameters:
g   the paint device to use

Reimplemented from Txq2dDrawable.

void Txq2dLabel::setFont ( QFont f )
 

Set the font for the text.

Parameters:
f   the font to use

void Txq2dLabel::setLabel ( QString label )
 

Set the label to draw.

Parameters:
label   the label to draw

void Txq2dLabel::setLocation ( QPoint p )
 

Set the point in the real-world coordinate system.

Parameters:
p   the QLocation location to draw

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

Set the point in the real-world coordinate system.

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

Reimplemented from TxqDrawable.

void Txq2dLabel::setLocation ( double x,
double y )
 

Set the point in the real-world coordinate system.

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

void Txq2dLabel::setLocation ( TxqDoublePoint p )
 

Set the point in the real-world coordinate system.

Parameters:
p   the TxqDoublePoint location to draw


Member Data Documentation

QFont Txq2dLabel::font [protected]
 

The font.

Definition at line 126 of file Txq2dLabel.h.

QString Txq2dLabel::label [protected]
 

The label to draw.

Reimplemented from TxqDrawable.

Definition at line 131 of file Txq2dLabel.h.

TxqDoublePoint Txq2dLabel::point [protected]
 

The location to draw the label.

Definition at line 121 of file Txq2dLabel.h.


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