6 border.color: "#000666";
7 property alias value:text1.text
8 property alias index: list1.currentIndex
9 property alias model: list1.model
10 property bool expanded: false
11 property bool disabled: false
12 property int expandedHeight
13 property int basicHeight
14 property string startValue
17 function show(Boolean){
21 function setStartValue(val, idx){
23 list1.currentIndex = idx
26 signal valueSelected(string selected);
30 width: rectangle1.width-15
31 height: rectangle1.height*0.6;
33 anchors.centerIn: parent
34 font.pixelSize: rectangle1.height * .5;
35 onTextChanged: { rectangle1.valueSelected(text) }
41 height: parent.height;
42 anchors.centerIn: parent;
52 height: 0.5 * rectangle1.height;
53 anchors.top: parent.top
54 anchors.right: parent.right
55 anchors.bottom: parent.bottom
57 anchors.rightMargin: 6
58 anchors.bottomMargin: 4
59 source: "qrc:/button/down_enable.png";
67 rectangle1.show(!rectangle1.expanded)
76 property string selected: rectangle1.startValue
78 function selectedValue(nr, value) {
81 rectangle1.show(false)
84 anchors.left: parent.left
85 anchors.verticalCenter: parent.verticalCenter
86 highlightResizeSpeed: 1000
91 width: rectangle1.width
92 height: contentText.height
99 list1.selectedValue(number, content)
103 list1.currentIndex = number
112 anchors.verticalCenter: parent.verticalCenter
113 anchors.leftMargin: 5
125 when: (rectangle1.expanded == false && rectangle1.disabled == false)
126 PropertyChanges { target: list1; z: 0; visible: false }
127 PropertyChanges { target: text1; z: 0; visible: true }
128 PropertyChanges { target: rectangle1; border.width: 1}
129 PropertyChanges { target: rectangle1; height: rectangle1.basicHeight}
130 PropertyChanges { target: imageDown; visible: true}
131 PropertyChanges { target: shadeDisable; visible: false; z:-1}
135 when: (rectangle1.expanded == true && rectangle1.disabled == false)
136 PropertyChanges { target: list1; z: 10; visible: true }
137 PropertyChanges { target: text1; z: 10; visible: false }
138 PropertyChanges { target: rectangle1; border.width: 0}
139 PropertyChanges { target: rectangle1; height: rectangle1.expandedHeight}
140 PropertyChanges { target: imageDown; visible: false}
141 PropertyChanges { target: shadeDisable; visible: false; z: -1}
145 when: rectangle1.disabled == true
146 PropertyChanges { target: list1; z: 0; visible: false }
147 PropertyChanges { target: text1; z: 0; visible: true }
148 PropertyChanges { target: rectangle1; border.width: 1}
149 PropertyChanges { target: rectangle1; expanded: false}
150 PropertyChanges { target: rectangle1; height: rectangle1.basicHeight}
151 PropertyChanges { target: imageDown; visible: true}
152 PropertyChanges { target: shadeDisable; visible: true; z:10}