A flat color legend.
More...
#include <qwt3d_colorlegend.h>
|
| enum | SCALEPOSITION { Top
, Bottom
, Left
, Right
} |
| |
| enum | ORIENTATION { BottomTop
, LeftRight
} |
| |
|
| | ColorLegend () |
| | Constructs a legend object with an axis at the left side.
|
| |
| virtual void | draw () override |
| | Draws the color legend.
|
| |
| void | setRelPosition (Qwt3D::Tuple relMin, Qwt3D::Tuple relMax) |
| | Sets relative position of the legend within the plot area.
|
| |
| void | setOrientation (ORIENTATION, SCALEPOSITION) |
| | Sets the legend orientation and axis scale position.
|
| |
| void | setLimits (double start, double stop) |
| | Sets axis scale limits.
|
| |
| void | setMajors (int) |
| | Sets number of major intervals.
|
| |
| void | setMinors (int) |
| | Sets number of minor intervals.
|
| |
|
void | drawScale (bool val) |
| |
|
void | drawNumbers (bool val) |
| |
| void | setAutoScale (bool val) |
| | Enables or disables auto-scaling.
|
| |
| void | setScale (Qwt3D::Scale *scale) |
| | Sets a user-defined scale object.
|
| |
| void | setScale (Qwt3D::SCALETYPE) |
| | Sets predefined scale type.
|
| |
|
void | setTitleString (QString const &s) |
| |
| void | setTitleFont (QString const &family, int pointSize, int weight=QFont::Normal, bool italic=false) |
| | Sets the legend title font.
|
| |
|
virtual void | saveGLState () |
| |
|
virtual void | restoreGLState () |
| |
|
void | attach (Drawable *) |
| |
|
void | detach (Drawable *) |
| |
|
void | detachAll () |
| |
| virtual void | setColor (double r, double g, double b, double a=1) |
| |
| virtual void | setColor (Qwt3D::RGBA rgba) |
| |
| Qwt3D::Triple | relativePosition (Qwt3D::Triple rel) |
| | Calculates world coordinates from relative viewport position.
|
| |
|
|
Qwt3D::ColorVector | colors |
| |
A flat color legend.
The class visualizes a ColorVector together with a scale (axis) and a caption. ColorLegends are vertical or horizontal.
◆ ColorLegend()
| ColorLegend::ColorLegend |
( |
| ) |
|
Constructs 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.
Sets the legend title string
- Parameters
-
◆ draw()
| void ColorLegend::draw |
( |
| ) |
|
|
overridevirtual |
Draws the color legend.
Renders the color legend including color bar, axis, and caption.
Reimplemented from Qwt3D::Drawable.
◆ setAutoScale()
| void ColorLegend::setAutoScale |
( |
bool |
val | ) |
|
Enables or disables auto-scaling.
- Parameters
-
| val | True to enable auto-scaling, false to disable |
◆ setLimits()
| void ColorLegend::setLimits |
( |
double |
start, |
|
|
double |
stop |
|
) |
| |
Sets axis scale limits.
- Parameters
-
| start | Start value |
| stop | Stop value |
◆ setMajors()
| void ColorLegend::setMajors |
( |
int |
majors | ) |
|
Sets number of major intervals.
- Parameters
-
| majors | Number of major intervals |
◆ setMinors()
| void ColorLegend::setMinors |
( |
int |
minors | ) |
|
Sets number of minor intervals.
- Parameters
-
| minors | Number of minor intervals |
◆ setOrientation()
| void ColorLegend::setOrientation |
( |
ORIENTATION |
orientation, |
|
|
SCALEPOSITION |
pos |
|
) |
| |
Sets the legend orientation and axis scale position.
- Parameters
-
| orientation | Legend orientation (BottomTop or TopBottom) |
| pos | Axis scale position (Left, Right, Top, or Bottom) |
◆ setRelPosition()
Sets relative position of the legend within the plot area.
- Parameters
-
| relMin | Minimum relative position (x,y) |
| relMax | Maximum relative position (x,y) |
◆ setScale() [1/2]
Sets a user-defined scale object.
- Parameters
-
| val | Pointer to a Scale object |
◆ setScale() [2/2]
| void ColorLegend::setScale |
( |
Qwt3D::SCALETYPE |
val | ) |
|
Sets predefined scale type.
- Parameters
-
| val | Scale type (LINEARSCALE or LOG10SCALE) |
◆ setTitleFont()
| void ColorLegend::setTitleFont |
( |
QString const & |
family, |
|
|
int |
pointSize, |
|
|
int |
weight = QFont::Normal, |
|
|
bool |
italic = false |
|
) |
| |
Sets the legend title font.
- Parameters
-
| family | Font family name |
| pointSize | Font point size |
| weight | Font weight |
| italic | Whether font is italic |
The documentation for this class was generated from the following files:
- /home/runner/work/QWT/QWT/src/plot3d/qwt3d_colorlegend.h
- /home/runner/work/QWT/QWT/src/plot3d/qwt3d_colorlegend.cpp