Label Class Reference

A Qt string or an output device dependent string.

#include <qwt3d_label.h>

Inheritance diagram for Label:

Drawable

List of all members.

Public Member Functions

 Label (const QString &family, int pointSize, int weight=QFont::Normal, bool italic=false)
void setFont (QString const &family, int pointSize, int weight=QFont::Normal, bool italic=false)
void adjust (int gap)
double gap () const
void setPosition (Qwt3D::Triple pos, ANCHOR a=BottomLeft)
void setRelPosition (Tuple rpos, ANCHOR a)
Qwt3D::Triple first () const
Qwt3D::Triple second () const
ANCHOR anchor () const
virtual void setColor (double r, double g, double b, double a=1)
virtual void setColor (Qwt3D::RGBA rgba)
void setString (QString const &s)
void draw ()

Static Public Member Functions

static void useDeviceFonts (bool val)


Constructor & Destructor Documentation

Label ( const QString &  family,
int  pointSize,
int  weight = QFont::Normal,
bool  italic = false 
)

Construct label and initialize with font.


Member Function Documentation

void setFont ( QString const &  family,
int  pointSize,
int  weight = QFont::Normal,
bool  italic = false 
)

Sets the labels font.

void adjust ( int  gap  ) 

Fine tunes label;.

Adds an additional shift to the anchor point. This happens in a more or less intelligent manner depending on the nature of the anchor:

anchor type         shift

left aligned         -->
right aligned        <--
top aligned          top-down            
bottom aligned       bottom-up
The unit is user space dependend (one pixel on screen - play around to get satisfying results)

double gap (  )  const [inline]

Returns the gap caused by adjust();.

void setPosition ( Qwt3D::Triple  pos,
ANCHOR  a = BottomLeft 
)

Sets the labels position.

example:


   Anchor TopCenter (*)  resp. BottomRight(X) 

   +----*----+
   |  Pixmap |
   +---------X

void setRelPosition ( Tuple  rpos,
ANCHOR  a 
)

Sets the labels position relative to screen.

Qwt3D::Triple first (  )  const [inline]

Receives bottom left label position.

Qwt3D::Triple second (  )  const [inline]

Receives top right label position.

ANCHOR anchor (  )  const [inline]

Defines an anchor point for the labels surrounding rectangle.

void setString ( QString const &  s  ) 

Sets the labels string For unicode labeling ( QChar(0x3c0) etc.) please look at www.unicode.org.

void draw (  )  [virtual]

Actual drawing.

Reimplemented from Drawable.

void useDeviceFonts ( bool  val  )  [static]

Decides about use of PDF standard fonts for PDF output If true, Label can use one of the PDF standard fonts (unprecise positioning for now), otherwise it dumps pixmaps in the PDF stream (poor quality).


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

Generated on Sun Jun 7 00:16:33 2009 for QwtPlot3D API by  doxygen 1.5.8