TQDial 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 similar to a slider. Indeed, when wrapping() is FALSE (the default) there is no real 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 you use depends only on your taste and on the application.
.PP
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.
.PP
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, TQDial attempts to draw a "nice" number of notches rather than one per lineStep(). If possible, the number of notches drawn is one per lineStep(), but if there aren't enough pixels to draw every one, TQDial will draw every second, third etc., notch. 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(), subtractLine(), addPage() and subtractPage() available as slots.
.PP
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().
Constructs a dial called \fIname\fR with parent \fIparent\fR. \fIf\fR is propagated to the TQWidget constructor. It has the default range of a QRangeControl.
Constructs a dial called \fIname\fR with parent \fIparent\fR. The dial's value can never be smaller than \fIminValue\fR or greater than \fImaxValue\fR. Its page step size is \fIpageStep\fR, and its initial value is \fIvalue\fR.
.PP
\fIvalue\fR is forced to be within the legal range.
Set this property's value with setMinValue() and get this property's value with minValue().
.SH "int notchSize"
This property holds the current notch size.
.PP
The notch size is in range control units, not pixels, and if possible it is a multiple of lineStep() that results in an on-screen notch size near notchTarget().
.PP
See also notchTarget and lineStep.
.PP
Get this property's value with notchSize().
.SH "double notchTarget"
This property holds the target number of pixels between notches.
Set this property's value with setNotchTarget() and get this property's value with notchTarget().
.SH "bool notchesVisible"
This property holds whether the notches are shown.
.PP
If TRUE, the notches are shown. If FALSE (the default) notches are not shown.
.PP
Set this property's value with setNotchesVisible() and get this property's value with notchesVisible().
.SH "int pageStep"
This property holds the current page step.
.PP
setPageStep() calls the virtual stepChange() function if the new page step is different from the previous setting.
.PP
See also stepChange().
.PP
Set this property's value with setPageStep() and get this property's value with pageStep().
.SH "bool tracking"
This property holds whether tracking is enabled.
.PP
If TRUE (the default), tracking is enabled. This means that the arrow can be moved using the mouse; otherwise the arrow cannot be moved with the mouse.
.PP
Set this property's value with setTracking() and get this property's value with tracking().
Set this property's value with setValue() and get this property's value with value().
.SH "bool wrapping"
This property holds whether wrapping is enabled.
.PP
If TRUE, wrapping is enabled. This means that the arrow can be turned around 360<36>. Otherwise there is some space at the bottom of the dial which is skipped by the arrow.
.PP
This property's default is FALSE.
.PP
Set this property's value with setWrapping() and get this property's value with wrapping().