MeeGo 1.2 Harmattan Developer Documentation Develop for the Nokia N9

QML SwitchStyle Element

SwitchStyle properties and default values explained. More...

Inherits Style

This element was introduced in qt-components 4.7.

Properties

Detailed Description

Custom platformStyle example:

 Switch {
     platformStyle: SwitchStyle {
         minKnobX: 0
         maxKnobX: 30
         switchOn: "switchOn.png"
         switchOff: "switchOff.png"
         thumb: "switchThumb.png"
         thumbPressed: "switchThumbPressed.png"
         thumbDisabled: "switchThumbDisabled.png"
         shadow: "switchShadow.png"
         mouseMarginTop: 5
         mouseMarginLeft: 5
         mouseMarginRight: 5
         mouseMarginBottom: 5
     }
 }

Property Documentation

maxKnobX : int

Property default value is 28.

This is used for centering the knob to knob position.


minKnobX : int

Property default value is 4.

This is used for centering the knob to knob position.


mouseMarginBottom : real

Property default value is 0.0.

Mouse margin bottom.


mouseMarginLeft : real

Property default value is 0.0.

Mouse margin left.


mouseMarginRight : real

Property default value is 0.0.

Mouse margin right.


mouseMarginTop : real

Property default value is 0.0.

Mouse margin top.


shadow : string

Property default value is "image://theme/meegotouch-switch-shadow"+__invertedString.

Thumb shadow image location.


switchOff : string

Property default value is "image://theme/meegotouch-switch-off"+__invertedString.

Switch Off-state image location.


switchOn : string

Property default value is "image://theme/meegotouch-switch-on"+__invertedString.

Switch On-state image location.


thumb : string

Property default value is "image://theme/meegotouch-switch-off"+__invertedString.

Thumb normal-state image location.


thumbDisabled : string

Property default value is "image://theme/meegotouch-switch-thumb-disabled"+__invertedString.

Thumb disabled-state image location.


thumbPressed : string

Property default value is "image://theme/meegotouch-switch-thumb-pressed"+__invertedString.

Thumb pressed-state image location.