Qwt Programmer's manual

QwtThermo


NAME

QwtThermo - The Thermometer Widget

SYNOPSIS

#include <qwt_thermo.h>

INHERITED CLASSES

QwtScaleIf, QWidget

PUBLIC MEMBERS

QwtThermo
Constructor
~QwtThermo
Destructor
setOrientation
Change orientation
setBorderWidth
change the border width of the pipe
setFillColor
set fill color
setAlarmColor
set color for the range exceeding the alarm threshold
setAlarmLevel
set alarm threshold
setAlarmEnabled
enable alarm threshold
setPipeWidth
set the width of the pipe
setRange
set the range to be displayed
setMargin
change margin between the pipe and the widget border
maxValue
return the upper limit of the range
minValue
return the lower limit of the range
value
return current value


MEMBER FUNCTION DESCRIPTION


QwtThermo::QwtThermo

Constructor

Syntax

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

Parameters

QWidget *parent
parent widget
const char *name
name

QwtThermo::~QwtThermo

Destructor

Syntax

QwtThermo::~QwtThermo()

QwtThermo::setValue

Set the current value

Syntax

void QwtThermo::setValue(double v)

QwtThermo::setOrientation

Change the thermometer's orientation

Syntax

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

Parameters

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

Description

The scale position None disables the scale.

QwtThermo::setBorderWidth

Set the border width of the pipe.

Syntax

void QwtThermo::setBorderWidth(int w)

Parameters

int w
border width

QwtThermo::setRange

Set the range

Syntax

void QwtThermo::setRange(double vmin, double vmax)

Parameters

double vmin
Value corresponding lower or left end of the thermometer
double vmax
Value corresponding to the upper or right end of the

QwtThermo::setFillColor

Change the color of the liquid.

Syntax

void QwtThermo::setFillColor(const QColor &c)

Parameters

const QColor &c
New color. The default color is black.

Note

The default color is black.

QwtThermo::setAlarmColor

Specify liquid color above the alarm threshold

Syntax

void QwtThermo::setAlarmColor(const QColor &c)

Parameters

const QColor &c
New color. The default is white.

Note

The default color is white.

QThermo::setAlarmLevel

Specify the alarm threshold

Syntax

void QwtThermo::setAlarmLevel(double v)

Parameters

double v
threshold value

QwtThermo::setPipeWidth

Change the width of the pipe

Syntax

void QwtThermo::setPipeWidth(int w)

Parameters

int w
width

QwtThermo::setMargin

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

Syntax

void QwtThermo::setMargin(int m)

Parameters

int m
New Margin. The default values are 10 for horizontal orientation and 20 for vertical orientation.

Description

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.

Note

The margin has no effect if the scale is disabled.

QwtThermo::setAlarmEnabled

Enable or disable alarm threshold

Syntax

void QwtThermo::setAlarmEnabled(int tf)

Parameters

int tf
TRUE (enabled) or FALSE(disabled)

Qwt Widget Library 27/04/97