DialerHand QML Type

DialerHand represents a value selector on a Dialer. More...

Import Statement: import Lomiri.Components.Pickers 1.3
Inherits:

StyledItem

Properties

Detailed Description

DialerHand components have meaning only if those are placed inside Dialer components. The dialer hand presents a value selection from the given dialer's minimum and maximum values.

By default all hands are placed on the dialer's hand space, on the outer dialer disk. By default all hands have teh same size, 0.5GU width and height same as the handSpace specified in Dialer, however themes can specify preset values for each hand.

Hands can also be placed onto the inner disk by setting hand.toCenterItem property to true.

Dialer {
    DialerHand {
        // this dialer hand will take the space as defined by the theme.
    }
    DialerHand {
        hand.height: units.gu(3)
        // this hand will have its width as defined by the theme
        // but height as 3 GU
    }
}

Items declared as children will be placed over the hands. These items will not be rotated togehther with the hand, these will always be shown horizontally. The hand can be hidden by setting false to hand.visible property, but that does not hide the overlay content.

The following example demonstrates how to create a hidden dialer hand having an overlay component on the hand.

Dialer {
    DialerHand {
        id: selector
        hand.visible: false
        Rectangle {
            anchors.centerIn: parent
            width: height
            height: units.gu(3)
            radius: width / 2
            color: theme.palette.normal.background
            antialiasing: true
            Label {
                text: Math.round(selector.value)
                anchors.centerIn: parent
            }
        }
    }
}

Property Documentation

[read-only] dialer : Dialer

The property holds the dialer instance the hand is assigned to. This is a helper property to enable access to the dialer component hosting the hand.


The hand.width and hand.height properties define the size of the hand. The height of the hand must be in the [0..dialer.handSpace] range in order to have the hand displayed in the hand area, however there is no restriction applied on the size of the dialer hand. If no value is set, the width and height will be defined by the style.

draggable property specifies whether the hand is draggable or not. When set to not draggable, the hand is used only to indicate the given value. The default value is true.

toCenterItem property specifies whether the hand should be placed on the hand space (on the outer disk - false) or onto the center disk (inner disk - true). The default value is false, meaning the hand will be placed onto the hand space disk.

visible property specifies whether to show the hand marker or not. The default value is true.


hand.draggable : bool

The hand.width and hand.height properties define the size of the hand. The height of the hand must be in the [0..dialer.handSpace] range in order to have the hand displayed in the hand area, however there is no restriction applied on the size of the dialer hand. If no value is set, the width and height will be defined by the style.

draggable property specifies whether the hand is draggable or not. When set to not draggable, the hand is used only to indicate the given value. The default value is true.

toCenterItem property specifies whether the hand should be placed on the hand space (on the outer disk - false) or onto the center disk (inner disk - true). The default value is false, meaning the hand will be placed onto the hand space disk.

visible property specifies whether to show the hand marker or not. The default value is true.


hand.height : real

The hand.width and hand.height properties define the size of the hand. The height of the hand must be in the [0..dialer.handSpace] range in order to have the hand displayed in the hand area, however there is no restriction applied on the size of the dialer hand. If no value is set, the width and height will be defined by the style.

draggable property specifies whether the hand is draggable or not. When set to not draggable, the hand is used only to indicate the given value. The default value is true.

toCenterItem property specifies whether the hand should be placed on the hand space (on the outer disk - false) or onto the center disk (inner disk - true). The default value is false, meaning the hand will be placed onto the hand space disk.

visible property specifies whether to show the hand marker or not. The default value is true.


hand.toCenterItem : bool

The hand.width and hand.height properties define the size of the hand. The height of the hand must be in the [0..dialer.handSpace] range in order to have the hand displayed in the hand area, however there is no restriction applied on the size of the dialer hand. If no value is set, the width and height will be defined by the style.

draggable property specifies whether the hand is draggable or not. When set to not draggable, the hand is used only to indicate the given value. The default value is true.

toCenterItem property specifies whether the hand should be placed on the hand space (on the outer disk - false) or onto the center disk (inner disk - true). The default value is false, meaning the hand will be placed onto the hand space disk.

visible property specifies whether to show the hand marker or not. The default value is true.


hand.visible : bool

The hand.width and hand.height properties define the size of the hand. The height of the hand must be in the [0..dialer.handSpace] range in order to have the hand displayed in the hand area, however there is no restriction applied on the size of the dialer hand. If no value is set, the width and height will be defined by the style.

draggable property specifies whether the hand is draggable or not. When set to not draggable, the hand is used only to indicate the given value. The default value is true.

toCenterItem property specifies whether the hand should be placed on the hand space (on the outer disk - false) or onto the center disk (inner disk - true). The default value is false, meaning the hand will be placed onto the hand space disk.

visible property specifies whether to show the hand marker or not. The default value is true.


hand.width : real

The hand.width and hand.height properties define the size of the hand. The height of the hand must be in the [0..dialer.handSpace] range in order to have the hand displayed in the hand area, however there is no restriction applied on the size of the dialer hand. If no value is set, the width and height will be defined by the style.

draggable property specifies whether the hand is draggable or not. When set to not draggable, the hand is used only to indicate the given value. The default value is true.

toCenterItem property specifies whether the hand should be placed on the hand space (on the outer disk - false) or onto the center disk (inner disk - true). The default value is false, meaning the hand will be placed onto the hand space disk.

visible property specifies whether to show the hand marker or not. The default value is true.


[read-only] index : int

The property holds the index of the hand. Note that this is not the child index of the dialer children, this represents the index of the DialerHand component added to the dialer.


[default] overlay : list<QtObject>

The property holds the items that can be added on top of the hand. Note that these items will not be rotated together with the hand pointer and pointer visibility does not affect the overlay items visibility.


value : real

The property holds the selected value the dialer hand points to.