Home

QtThumbWheel Class Reference

The QtThumbWheel widget provides a vertical or horizontal thumb-wheel widget. More...

 #include <QtThumbWheel>

Inherits QAbstractSlider.

Properties

Public Functions

Additional Inherited Members


Detailed Description

The QtThumbWheel widget provides a vertical or horizontal thumb-wheel widget.

The widget is often used in 2D and 3D applications to control rotation, zooming and scrolling. The rotation of the thumb-wheel is translated into an integer value within a specified range.

QtThumbWheel inherits QAbstractSlider, which provides the "integer" component of the thumb-wheel. setRange() and value() are likely to be used by practically all thumb-wheel users; see the QAbstractSlider documentation for information about the many other functions that class provides.

The main functions provided by the thumb-wheel are the transmission ratio, cog and wrap around controls; you can use setTransmissionRatio() to adjust the ratio of the speed of the wheel to the speed at which the value changes, and setCogCount() to set the number of cogs on the wheel. Use setOrientation() to indicate whether the thumb-wheel is vertically or horizontally oriented.

A thumb-wheel accepts focus on Tab and supports the mouse wheel. It also provides a keyboard interface.


Property Documentation

cogCount : int

This property holds sets the number of cogs on the thumb-wheel(the default is 17).

Use this property to adapt the number of cogs to the size of the wheel. The property only has a visual effect.

Access functions:

limitedDrag : bool

This property holds whether drags out of the wheel will keep turning it.

If enabled, a click and drag operation will not turn the wheel further once the mouse goes outside the minimum or maximum edges of the QtThumbWheel widget. Set this property to disabled to allow for long drags, i.e. large value changes with a single mouse move. By default this property is enabled, i.e. drags are limited.

Access functions:

transmissionRatio : double

This property holds the transmission ratio between the thumb-wheel and the value range.

The default ratio is 1.0, which means that the user must turn the wheel 360 degress(one full spin) to go from minimum to maximum. Giving a ratio of 2.0 will require the user to spin the wheel twice to cross the same range, and a value of 0.5 will require only half a turn.

Access functions:

wrapsAround : bool

This property holds whether the values should wrap around.

If enabled, when the value exceeds maximum, it is reset to minimum, and when the value goes below minimum, it is reset to maximum value. This is useful when the thumb-wheel should not stop at the minimum and maximum value boundaries.

Access functions:


Member Function Documentation

QtThumbWheel::QtThumbWheel ( QWidget * parent = 0 )

Constructs a QtThumbWheel object. The parent parameter is passed to the QAbstractSlider constructor.

QtThumbWheel::QtThumbWheel ( int minimum, int maximum, int pageStep, int value, Qt::Orientation orientation, QWidget * parent = 0 )

Constructs a QtThumbWheel object. minimum and maximum set the initial minimum and maximum values, and pageStep sets the size of each page step. value sets the initial value and orientation is either Vertical or Horizontal. The parent parameter is passed to the QAbstractSlider constructor.

QtThumbWheel::~QtThumbWheel ()

Destroys the QtThumbWheel.


Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies) Trademarks
Qt Solutions