ColorLegend Class Reference

A flat color legend. More...

#include <qwt3d_colorlegend.h>

Inheritance diagram for ColorLegend:

Drawable List of all members.

Public Types

enum  SCALEPOSITION { Top, Bottom, Left, Right }
enum  ORIENTATION { BottomTop, LeftRight }

Public Member Functions

 ColorLegend ()
void draw ()
void setRelPosition (Qwt3D::Tuple relMin, Qwt3D::Tuple relMax)
void setLimits (double start, double stop)
void setMajors (int)
void setMinors (int)
void drawScale (bool val)
void drawNumbers (bool val)
void setAutoScale (bool val)
void setScale (Qwt3D::Scale *scale)
void setScale (Qwt3D::SCALETYPE)
void setTitleString (QString const &s)
void setTitleFont (QString const &family, int pointSize, int weight=QFont::Normal, bool italic=false)

Public Attributes

Qwt3D::ColorVector colors

Detailed Description

The class visualizes a ColorVector together with a scale (axis) and a caption. ColorLegends are vertical or horizontal

Member Enumeration Documentation


Possible anchor points for caption and axis.

Top  scale on top
Bottom  scale on bottom
Left  scale left
Right  scale right


Orientation of the legend.

BottomTop  Positionate the legend vertically, the lowest color index is on the bottom.
LeftRight  Positionate the legend horizontally, the lowest color index is on left side.

Constructor & Destructor Documentation

ColorLegend (  ) 

Standard constructor.

Contructs a legend object with an axis at the left side. The legend resides in the top-right area and has no caption. Scale numbering is shown.

Member Function Documentation

void draw (  )  [virtual]

Draws the object. You should not use this explicitely - the function is called by updateGL().

Reimplemented from Drawable.

void setRelPosition ( Qwt3D::Tuple  relMin,
Qwt3D::Tuple  relMax 

Sets the relative position of the legend inside widget.

void setOrientation ( ORIENTATION  ,

Sets legend orientation and scale position.

void setLimits ( double  start,
double  stop 

Sets the limit of the scale.

void setMajors ( int   ) 

Sets scale major tics.

void setMinors ( int   ) 

Sets scale minor tics.

void drawScale ( bool  val  )  [inline]

Sets whether a scale will be drawn.

void drawNumbers ( bool  val  )  [inline]

Sets whether the scale will have scale numbers.

void setAutoScale ( bool  val  ) 

Sets, whether the axis is autoscaled or not.

void setScale ( Qwt3D::Scale scale  ) 

Sets another scale.

void setScale ( Qwt3D::SCALETYPE   ) 

Sets one of the predefined scale types.

void setTitleString ( QString const &  s  ) 

Sets the legends caption string.

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

Sets the legends caption font.

Member Data Documentation

Qwt3D::ColorVector colors

The color vector.

The documentation for this class was generated from the following files:
Generated on Mon Jun 25 18:47:28 2007 for QwtPlot3D API by  doxygen 1.5.1