Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qquickdial.cpp File Reference

(01cd43d30e3ca2c4dd94a4a4711604adb9417517)

#include "qquickdial_p.h"
#include "qquickdeferredexecute_p_p.h"
#include <QtCore/qmath.h>
#include <QtQuick/private/qquickflickable_p.h>
#include <QtQuickTemplates2/private/qquickcontrol_p_p.h>
#include <cmath>
#include "moc_qquickdial_p.cpp"
Include dependency graph for qquickdial.cpp:

Go to the source code of this file.

Classes

class  QQuickDialPrivate

Functions

QT_BEGIN_NAMESPACE constexpr qreal toUserAngleDeg (qreal logicAngleRad)
 Circular dial that is rotated to set a value.
template<typename ... Real>
static bool areRepresentableAsInteger (Real... numbers)

Variables

static const qreal defaultStartAngle = -140
static const qreal defaultEndAngle = 140

Function Documentation

◆ areRepresentableAsInteger()

template<typename ... Real>
bool areRepresentableAsInteger ( Real... numbers)
static

Definition at line 347 of file qquickdial.cpp.

◆ toUserAngleDeg()

QT_BEGIN_NAMESPACE constexpr qreal toUserAngleDeg ( qreal logicAngleRad)
constexpr

Circular dial that is rotated to set a value.

\qmltype Dial
\inherits Control

! \nativetype QQuickDial \inqmlmodule QtQuick.Controls

Since
5.7

The Dial is similar to a traditional dial knob that is found on devices such as stereos or industrial equipment. It allows the user to specify a value within a range.

The value of the dial is set with the \l value property. The range is set with the \l from and \l to properties. To enable or disable wrapping, use the \l wrap property.

The dial can be manipulated with a keyboard. It supports the following actions:

\table \header

inputMode

See also
{Customizing Dial}, {Input Controls}
Since
QtQuick.Controls 2.2 (Qt 5.9) \qmlsignal QtQuick.Controls::Dial::moved()

This signal is emitted when the dial has been interactively moved by the user by either touch, mouse, or keys.

\qmlsignal QtQuick.Controls::Dial::wrapped(Dial.WrapDirection direction)

Since
6.6

This signal is emitted when the dial wraps around, i.e. goes beyond its maximum value to its minimum value, or vice versa. It is only emitted when \l wrap is true. The direction argument specifies the direction of the full rotation and will be one of the following arguments:

\value Dial.Clockwise The dial wrapped in clockwise direction. \value Dial.CounterClockwise The dial wrapped in counterclockwise direction.

Definition at line 78 of file qquickdial.cpp.

Variable Documentation

◆ defaultEndAngle

const qreal defaultEndAngle = 140
static

Definition at line 84 of file qquickdial.cpp.

◆ defaultStartAngle

const qreal defaultStartAngle = -140
static

Definition at line 83 of file qquickdial.cpp.