QWT API (English) 7.0.1
Qt Widget Library for Technical Applications - English API Documentation
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
Qwt3D::Label Class Reference

A Qt string or an output device dependent string. More...

#include <qwt3d_label.h>

Inheritance diagram for Qwt3D::Label:
Qwt3D::Drawable

Public Member Functions

 Label ()
 Default constructor .
 
 Label (const QString &family, int pointSize, int weight=QFont::Normal, bool italic=false)
 Constructs a Label with specified font parameters.
 
void setFont (QString const &family, int pointSize, int weight=QFont::Normal, bool italic=false)
 Sets the label font.
 
void adjust (int gap)
 Adds an additional shift to the anchor point.
 
double gap () const
 
void setPosition (Qwt3D::Triple pos, ANCHOR a=BottomLeft)
 Sets the label position and anchor point.
 
void setRelPosition (Tuple rpos, ANCHOR a)
 Sets the label position relative to the viewport.
 
Qwt3D::Triple first () const
 
Qwt3D::Triple second () const
 
ANCHOR anchor () const
 
virtual void setColor (double r, double g, double b, double a=1)
 Sets the label color from RGBA components.
 
virtual void setColor (Qwt3D::RGBA rgba)
 Sets the label color from an RGBA object.
 
void setString (QString const &s)
 Sets the label text string.
 
void draw ()
 Draws the label .
 
- Public Member Functions inherited from Qwt3D::Drawable
virtual void saveGLState ()
 
virtual void restoreGLState ()
 
void attach (Drawable *)
 
void detach (Drawable *)
 
void detachAll ()
 
Qwt3D::Triple relativePosition (Qwt3D::Triple rel)
 Calculates world coordinates from relative viewport position.
 

Static Public Member Functions

static void useDeviceFonts (bool val)
 Enables or disables device font rendering for all labels.
 

Additional Inherited Members

- Protected Member Functions inherited from Qwt3D::Drawable
void Enable (GLenum what, GLboolean val)
 
Qwt3D::Triple ViewPort2World (Qwt3D::Triple win, bool *err=0)
 Converts viewport coordinates to world coordinates (glUnProject)
 
Qwt3D::Triple World2ViewPort (Qwt3D::Triple obj, bool *err=0)
 Converts world coordinates to viewport coordinates (glProject)
 
- Protected Attributes inherited from Qwt3D::Drawable
Qwt3D::RGBA color
 
GLdouble modelMatrix [16]
 
GLdouble projMatrix [16]
 
GLint viewport [4]
 

Detailed Description

A Qt string or an output device dependent string.

Constructor & Destructor Documentation

◆ Label() [1/2]

Label::Label ( )

Default constructor .

◆ Label() [2/2]

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

Constructs a Label with specified font parameters.

Member Function Documentation

◆ adjust()

void Label::adjust ( int  gap)

Adds an additional shift to the anchor point.

◆ draw()

void Label::draw ( )
virtual

Draws the label .

Reimplemented from Qwt3D::Drawable.

◆ setColor() [1/2]

void Label::setColor ( double  r,
double  g,
double  b,
double  a = 1 
)
virtual

Sets the label color from RGBA components.

Reimplemented from Qwt3D::Drawable.

◆ setColor() [2/2]

void Label::setColor ( Qwt3D::RGBA  rgba)
virtual

Sets the label color from an RGBA object.

Reimplemented from Qwt3D::Drawable.

◆ setFont()

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

Sets the label font.

◆ setPosition()

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

Sets the label position and anchor point.

◆ setRelPosition()

void Label::setRelPosition ( Tuple  rpos,
ANCHOR  a 
)

Sets the label position relative to the viewport.

◆ setString()

void Label::setString ( QString const &  s)

Sets the label text string.

◆ useDeviceFonts()

void Label::useDeviceFonts ( bool  val)
static

Enables or disables device font rendering for all labels.


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