Qtopia Home - Classes - Hierachy - Annotated - Functions - Licenses - Reference |
|
The QDial class provides a rounded rangecontrol (like a speedometer or potentiometer). More...
#include <qdial.h>
Inherits QWidget and QRangeControl.
The QDial class provides a rounded rangecontrol (like a speedometer or potentiometer).
Q dial is used when the user needs to control a value within a program-definable range, and the range either wraps around (typically, 0-359 degrees) or the dialog layout needs a square widget.
Both API- and UI-wise, the dial is very like a slider. Indeed, when wrapping() is FALSE (the default) there is no hard difference between a slider and a dial. They have the same signals, slots and member functions, all of which do the same things. Which one to use depends only on your taste and on the application.
The dial initially emits valueChanged() signals continuously while the slider is being moved; you can make it emit the signal less often by calling setTracking( FALSE ). dialMoved() is emitted continuously even when tracking() is FALSE.
The slider also emits dialPressed() and dialReleased() signals when the mouse button is pressed and released. But note that the dial's value can change without these signals being emitted; the keyboard and wheel can be used to change the value.
Unlike the slider, QDial attempts to draw a "nice" number of notches rather than one per lineStep(). If possible, that number is lineStep(), but if there aren't enough pixels to draw every, QDial will draw every second, third or something. notchSize() returns the number of units per notch, hopefully a multiple of lineStep(); setNotchTarget() sets the target distance between neighbouring notches in pixels. The default is 3.75 pixels.
Like the slider, the dial makes the QRangeControl functions setValue(), addLine(), substractLine(), addPage() and subtractPage() available as slots.
The dial's keyboard interface is fairly simple: The left/up and right/down arrow keys move by lineStep(), page up and page down by pageStep() and Home and End to minValue() and maxValue().
See also QScrollBar, QSpinBox, and GUI Design Handbook: Slider.
value is forced to be within the legal range.
This signal is emitted whenever the dial value changes. The frequency of this signal is not influenced by setTracking().
See also valueChanged(int).
This signal is emitted when the use begins mouse interaction with the dial.
See also dialReleased().
This signal is emitted when the use ends mouse interaction with the dial.
See also dialPressed().
See also notchTarget() and lineStep().
The actual size differs a bit from the target.
See also setNotchesVisible().
Reimplemented from QRangeControl.
Calls the virtual stepChange() function if the new line step is different from the previous setting.
See also lineStep(), QRangeControl::setSteps(), setPageStep(), and setRange().
See also setRange().
See also setRange().
See also notchTarget() and notchSize().
Calls the virtual stepChange() function if the new page step is different from the previous setting.
See also pageStep(), QRangeControl::setSteps(), setLineStep(), and setRange().
Tracking is initially enabled.
See also setTracking().
Reimplemented from QRangeControl.
This signal is emitted whenever the dial value changes. The frequency of this signal is influenced by setTracking().
See also QDial::setWrapping().
This file is part of the Qtopia platform, copyright © 1995-2005 Trolltech, all rights reserved.
| Copyright © 2005 Trolltech | Trademarks | Qtopia version 2.2.0
|