|
QWT API (English) 7.0.1
Qt Widget Library for Technical Applications - English API Documentation
|
The Thermometer Widget. More...
#include <qwt_thermo.h>
Classes | |
| class | PrivateData |
Public Types | |
| enum | ScalePosition { NoScale , LeadingScale , TrailingScale } |
| Position of the scale. More... | |
| enum | OriginMode { OriginMinimum , OriginMaximum , OriginCustom } |
| Origin mode. This property specifies where the beginning of the liquid is placed. More... | |
Public Slots | |
| virtual void | setValue (double) |
| Set the current value. | |
Public Member Functions | |
| QwtThermo (QWidget *parent=nullptr) | |
| Constructor. | |
| virtual | ~QwtThermo () |
| Destructor. | |
| void | setOrientation (Qt::Orientation) |
| Set the orientation. | |
| Qt::Orientation | orientation () const |
| Return orientation. | |
| void | setScalePosition (ScalePosition) |
| Change the position of the scale. | |
| ScalePosition | scalePosition () const |
| Return scale position. | |
| void | setSpacing (int) |
| Change the spacing between pipe and scale. | |
| int | spacing () const |
| Return number of pixels between pipe and scale. | |
| void | setBorderWidth (int) |
| Set the border width of the pipe. | |
| int | borderWidth () const |
| Return border width of the thermometer pipe. | |
| void | setOriginMode (OriginMode) |
| Change how the origin is determined. | |
| OriginMode | originMode () const |
| Return mode how the origin is determined. | |
| void | setOrigin (double) |
| Specify the custom origin. | |
| double | origin () const |
| Return origin of the thermometer when OriginCustom is enabled. | |
| void | setFillBrush (const QBrush &) |
| Change the brush of the liquid. | |
| QBrush | fillBrush () const |
| Return liquid (QPalette::ButtonText) brush. | |
| void | setAlarmBrush (const QBrush &) |
| Specify the liquid brush above the alarm threshold. | |
| QBrush | alarmBrush () const |
| Return liquid brush (QPalette::Highlight) above the alarm threshold. | |
| void | setAlarmLevel (double) |
| Specify the alarm threshold. | |
| double | alarmLevel () const |
| Return alarm threshold. | |
| void | setAlarmEnabled (bool) |
| Enable or disable the alarm threshold. | |
| bool | alarmEnabled () const |
| Return true when the alarm threshold is enabled. | |
| void | setColorMap (QwtColorMap *) |
| Assign a color map for the fill color. | |
| QwtColorMap * | colorMap () |
| Return color map for the fill color. | |
| const QwtColorMap * | colorMap () const |
| Return color map for the fill color (const version) | |
| void | setPipeWidth (int) |
| Change the width of the pipe. | |
| int | pipeWidth () const |
| Return width of the pipe. | |
| void | setRangeFlags (QwtInterval::BorderFlags) |
| Exclude/Include min/max values. | |
| QwtInterval::BorderFlags | rangeFlags () const |
| Return range flags. | |
| double | value () const |
| Return the value. | |
| virtual QSize | sizeHint () const override |
| Return the minimum size hint. | |
| virtual QSize | minimumSizeHint () const override |
| Return minimum size hint. | |
| void | setScaleDraw (QwtScaleDraw *) |
| Set a scale draw. | |
| const QwtScaleDraw * | scaleDraw () const |
| Return the scale draw of the thermometer (const version) | |
Public Member Functions inherited from QwtAbstractScale | |
| QwtAbstractScale (QWidget *parent=nullptr) | |
| Constructor for QwtAbstractScale. | |
| virtual | ~QwtAbstractScale () |
| Destructor for QwtAbstractScale . | |
| void | setScale (double lowerBound, double upperBound) |
| Specify a scale by interval bounds. | |
| void | setScale (const QwtInterval &) |
| Specify a scale by interval. | |
| void | setScale (const QwtScaleDiv &) |
| Specify a scale by scale division. | |
| const QwtScaleDiv & | scaleDiv () const |
| Return the scale division. | |
| void | setLowerBound (double value) |
| Set the lower bound of the scale. | |
| double | lowerBound () const |
| Return the lower bound of the scale. | |
| void | setUpperBound (double value) |
| Set the upper bound of the scale. | |
| double | upperBound () const |
| Return the upper bound of the scale. | |
| void | setScaleStepSize (double stepSize) |
| Set the step size used for calculating scale division. | |
| double | scaleStepSize () const |
| Return the step size hint. | |
| void | setScaleMaxMajor (int ticks) |
| Set the maximum number of major tick intervals. | |
| int | scaleMaxMinor () const |
| Return the maximum number of minor tick intervals. | |
| void | setScaleMaxMinor (int ticks) |
| Set the maximum number of minor tick intervals. | |
| int | scaleMaxMajor () const |
| Return the maximum number of major tick intervals. | |
| void | setScaleEngine (QwtScaleEngine *) |
| Set the scale engine. | |
| const QwtScaleEngine * | scaleEngine () const |
| Return the scale engine (const version) | |
| QwtScaleEngine * | scaleEngine () |
| Return the scale engine (non-const version) | |
| int | transform (double) const |
| Transform a scale value to widget coordinates. | |
| double | invTransform (int) const |
| Transform a widget coordinate to scale value. | |
| bool | isInverted () const |
| Check if scale is inverted. | |
| double | minimum () const |
| Return the minimum boundary. | |
| double | maximum () const |
| Return the maximum boundary. | |
| const QwtScaleMap & | scaleMap () const |
| Return the scale map. | |
Protected Member Functions | |
| virtual void | drawLiquid (QPainter *, const QRect &) const |
| Draw the liquid. | |
| virtual void | scaleChange () override |
| Handle scale changes. | |
| virtual void | paintEvent (QPaintEvent *) override |
| Handle paint events. | |
| virtual void | resizeEvent (QResizeEvent *) override |
| Handle resize events. | |
| virtual void | changeEvent (QEvent *) override |
| Handle change events. | |
| QwtScaleDraw * | scaleDraw () |
| Return the scale draw. | |
| QRect | pipeRect () const |
| Return the pipe rectangle. | |
| QRect | fillRect (const QRect &) const |
| Return the fill rectangle. | |
| QRect | alarmRect (const QRect &) const |
| Return the alarm rectangle. | |
Protected Member Functions inherited from QwtAbstractScale | |
| void | rescale (double lowerBound, double upperBound, double stepSize) |
| Recalculate scale and update scale draw (English only) | |
| void | setAbstractScaleDraw (QwtAbstractScaleDraw *) |
| Set the scale draw object (English only) | |
| const QwtAbstractScaleDraw * | abstractScaleDraw () const |
| Return the scale draw (const version) (English only) | |
| QwtAbstractScaleDraw * | abstractScaleDraw () |
| Return the scale draw (non-const version) (English only) | |
| void | updateScaleDraw () |
| Update the scale draw (English only) | |
Properties | |
| Qt::Orientation | orientation |
| ScalePosition | scalePosition |
| OriginMode | originMode |
| bool | alarmEnabled |
| double | alarmLevel |
| double | origin |
| int | spacing |
| int | borderWidth |
| int | pipeWidth |
| double | value |
Properties inherited from QwtAbstractScale | |
| double | lowerBound |
| double | upperBound |
| int | scaleMaxMajor |
| int | scaleMaxMinor |
| double | scaleStepSize |
The Thermometer Widget.
|
explicit |
Constructor.
|
virtual |
Destructor.
| QBrush QwtThermo::alarmBrush | ( | ) | const |
Return liquid brush (QPalette::Highlight) above the alarm threshold.
| bool QwtThermo::alarmEnabled | ( | ) | const |
Return true when the alarm threshold is enabled.
| double QwtThermo::alarmLevel | ( | ) | const |
Return alarm threshold.
|
protected |
Return the alarm rectangle.
Calculate the alarm rectangle of the pipe.
| int QwtThermo::borderWidth | ( | ) | const |
Return border width of the thermometer pipe.
|
overrideprotectedvirtual |
| QwtColorMap * QwtThermo::colorMap | ( | ) |
Return color map for the fill color.
| const QwtColorMap * QwtThermo::colorMap | ( | ) | const |
Return color map for the fill color (const version)
|
protectedvirtual |
Draw the liquid.
Redraw the liquid in thermometer pipe.
| QBrush QwtThermo::fillBrush | ( | ) | const |
Return liquid (QPalette::ButtonText) brush.
|
protected |
Return the fill rectangle.
Calculate the filled rectangle of the pipe.
|
overridevirtual |
Return minimum size hint.
| Qt::Orientation QwtThermo::orientation | ( | ) | const |
Return orientation.
| double QwtThermo::origin | ( | ) | const |
Return origin of the thermometer when OriginCustom is enabled.
| QwtThermo::OriginMode QwtThermo::originMode | ( | ) | const |
Return mode how the origin is determined.
|
overrideprotectedvirtual |
Handle paint events.
Paint event handler.
|
protected |
Return the pipe rectangle.
Return bounding rectangle of the pipe.
| int QwtThermo::pipeWidth | ( | ) | const |
Return width of the pipe.
| QwtInterval::BorderFlags QwtThermo::rangeFlags | ( | ) | const |
Return range flags.
|
overrideprotectedvirtual |
Handle resize events.
Resize event handler.
|
overrideprotectedvirtual |
|
protected |
Return the scale draw.
Return the scale draw of the thermometer (non-const version)
| const QwtScaleDraw * QwtThermo::scaleDraw | ( | ) | const |
Return the scale draw of the thermometer (const version)
| QwtThermo::ScalePosition QwtThermo::scalePosition | ( | ) | const |
Return scale position.
| void QwtThermo::setAlarmBrush | ( | const QBrush & | brush | ) |
Specify the liquid brush above the alarm threshold.
| void QwtThermo::setAlarmEnabled | ( | bool | on | ) |
Enable or disable the alarm threshold.
| void QwtThermo::setAlarmLevel | ( | double | level | ) |
Specify the alarm threshold.
| void QwtThermo::setBorderWidth | ( | int | width | ) |
Set the border width of the pipe.
| void QwtThermo::setColorMap | ( | QwtColorMap * | colorMap | ) |
Assign a color map for the fill color.
| void QwtThermo::setFillBrush | ( | const QBrush & | brush | ) |
Change the brush of the liquid.
| void QwtThermo::setOrientation | ( | Qt::Orientation | orientation | ) |
Set the orientation.
| void QwtThermo::setOrigin | ( | double | origin | ) |
Specify the custom origin.
| void QwtThermo::setOriginMode | ( | OriginMode | m | ) |
Change how the origin is determined.
| void QwtThermo::setPipeWidth | ( | int | width | ) |
Change the width of the pipe.
| void QwtThermo::setRangeFlags | ( | QwtInterval::BorderFlags | flags | ) |
Exclude/Include min/max values.
| void QwtThermo::setScaleDraw | ( | QwtScaleDraw * | scaleDraw | ) |
Set a scale draw.
| void QwtThermo::setScalePosition | ( | ScalePosition | scalePosition | ) |
Change the position of the scale.
| void QwtThermo::setSpacing | ( | int | spacing | ) |
Change the spacing between pipe and scale.
|
virtualslot |
Set the current value.
|
overridevirtual |
Return the minimum size hint.
| int QwtThermo::spacing | ( | ) | const |
Return number of pixels between pipe and scale.
| double QwtThermo::value | ( | ) | const |
Return the value.