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>

Inherits QWidget, and QwtScaleIf.

Inheritance diagram for QwtThermo

Inheritance graph
[legend]
List of all members.

Public Types

enum  Orientation { Horizontal, Vertical }
enum  ScalePos {
  None, Left, Right, Top,
  Bottom
}

Public Methods

 QwtThermo (QWidget *parent = 0, const char *name = 0)
 ~QwtThermo ()
void setOrientation (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 ()

Public Slots

void setValue (double val)

Protected Methods

void paintEvent (QPaintEvent *e)
void resizeEvent (QResizeEvent *e)
void scaleChange ()

Detailed Description

The Thermometer Widget.


Constructor & Destructor Documentation

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

Constructor.

QwtThermo::~QwtThermo ( )
 

Destructor.


Member Function Documentation

void QwtThermo::paintEvent ( QPaintEvent * e ) [protected]
 

Qt paint event handler.

void QwtThermo::resizeEvent ( QResizeEvent * e ) [protected]
 

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.

void QwtThermo::setOrientation ( Orientation o,
ScalePos s )
 

Change the thermometer's orientation.

The scale position None disables the scale.

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


The documentation for this class was generated from the following files:
Generated at Thu Dec 14 00:27:22 2000 for Qwt User's Guide by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000