Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

QwtThermo Class Reference

The Thermometer Widget. More...

#include <qwt_thermo.h>

Inheritance diagram for QwtThermo::

QwtScaleIf List of all members.

Public Types

enum  ScalePos {
  None, Left, Right, Top,
  Bottom
}

Public Slots

void setValue (double val)

Public Methods

 QwtThermo (QWidget *parent=0, const char *name=0)
virtual ~QwtThermo ()
void setOrientation (Qt::Orientation o, ScalePos s)
void setBorderWidth (int w)
void setFillColor (const QColor &c)
void setAlarmColor (const QColor &c)
void setAlarmLevel (double v)
void setAlarmEnabled (int tf)
void setPipeWidth (int w)
void setRange (double vmin, double vmax)
void setMargin (int m)
double maxValue ()
double minValue ()
double value ()
virtual QSize sizeHint () const
virtual QSize minimumSizeHint () const
virtual QSizePolicy sizePolicy () const

Protected Methods

void draw (QPainter *p, const QRect &update_rect)
void drawThermo (QPainter *p)
void layoutThermo (bool update=TRUE)
virtual void scaleChange ()
virtual void fontChange (const QFont &oldFont)
virtual void paintEvent (QPaintEvent *e)
virtual void resizeEvent (QResizeEvent *e)

Detailed Description

The Thermometer Widget.


Member Enumeration Documentation

enum QwtThermo::ScalePos
 

Position of the scale

See also:
QwtThermo;;QwtThermo


Constructor & Destructor Documentation

QwtThermo::QwtThermo QWidget *    parent = 0,
const char *    name = 0
 

Constructor.

QwtThermo::~QwtThermo   [virtual]
 

Destructor.


Member Function Documentation

void QwtThermo::draw QPainter *    p,
const QRect &    ur
[protected]
 

redraw the thermo.

void QwtThermo::drawThermo QPainter *    p [protected]
 

Redraw the thermometer.

void QwtThermo::fontChange const QFont &    f [protected, virtual]
 

notify changed font.

void QwtThermo::layoutThermo bool    update_geometry = TRUE [protected]
 

Recalculate the thermo's geometry and layout based on.

double QwtThermo::maxValue  
 

Returns:
max value.

QSize QwtThermo::minimumSizeHint   const [virtual]
 

Return a minimum size hint.

Warning:
The return value depends on the font and the scale.
See also:
QwtThermo::sizeHint

double QwtThermo::minValue  
 

Returns:
min value.

void QwtThermo::paintEvent QPaintEvent *    e [protected, virtual]
 

Qt paint event.

void QwtThermo::resizeEvent QResizeEvent *    e [protected, virtual]
 

Qt resize event handler.

void QwtThermo::scaleChange   [protected, virtual]
 

notify changed scale.

Reimplemented from QwtScaleIf.

void QwtThermo::setAlarmColor const QColor &    c
 

Specify liquid color above the alarm threshold.

Parameters:
c  New color. The default is white.

void QwtThermo::setAlarmEnabled int    tf
 

Enable or disable alarm threshold.

Parameters:
tf  ZERO (disabled) or non-zero (enabled)

void QwtThermo::setAlarmLevel double    v
 

Specify the alarm threshold.

void QwtThermo::setBorderWidth int    w
 

Set the border width of the pipe.

void QwtThermo::setFillColor const QColor &    c
 

Change the color of the liquid.

Parameters:
c  New color. The default color is black.

void QwtThermo::setMargin int    m
 

Specify the distance between the pipe's endpoints and the widget's border.

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.

Parameters:
m  New Margin. The default values are 10 for horizontal orientation and 20 for vertical orientation.
Warning:
The margin has no effect if the scale is disabled.
This function is a NOOP because margins are determined automatically.

void QwtThermo::setOrientation Qt::Orientation    o,
ScalePos    s
 

Change the thermometer's orientation.

The scale position None disables the scale.

Parameters:
o  orientation. Possible values are Qt::Horizontal and Qt::Vertical. The default value is Qt::Vertical.
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.

void QwtThermo::setPipeWidth int    w
 

Change the width of the pipe.

void QwtThermo::setRange double    vmin,
double    vmax
 

Set the range.

Parameters:
vminValue  corresponding lower or left end of the thermometer
vmax  Value corresponding to the upper or right end of the thermometer

void QwtThermo::setValue double    v [slot]
 

Set the current value.

QSize QwtThermo::sizeHint   const [virtual]
 

Returns:
the minimum size hint
See also:
QwtThermo::minimumSizeHint

QSizePolicy QwtThermo::sizePolicy   const [virtual]
 

Returns:
Fixed/MinimumExpanding for vertical, MinimumExpanding/Fixed for horizontal thermos.

double QwtThermo::value  
 

Returns:
value.


Generated on Tue May 28 15:31:02 2002 for Qwt User's Guide by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001