2 import com.nokia.meego 1.0
3 import com.nokia.extras 1.0
4 import "uiconstants.js" as UiConstants
5 import "PageHeader.js" as Private
9 property alias text: label.text
10 property alias selectedIndex: dialog.selectedIndex
11 property variant options: [
16 height: screen.currentOrientation === Screen.Landscape ?
17 UiConstants.HeaderDefaultHeightLandscape :
18 UiConstants.HeaderDefaultHeightPortrait
20 GradientStop { color: Qt.darker(UiConstants.AccentColor, mouse.pressed ? 1.5 : 1.25); position: 0.0 }
21 GradientStop { color: Qt.lighter(UiConstants.AccentColor, 1.5); position: 1.0 }
32 leftMargin: UiConstants.DefaultMargin;
33 verticalCenter: parent.verticalCenter;
36 pixelSize: UiConstants.HeaderFontPixelSize
39 color: style.textColor
44 onClicked: if (optionList.count > 1) dialog.open()
50 right: (label.text != "") ? parent.right : undefined;
51 rightMargin: UiConstants.DefaultMargin;
52 horizontalCenter: (label.text != "") ? undefined : parent.horizontalCenter;
53 verticalCenter: parent.verticalCenter;
55 visible: optionList.count > 1
57 source: "image://theme/meegotouch-combobox-indicator" +
58 (style.inverted ? "-inverted" : "") +
59 (header.enabled ? "" : "-disabled") +
60 (mouse.pressed ? "-pressed" : "")
64 titleText: qsTr("Show")
69 onSelectedIndexChanged: Private.setDisplayIndex(selectedIndex)
70 Component.onCompleted: Private.init()