C

DialStyle QML Type

Provides custom styling for Dial. More...

Import Statement: import QtQuick.Enterprise.Controls.Styles 1.0
Since: QtQuick.Enterprise.Controls.Styles 1.0

Properties

Methods

Detailed Description

You can create a custom dial by replacing the following delegates:

Property Documentation

background : Component

The background of the dial.

The implicit size of the dial is taken from this component.


read-onlycontrol : Dial

The Dial that this style is attached to.

This QML property was introduced in Qt 1.3.


handle : Component

The handle of the dial.

The handle is automatically positioned within the dial, based on the handleInset and the implicit width and height of the handle itself.

This QML property was introduced in Qt 1.2.


handleInset : real

The distance in pixels from the outside of the dial (outerRadius) to the center of the handle.

This QML property was introduced in Qt 1.2.


read-onlylabelCount : int

The amount of tickmark labels displayed by the dial, calculated from labelStepSize and the control's minimumValue and maximumValue.

This QML property was introduced in QtQuick.Enterprise.Controls 1.1.

See also tickmarkCount and minorTickmarkCount.


labelInset : real

The distance in pixels from the outside of the dial (outerRadius) at which the center of the value marker text is drawn.

This QML property was introduced in QtQuick.Enterprise.Controls 1.1.


labelStepSize : real

The interval at which tickmark labels are displayed.

For example, if this property is set to 10 (the default), control.minimumValue to 0, and control.maximumValue to 100, the tickmark labels displayed will be 0, 10, 20, etc., to 100, along the circumference of the dial.

This QML property was introduced in QtQuick.Enterprise.Controls 1.1.


minorTickmark : Component

This component defines each individual minor tickmark. The position of each minor tickmark is already set; only the implicitWidth and implicitHeight need to be specified.

Each instance of this component has access to the following properties:

readonly property int styleData.indexThe index of this tickmark.
readonly property real styleData.valueThe value that this tickmark represents.

By default, no minor tickmark is defined.

This QML property was introduced in QtQuick.Enterprise.Controls 1.1.


minorTickmarkCount : int

The amount of minor tickmarks between each tickmark.

This QML property was introduced in QtQuick.Enterprise.Controls 1.1.

See also tickmarkCount.


minorTickmarkInset : real

The distance in pixels from the outside of the dial (outerRadius) at which the outermost point of the minor tickmark line is drawn.

This QML property was introduced in QtQuick.Enterprise.Controls 1.1.


read-onlyouterRadius : real

The distance from the center of the dial to the outer edge of the dial.

This property is useful for determining the size of the various components of the style, in order to ensure that they are scaled proportionately when the dial is resized.

This QML property was introduced in QtQuick.Enterprise.Controls 1.1.


tickmark : Component

This component defines each individual tickmark. The position of each tickmark is already set; only the implicitWidth and implicitHeight need to be specified.

Each instance of this component has access to the following properties:

readonly property int styleData.indexThe index of this tickmark.
readonly property real styleData.valueThe value that this tickmark represents.

This QML property was introduced in QtQuick.Enterprise.Controls 1.1.


read-onlytickmarkCount : int

The amount of tickmarks displayed by the dial, calculated from tickmarkStepSize and the control's minimumValue and maximumValue.

This QML property was introduced in QtQuick.Enterprise.Controls 1.1.

See also minorTickmarkCount.


tickmarkInset : real

The distance in pixels from the outside of the dial (outerRadius) at which the outermost point of the tickmark line is drawn.

This QML property was introduced in QtQuick.Enterprise.Controls 1.1.


tickmarkLabel : Component

This defines the text of each tickmark label on the dial.

Each instance of this component has access to the following properties:

readonly property int styleData.indexThe index of this label.
readonly property real styleData.valueThe value that this label represents.

By default, no label is defined.

This QML property was introduced in QtQuick.Enterprise.Controls 1.1.


tickmarkStepSize : real

The interval at which tickmarks are displayed.

For example, if this property is set to 10, control.minimumValue to 0, and control.maximumValue to 100, the tickmarks displayed will be 0, 10, 20, etc., to 100, along the circumference of the dial.

This QML property was introduced in QtQuick.Enterprise.Controls 1.1.


Method Documentation

valueToAngle( value)

Returns value as an angle in degrees.

This function is useful for custom drawing or positioning of items in the style's components. For example, it can be used to calculate the angles at which to draw an arc around the dial indicating the safe range of values.

For example, if minimumValueAngle is set to 270 and maximumValueAngle is set to 90, this function will return 270 when passed minimumValue and 90 when passed maximumValue.

This QML method was introduced in QtQuick.Enterprise.Controls 1.2.


Available under certain Qt licenses.
Find out more.