Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qquickdial.cpp File Reference

(2451ff25a531a2427825726f4b5f015fb01d2663)

#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>
static bool areRepresentableAsInteger ( Real... numbers)
static

Definition at line 346 of file qquickdial.cpp.

References number.

Referenced by QQuickDialPrivate::updateAllValuesAreInteger().

+ Here is the caller graph for this function:

◆ toUserAngleDeg()

QT_BEGIN_NAMESPACE constexpr qreal toUserAngleDeg ( qreal logicAngleRad)
constexpr

Circular dial that is rotated to set a value.

\qmltype Dial
\inherits Control

! \instantiates 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 77 of file qquickdial.cpp.

References M_PI.

Referenced by QQuickDialPrivate::circularPositionAt().

+ Here is the caller graph for this function:

Variable Documentation

◆ defaultEndAngle

const qreal defaultEndAngle = 140
static

Definition at line 83 of file qquickdial.cpp.

Referenced by QQuickDial::componentComplete().

◆ defaultStartAngle

const qreal defaultStartAngle = -140
static

Definition at line 82 of file qquickdial.cpp.

Referenced by QQuickDial::componentComplete().