QwtThermo(3)
π QwtThermo β NAME
okay so bestie, this is QwtThermo(3) from the Library Functions Manual β it's the Thermometer Widget, and honestly? it's giving main character energy for a Qt widget. β¨
πΈ SYNOPSIS
#include <qwt_thermo.h>
Inherits QwtAbstractScale. (so yes, it's part of the whole Qwt scale family, iykyk π«Ά)
π Public Types
enum ScalePositionβ {NoScale,LeadingScale,TrailingScale}enum OriginModeβ {OriginMinimum,OriginMaximum,OriginCustom}
β Public Slots
virtual void setValue (double)
π Public Member Functions
QwtThermo (QWidget *parent=NULL)virtual ~QwtThermo ()β Destructor.void setOrientation (Qt::Orientation)β Set the orientation.Qt::Orientation orientation () constvoid setScalePosition (ScalePosition)β Change the position of the scale.ScalePosition scalePosition () constvoid setSpacing (int)β Change the spacing between pipe and scale.int spacing () constvoid setBorderWidth (int)int borderWidth () constvoid setOriginMode (OriginMode)β Change how the origin is determined.OriginMode originMode () constvoid setOrigin (double)β Specifies the custom origin.double origin () constvoid setFillBrush (const QBrush &)β Change the brush of the liquid.QBrush fillBrush () constvoid setAlarmBrush (const QBrush &)β Specify the liquid brush above the alarm threshold.QBrush alarmBrush () constvoid setAlarmLevel (double)double alarmLevel () constvoid setAlarmEnabled (bool)β Enable or disable the alarm threshold.bool alarmEnabled () constvoid setColorMap (QwtColorMap *)β Assign a color map for the fill color.QwtColorMap * colorMap ()const QwtColorMap * colorMap () constvoid setPipeWidth (int)int pipeWidth () constvoid setRangeFlags (QwtInterval::BorderFlags)β Exclude/Include min/max values.QwtInterval::BorderFlags rangeFlags () constdouble value () constβ Return the value.virtual QSize sizeHint () const overridevirtual QSize minimumSizeHint () const overridevoid setScaleDraw (QwtScaleDraw *)β Set a scale draw.const QwtScaleDraw * scaleDraw () const
π¦ Public Member Functions inherited from QwtAbstractScale
QwtAbstractScale (QWidget *parent=NULL)virtual ~QwtAbstractScale ()β Destructor.void setScale (double lowerBound, double upperBound)β Specify a scale.void setScale (const QwtInterval &)β Specify a scale.void setScale (const QwtScaleDiv &)β Specify a scale.const QwtScaleDiv & scaleDiv () constvoid setLowerBound (double value)double lowerBound () constvoid setUpperBound (double value)double upperBound () constvoid setScaleStepSize (double stepSize)β Set the step size used for calculating a scale division.double scaleStepSize () constvoid setScaleMaxMajor (int ticks)β Set the maximum number of major tick intervals.int scaleMaxMinor () constvoid setScaleMaxMinor (int ticks)β Set the maximum number of minor tick intervals.int scaleMaxMajor () constvoid setScaleEngine (QwtScaleEngine *)β Set a scale engine.const QwtScaleEngine * scaleEngine () constQwtScaleEngine * scaleEngine ()int transform (double) constdouble invTransform (int) constbool isInverted () constdouble minimum () constdouble maximum () constconst QwtScaleMap & scaleMap () const
π Protected Member Functions
virtual void drawLiquid (QPainter *, const QRect &) constvirtual void scaleChange () overrideβ Notify a scale change.virtual void paintEvent (QPaintEvent *) overridevirtual void resizeEvent (QResizeEvent *) overridevirtual void changeEvent (QEvent *) overrideQwtScaleDraw * scaleDraw ()QRect pipeRect () constQRect fillRect (const QRect &) constβ Calculate the filled rectangle of the pipe.QRect alarmRect (const QRect &) constβ Calculate the alarm rectangle of the pipe.
π Protected Member Functions inherited from QwtAbstractScale
void rescale (double lowerBound, double upperBound, double stepSize)void setAbstractScaleDraw (QwtAbstractScaleDraw *)β Set a scale draw.const QwtAbstractScaleDraw * abstractScaleDraw () constQwtAbstractScaleDraw * abstractScaleDraw ()void updateScaleDraw ()
β¨ Detailed Description
<h2>π₯ The Thermometer Widget.</h2>
So QwtThermo is that widget that displays a value in an interval β like an actual thermometer, but make it fashion π
. It supports:
- a horizontal or vertical layout;
- a range;
- a scale;
- an alarm level.
The fill colors might be calculated from an optional color map. If no color map has been assigned, QwtThermo uses the following colors/brushes from the widget palette:
QPalette::Baseβ Background of the pipeQPalette::ButtonTextβ Fill brush below the alarm levelQPalette::Highlightβ Fill brush for the values above the alarm levelQPalette::WindowTextβ For the axis of the scaleQPalette::Textβ For the labels of the scale
fr fr this is Definition at line 46 of file qwt_thermo.h. no cap. π«Ά
π§ Member Enumeration Documentation
π« enum QwtThermo::OriginMode
Origin mode. This property specifies where the beginning of the liquid is placed (like, where the thermometer starts filling from, bestie π).
See also: setOriginMode(), setOrigin()
Enumerator
OriginMinimumβ The origin is the minimum of the scale.OriginMaximumβ The origin is the maximum of the scale.OriginCustomβ The origin is specified using theorigin()property.
Definition at line 91 of file qwt_thermo.h.
πΈ enum QwtThermo::ScalePosition
Position of the scale π
See also: setScalePosition(), setOrientation()
Enumerator
NoScaleβ The slider has no scale.LeadingScaleβ The scale is right of a vertical or below of a horizontal slider.TrailingScaleβ The scale is left of a vertical or above of a horizontal slider.
Definition at line 73 of file qwt_thermo.h.
π Constructor & Destructor Documentation
π QwtThermo::QwtThermo (QWidget * parent = NULL) [explicit]
Constructor β¨
Parameters
- parent β Parent widget
Definition at line 121 of file qwt_thermo.cpp.
π QwtThermo::~QwtThermo () [virtual]
Destructor. (saying bye to your thermometer, sad but iconic π)
Definition at line 137 of file qwt_thermo.cpp.
π Member Function Documentation π
Okay bestie, this is the full member-function roster in the exact order the docs gave it to us β every signature, parameter, warning, and definition line is staying put. Grab a lil snack. π
QBrush QwtThermo::alarmBrush () const
This one hands you the liquid brush that shows up above the alarm threshold β specifically the QPalette::Highlight brush. π
- Returns: Liquid brush (
QPalette::Highlight) above the alarm threshold. - See also:
setAlarmBrush(),QWidget::palette()
β οΈ Warning: The alarm threshold has no effect, when a color map has been assigned.
Definition at line 761 of file qwt_thermo.cpp.
bool QwtThermo::alarmEnabled () const
Tells you if the alarm threshold is turned on. true means enabled, bestie. β
- Returns: True, when the alarm threshold is enabled.
β οΈ Warning: The alarm threshold has no effect, when a color map has been assigned.
Definition at line 837 of file qwt_thermo.cpp.
double QwtThermo::alarmLevel () const
Gives you the alarm threshold value itself. π‘οΈ
- Returns: Alarm threshold.
- See also:
setAlarmLevel()
β οΈ Warning: The alarm threshold has no effect, when a color map has been assigned.
Definition at line 789 of file qwt_thermo.cpp.
QRect QwtThermo::alarmRect (const QRect & fillRect) const [protected]
Calculates the alarm rectangle of the pipe. Very geometry, very slay. π
- Parameters:
fillRectβ Filled rectangle in the pipe
- Returns: Rectangle to be filled with the alarm brush
- See also:
pipeRect(),fillRect(),alarmLevel(),alarmBrush()
Definition at line 944 of file qwt_thermo.cpp.
int QwtThermo::borderWidth () const
Returns how wide the thermometer pipeβs border is. π
- Returns: Border width of the thermometer pipe.
- See also:
setBorderWidth()
Definition at line 671 of file qwt_thermo.cpp.
void QwtThermo::changeEvent (QEvent * event) [override], [protected], [virtual]
Qt change event handler β it handles the change event, periodt. π¦
- Parameters:
eventβ Event
- Reimplemented from:
QwtAbstractScale
Definition at line 277 of file qwt_thermo.cpp.
QwtColorMap * QwtThermo::colorMap ()
Returns the color map used for the fill color. π
- Returns: Color map for the fill color
β οΈ Warning: The alarm threshold has no effect, when a color map has been assigned.
Definition at line 697 of file qwt_thermo.cpp.
const QwtColorMap * QwtThermo::colorMap () const
Same color-map energy, but the const version. Still giving fill color realness. β¨
- Returns: Color map for the fill color
β οΈ Warning: The alarm threshold has no effect, when a color map has been assigned.
Definition at line 707 of file qwt_thermo.cpp.
void QwtThermo::drawLiquid (QPainter * painter, const QRect & pipeRect) const [protected], [virtual]
Redraws the liquid inside the thermometer pipe. This is the literal glow-up moment. π§
- Parameters:
painterβ PainterpipeRectβ Bounding rectangle of the pipe without borders
Definition at line 546 of file qwt_thermo.cpp.
QBrush QwtThermo::fillBrush () const
Gives you the liquid brush β the QPalette::ButtonText one. ποΈ
- Returns: Liquid (
QPalette::ButtonText) brush. - See also:
setFillBrush(),QWidget::palette()
Definition at line 731 of file qwt_thermo.cpp.
QRect QwtThermo::fillRect (const QRect & pipeRect) const [protected]
Calculates the filled rectangle of the pipe. Geometry bestie behavior. π
- Parameters:
pipeRectβ Rectangle of the pipe
- Returns: Rectangle to be filled (fill and alarm brush)
- See also:
pipeRect(),alarmRect()
Definition at line 897 of file qwt_thermo.cpp.
QSize QwtThermo::minimumSizeHint () const [override], [virtual]
Returns the minimum size hint. Cute liβl widget needs a minimum, okay? π§
- Returns: Minimum size hint
β οΈ Warning: The return value depends on the font and the scale.
- See also:
sizeHint()
Definition at line 856 of file qwt_thermo.cpp.
Qt::Orientation QwtThermo::orientation () const
Returns the orientation. Horizontal? Vertical? Iconic either way. π«
- Returns: Orientation
- See also:
setOrientation()
Definition at line 455 of file qwt_thermo.cpp.
double QwtThermo::origin () const
Returns the origin of the thermo when OriginCustom is enabled. π±
- Returns: Origin of the thermo, when
OriginCustomis enabled - See also:
setOrigin(),setOriginMode(),originMode()
Definition at line 504 of file qwt_thermo.cpp.
QwtThermo::OriginMode QwtThermo::originMode () const
Tells you the mode used to determine the origin. Main-character origin energy only. π
- Returns: Mode, how the origin is determined.
- See also:
setOriginMode(),serOrigin(),origin()
Definition at line 477 of file qwt_thermo.cpp.
void QwtThermo::paintEvent (QPaintEvent * event) [override], [protected], [virtual]
Paint event handler. It paints. It handles. It slays. π¨
- Parameters:
eventβ Paint event
Definition at line 235 of file qwt_thermo.cpp.
QRect QwtThermo::pipeRect () const [protected]
Returns the bounding rectangle of the pipe β without borders β in widget coordinates. π¦
- Returns: Bounding rectangle of the pipe (without borders) in widget coordinates
Definition at line 385 of file qwt_thermo.cpp.
int QwtThermo::pipeWidth () const
Returns the width of the pipe. Thatβs it, thatβs the function. π―
- Returns: Width of the pipe.
- See also:
setPipeWidth()
Definition at line 813 of file qwt_thermo.cpp.
QwtInterval::BorderFlags QwtThermo::rangeFlags () const
Returns the range flags. π©
- Returns: Range flags
- See also:
setRangeFlags()
Definition at line 170 of file qwt_thermo.cpp.
void QwtThermo::resizeEvent (QResizeEvent * event) [override], [protected], [virtual]
Resize event handler β catching that resize moment. π¦
- Parameters:
eventβ Resize event
Definition at line 267 of file qwt_thermo.cpp.
void QwtThermo::scaleChange () [override], [protected], [virtual]
Notifies a scale change. Tell the people, bestie. π£
- Reimplemented from:
QwtAbstractScale
Definition at line 536 of file qwt_thermo.cpp.
QwtScaleDraw * QwtThermo::scaleDraw () [protected]
Returns the scale draw of the thermo. Non-const version, doing its thing. π
- Returns: the scale draw of the thermo
- See also:
setScaleDraw()
Definition at line 226 of file qwt_thermo.cpp.
const QwtScaleDraw * QwtThermo::scaleDraw () const
Returns the scale draw of the thermo β const edition. Same scale-draw icon behavior. β
- Returns: the scale draw of the thermo
- See also:
setScaleDraw()
Definition at line 217 of file qwt_thermo.cpp.
QwtThermo::ScalePosition QwtThermo::scalePosition () const
Returns the scale position. Whereβs the scale? Right there. π
- Returns: Scale position.
- See also:
setScalePosition()
Definition at line 530 of file qwt_thermo.cpp.
void QwtThermo::setAlarmBrush (const QBrush & brush)
Specifies the liquid brush above the alarm threshold. Changes the QPalette::Highlight brush of the palette. π
- Parameters:
brushβ New brush.
- See also:
alarmBrush(),QWidget::setPalette()
β οΈ Warning: The alarm threshold has no effect, when a color map has been assigned.
Definition at line 747 of file qwt_thermo.cpp.
void QwtThermo::setAlarmEnabled (bool on)
Enables or disables the alarm threshold. Yes, the docs say true is βdisabledβ and false is βenabledβ β bestie, we are just relaying the assignment. π
- Parameters:
onβ true (disabled) or false (enabled)
β οΈ Warning: The alarm threshold has no effect, when a color map has been assigned.
Definition at line 825 of file qwt_thermo.cpp.
void QwtThermo::setAlarmLevel (double level)
Specifies the alarm threshold. Set that level. π¨
- Parameters:
levelβ Alarm threshold
- See also:
alarmLevel()
β οΈ Warning: The alarm threshold has no effect, when a color map has been assigned.
Definition at line 775 of file qwt_thermo.cpp.
void QwtThermo::setBorderWidth (int width)
Sets the border width of the pipe. Chunky or thin, your call. πΌοΈ
- Parameters:
widthβ Border width
- See also:
borderWidth()
Definition at line 655 of file qwt_thermo.cpp.
void QwtThermo::setColorMap (QwtColorMap * colorMap)
Assigns a color map for the fill color. π
- Parameters:
colorMapβ Color map
β οΈ Warning: The alarm threshold has no effect, when a color map has been assigned.
Definition at line 683 of file qwt_thermo.cpp.
void QwtThermo::setFillBrush (const QBrush & brush)
Changes the brush of the liquid. Changes the QPalette::ButtonText brush of the palette. ποΈ
- Parameters:
brushβ New brush.
- See also:
fillBrush(),QWidget::setPalette()
Definition at line 720 of file qwt_thermo.cpp.
void QwtThermo::setOrientation (Qt::Orientation orientation)
Sets the orientation. π
- Parameters:
orientationβ Allowed values areQt::HorizontalandQt::Vertical.
- See also:
orientation(),scalePosition()
Definition at line 432 of file qwt_thermo.cpp.
void QwtThermo::setOrigin (double origin)
Specifies the custom origin. If originMode is set to OriginCustom, this property controls where the liquid starts. π
- Parameters:
originβ New origin level
- See also:
setOriginMode(),originMode(),origin()
Definition at line 491 of file qwt_thermo.cpp.
void QwtThermo::setOriginMode (OriginMode m)
Changes how the origin is determined. π±
- See also:
originMode(),serOrigin(),origin()
Definition at line 464 of file qwt_thermo.cpp.
void QwtThermo::setPipeWidth (int width)
Changes the width of the pipe. Thicker pipe, different vibe. π«
- Parameters:
widthβ Width of the pipe
- See also:
pipeWidth()
Definition at line 800 of file qwt_thermo.cpp.
void QwtThermo::setRangeFlags (QwtInterval::BorderFlags flags)
Excludes/includes min/max values. According to the flags, minValue() and maxValue() are included/excluded from the pipe. In case of an excluded value, the corresponding tick is painted 1 pixel off of the pipeRect().
F.e. when a minimum of 0.0 has to be displayed as an empty pipe, the minValue() needs to be excluded. π©
- Parameters:
flagsβ Range flags
- See also:
rangeFlags()
Definition at line 157 of file qwt_thermo.cpp.
void QwtThermo::setScaleDraw (QwtScaleDraw * scaleDraw)
Sets a scale draw. For changing the labels of the scales, it is necessary to derive from QwtScaleDraw and overload QwtScaleDraw::label(). π
- Parameters:
scaleDrawβ ScaleDraw object, that has to be created withnewand will be deleted in~QwtThermo()or the next call ofsetScaleDraw().
Definition at line 207 of file qwt_thermo.cpp.
void QwtThermo::setScalePosition (ScalePosition scalePosition)
Changes the position of the scale. Move it, place it, scale-position it. π
- Parameters:
scalePositionβ Position of the scale.
- See also:
ScalePosition,scalePosition()
Definition at line 515 of file qwt_thermo.cpp.
void QwtThermo::setSpacing (int spacing)
Changes the spacing between pipe and scale. A spacing of 0 means that the backbone of the scale is below the pipe.
The default setting is 3 pixels. π
- Parameters:
spacingβ Number of pixels
- See also:
spacing();
Definition at line 629 of file qwt_thermo.cpp.
void QwtThermo::setValue (double value) [virtual], [slot]
Sets the current value. The main event, honestly. π₯
- Parameters:
valueβ New Value
- See also:
value()
Definition at line 181 of file qwt_thermo.cpp.
QSize QwtThermo::sizeHint () const [override], [virtual]
Returns the minimum size hint. Cute size-hint behavior. π§
- Returns: the minimum size hint
- See also:
minimumSizeHint()
Definition at line 846 of file qwt_thermo.cpp.
int QwtThermo::spacing () const
Returns the number of pixels between pipe and scale. π
- Returns: Number of pixels between pipe and scale
- See also:
setSpacing()
Definition at line 645 of file qwt_thermo.cpp.
double QwtThermo::value () const
Returns the value. Thatβs the whole vibe. π
- Returns: Return the value.
Definition at line 191 of file qwt_thermo.cpp.
π Author π
Generated automatically by Doxygen for Qwt User's Guide from the source code.
Okay bestie, thatβs the whole member-function lineup! π«Ά This page is auto-generated by Doxygen for the Qwt User's Guide straight from the source code β footer source/version vibes: Qwt User's Guide + QwtThermo(3). The date isnβt printed in this footer copy, so consider this your cute sign-off instead. πβ¨
π¦ where this page comes from
- alpine 3.24: qwt-doc 6.3.0-r0 Β· custom
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms