Dialer QML Type

Dialer is a phone dialer style picker component. More...

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

StyledItem

Properties

Signals

Detailed Description

The Dialer component is dedicated for value selection where the value is compound of several sections, i.e. hour, minute and second, or integral and decimal values. Each section is defined by a DialerHand, which shares the same range as the dialer is having. Dialer hand visuals are placed on the same dialer disk, however this can be altered by setting different values to DialerHand propertries.

The following example shows how to create a dialer component to select a value between 0 and 50.

import QtQuick 2.4
import Lomiri.Components.Pickers 1.0

Dialer {
    size: units.gu(20)
    minimumValue: 0
    maximumValue: 50

    DialerHand {
        id: mainHand
        onValueChanged: console.log(value)
    }
}

See also DialerHand.

Property Documentation

centerContent : list<var>

The property holds the list of items to be placed inside of the center disk. Items placed inside the center disk can either be listed in this property or reparented to centerItem property.

Dialer {
    DialerHand {
        id: hand
        centerContent: [
            Label {
                // [...]
            }
            // [...]
        ]
    }
    // [...]
}

[read-only] centerItem : Item

The property holds the component from the center of the Dialer. Items wanted to be placed into the center of the Dialer must be reparented to this component, or listed in the centerContent property.

Beside that, the property helps anchoring the center disk content to the item.

Dialer {
    DialerHand {
        id: hand
        Label {
            parent: hand.centerItem
            // [...]
        }
    }
    // [...]
}

handSpace : real

The property holds the height reserved for the dialer hands, being the distance between the outer and the inner dialer disks. This value cannot be higher than the half of the dialer size.


[read-only] hands : list<DialerHands>

The property holds the list of DialerHands added to Dialer. This may be the same as the children, however will contain only DialerHand objects.


maximumValue: : real

These properties define the value range the dialer hand values can take. The default values are 0 and 360.


minimumValue : real

These properties define the value range the dialer hand values can take. The default values are 0 and 360.


minimumValue: : real

These properties define the value range the dialer hand values can take. The default values are 0 and 360.


size : real

The property holds the size of the dialer. The component should be sized using this property instead of using width and/or height properties. Sizing with this property it is made sure that the component will scale evenly.


Signal Documentation

void handUpdated(DialerHand hand)

The signal is emited when the hand value is updated.