QWT API (English) 7.0.1
Qt Widget Library for Technical Applications - English API Documentation
Loading...
Searching...
No Matches
Classes | Public Types | Public Slots | Public Member Functions | Protected Member Functions | Properties | List of all members
QwtThermo Class Reference

The Thermometer Widget. More...

#include <qwt_thermo.h>

Inheritance diagram for QwtThermo:
QwtAbstractScale

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.
 
QwtColorMapcolorMap ()
 Return color map for the fill color.
 
const QwtColorMapcolorMap () 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 QwtScaleDrawscaleDraw () 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 QwtScaleDivscaleDiv () 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 QwtScaleEnginescaleEngine () const
 Return the scale engine (const version)
 
QwtScaleEnginescaleEngine ()
 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 QwtScaleMapscaleMap () 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.
 
QwtScaleDrawscaleDraw ()
 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 QwtAbstractScaleDrawabstractScaleDraw () const
 Return the scale draw (const version) (English only)
 
QwtAbstractScaleDrawabstractScaleDraw ()
 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
 

Detailed Description

The Thermometer Widget.

Member Enumeration Documentation

◆ OriginMode

Origin mode. This property specifies where the beginning of the liquid is placed.

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 the origin() property.

◆ ScalePosition

Position of the scale.

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.

Constructor & Destructor Documentation

◆ QwtThermo()

QwtThermo::QwtThermo ( QWidget *  parent = nullptr)
explicit

Constructor.

◆ ~QwtThermo()

QwtThermo::~QwtThermo ( )
virtual

Destructor.

Member Function Documentation

◆ alarmBrush()

QBrush QwtThermo::alarmBrush ( ) const

Return liquid brush (QPalette::Highlight) above the alarm threshold.

◆ alarmEnabled()

bool QwtThermo::alarmEnabled ( ) const

Return true when the alarm threshold is enabled.

◆ alarmLevel()

double QwtThermo::alarmLevel ( ) const

Return alarm threshold.

◆ alarmRect()

QRect QwtThermo::alarmRect ( const QRect &  fillRect) const
protected

Return the alarm rectangle.

Calculate the alarm rectangle of the pipe.

◆ borderWidth()

int QwtThermo::borderWidth ( ) const

Return border width of the thermometer pipe.

◆ changeEvent()

void QwtThermo::changeEvent ( QEvent *  event)
overrideprotectedvirtual

Handle change events.

Qt change event handler.

Reimplemented from QwtAbstractScale.

◆ colorMap() [1/2]

QwtColorMap * QwtThermo::colorMap ( )

Return color map for the fill color.

◆ colorMap() [2/2]

const QwtColorMap * QwtThermo::colorMap ( ) const

Return color map for the fill color (const version)

◆ drawLiquid()

void QwtThermo::drawLiquid ( QPainter *  painter,
const QRect &  pipeRect 
) const
protectedvirtual

Draw the liquid.

Redraw the liquid in thermometer pipe.

◆ fillBrush()

QBrush QwtThermo::fillBrush ( ) const

Return liquid (QPalette::ButtonText) brush.

◆ fillRect()

QRect QwtThermo::fillRect ( const QRect &  pipeRect) const
protected

Return the fill rectangle.

Calculate the filled rectangle of the pipe.

◆ minimumSizeHint()

QSize QwtThermo::minimumSizeHint ( ) const
overridevirtual

Return minimum size hint.

◆ orientation()

Qt::Orientation QwtThermo::orientation ( ) const

Return orientation.

◆ origin()

double QwtThermo::origin ( ) const

Return origin of the thermometer when OriginCustom is enabled.

◆ originMode()

QwtThermo::OriginMode QwtThermo::originMode ( ) const

Return mode how the origin is determined.

◆ paintEvent()

void QwtThermo::paintEvent ( QPaintEvent *  event)
overrideprotectedvirtual

Handle paint events.

Paint event handler.

◆ pipeRect()

QRect QwtThermo::pipeRect ( ) const
protected

Return the pipe rectangle.

Return bounding rectangle of the pipe.

◆ pipeWidth()

int QwtThermo::pipeWidth ( ) const

Return width of the pipe.

◆ rangeFlags()

QwtInterval::BorderFlags QwtThermo::rangeFlags ( ) const

Return range flags.

◆ resizeEvent()

void QwtThermo::resizeEvent ( QResizeEvent *  event)
overrideprotectedvirtual

Handle resize events.

Resize event handler.

◆ scaleChange()

void QwtThermo::scaleChange ( )
overrideprotectedvirtual

Handle scale changes.

Notify a scale change.

Reimplemented from QwtAbstractScale.

◆ scaleDraw() [1/2]

QwtScaleDraw * QwtThermo::scaleDraw ( )
protected

Return the scale draw.

Return the scale draw of the thermometer (non-const version)

◆ scaleDraw() [2/2]

const QwtScaleDraw * QwtThermo::scaleDraw ( ) const

Return the scale draw of the thermometer (const version)

◆ scalePosition()

QwtThermo::ScalePosition QwtThermo::scalePosition ( ) const

Return scale position.

◆ setAlarmBrush()

void QwtThermo::setAlarmBrush ( const QBrush &  brush)

Specify the liquid brush above the alarm threshold.

◆ setAlarmEnabled()

void QwtThermo::setAlarmEnabled ( bool  on)

Enable or disable the alarm threshold.

◆ setAlarmLevel()

void QwtThermo::setAlarmLevel ( double  level)

Specify the alarm threshold.

◆ setBorderWidth()

void QwtThermo::setBorderWidth ( int  width)

Set the border width of the pipe.

◆ setColorMap()

void QwtThermo::setColorMap ( QwtColorMap colorMap)

Assign a color map for the fill color.

◆ setFillBrush()

void QwtThermo::setFillBrush ( const QBrush &  brush)

Change the brush of the liquid.

◆ setOrientation()

void QwtThermo::setOrientation ( Qt::Orientation  orientation)

Set the orientation.

◆ setOrigin()

void QwtThermo::setOrigin ( double  origin)

Specify the custom origin.

◆ setOriginMode()

void QwtThermo::setOriginMode ( OriginMode  m)

Change how the origin is determined.

◆ setPipeWidth()

void QwtThermo::setPipeWidth ( int  width)

Change the width of the pipe.

◆ setRangeFlags()

void QwtThermo::setRangeFlags ( QwtInterval::BorderFlags  flags)

Exclude/Include min/max values.

◆ setScaleDraw()

void QwtThermo::setScaleDraw ( QwtScaleDraw scaleDraw)

Set a scale draw.

◆ setScalePosition()

void QwtThermo::setScalePosition ( ScalePosition  scalePosition)

Change the position of the scale.

◆ setSpacing()

void QwtThermo::setSpacing ( int  spacing)

Change the spacing between pipe and scale.

◆ setValue

void QwtThermo::setValue ( double  value)
virtualslot

Set the current value.

◆ sizeHint()

QSize QwtThermo::sizeHint ( ) const
overridevirtual

Return the minimum size hint.

◆ spacing()

int QwtThermo::spacing ( ) const

Return number of pixels between pipe and scale.

◆ value()

double QwtThermo::value ( ) const

Return the value.


The documentation for this class was generated from the following files: