Qwt Programmer's Manual

QwtWheel


NAME

QwtWheel - The Wheel Widget

SYNOPSIS

#include <qwt_wheel.h>

INHERITED CLASSES

QwtSliderBase

PUBLIC MEMBERS

setTotalAngle
Set the maximum angle by which the wheel can be turned
setTickCnt
set the number of grooves in the wheel's surface
setOrientation
Change the orientation
setViewAngle
Change the visible angle
setInternalBorder
Change the internal border
setMass
Set the mass for a flywheel effect

DESCRIPTION

The wheel widget can be used to change values over a very large range in very small steps. Using the setMass member, it can be configured as a flywheel.

EXAMPLE

See the radio example.

MEMBER FUNCTION DESCRIPTION


QwtWheel::QwtWheel

Constructor

Parameters

QWidget *parent, const char *name

Syntax

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

QwtWheel::~QwtWheel

Destructor

Syntax

QwtWheel::~QwtWheel()

QwtWheel::setTickCnt

Adjust the number of grooves in the wheel's surface.

Syntax

void QwtWheel::setTickCnt(int cnt)

Parameters

int cnt
Number of grooves per 360 degrees

Description

The number of grooves is limited to 6 <= cnt <= 50. Values outside this range will be clipped. The default value is 10.

QwtWheel::setInternalBorder

Set the internal border width of the wheel.

Syntax

void QwtWheel::setInternalBorder(int w)

Parameters

int w
border width

Description

The internal border must not be smaller than 1 and is limited in dependence on the wheel's size. Values outside the allowed range will be clipped. The internal border defaults to 1.

QwtWheel::setTotalAngle

Set the total angle which the wheel can be turned.

Syntax

void QwtWheel::setTotalAngle(double angle)

Parameters

double angle
total angle in degrees

Description

One full turn of the wheel corresponds to an angle of 360 degrees. A total angle of n*360 degrees means that the wheel has to be turned n times around its axis to get from the minimum value to the maximum value. The default setting of the total angle is 360 degrees.

QwtWheel::setOrientation

Set the wheel's orientation.

Syntax

void QwtWheel::setOrientation(Orient o)

Parameters

Orientation o
Orientation. Allowed values are QwtWheel::Horizontal and QwtWheel::Vertical.

Description

The default orientation is QwtWheel::Horizontal.

QwtWheel::setViewAngle

Specify the visible portion of the wheel.

Syntax

void QwtWheel::setViewAngle(double angle)

Parameters

double angle
Visible angle in degrees

Description

You may use this function for fine-tuning the appearance of the wheel. The default value is 175 degrees. The value is limited from 10 to 175 degrees.

QwtWheel::setMass

Set the mass of the wheel

Syntax

void QwtWheel::setMass(double val)

Parameters

double val - the wheel's mass

Description

Assigning a mass turns the wheel into a flywheel.
Qwt Widget Library 02/04/97