Qwt Programmer's manual
QwtThermo
QwtThermo - The Thermometer Widget
#include <qwt_thermo.h>
QwtScaleIf, QWidget
- QwtThermo
- Constructor
- ~QwtThermo
- Destructor
- setOrientation
- Change orientation
- setBorderWidth
- change the border width of the pipe
- setFillColor
- set fill color
- setAlarmColor
- set color for the range exceeding the alarm threshold
- setAlarmLevel
- set alarm threshold
- setAlarmEnabled
- enable alarm threshold
- setPipeWidth
- set the width of the pipe
- setRange
- set the range to be displayed
- setMargin
- change margin between the pipe and the widget border
- maxValue
- return the upper limit of the range
- minValue
- return the lower limit of the range
- value
- return current value
Constructor
QwtThermo::QwtThermo(QWidget *parent, const char *name)
- QWidget *parent
- parent widget
- const char *name
- name
Destructor
QwtThermo::~QwtThermo()
Set the current value
void QwtThermo::setValue(double v)
Change the thermometer's orientation
void QwtThermo::setOrientation(Orientation o, ScalePos s)
- Orientation o
- orientation. Possible values are
Horizontal and Vertical.
The default value is Vertical.
- ScalePos s
- Position of the scale. For a horizontal
orientation, the scale position can
be Top, Bottom or None. A vertical
thermometer may have the scale positions
Left, Right or None. The default is None.
The scale position None disables the scale.
Set the border width of the pipe.
void QwtThermo::setBorderWidth(int w)
- int w
- border width
Set the range
void QwtThermo::setRange(double vmin, double vmax)
- double vmin
- Value corresponding lower or left end of the thermometer
- double vmax
- Value corresponding to the upper or right end of the
Change the color of the liquid.
void QwtThermo::setFillColor(const QColor &c)
- const QColor &c
- New color. The default color is black.
The default color is black.
Specify liquid color above the alarm threshold
void QwtThermo::setAlarmColor(const QColor &c)
- const QColor &c
- New color. The default is white.
The default color is white.
Specify the alarm threshold
void QwtThermo::setAlarmLevel(double v)
- double v
- threshold value
Change the width of the pipe
void QwtThermo::setPipeWidth(int w)
- int w
- width
Specify the distance between the pipe's endpoints
and the widget's border
void QwtThermo::setMargin(int m)
- int m
- New Margin. The default values are 10 for
horizontal orientation and 20 for vertical
orientation.
The margin is used to leave some space for the scale
labels. If a large font is used, it is advisable to
adjust the margins.
The margin has no effect if the scale is disabled.
Enable or disable alarm threshold
void QwtThermo::setAlarmEnabled(int tf)
- int tf
- TRUE (enabled) or FALSE(disabled)
Qwt Widget Library 27/04/97