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 property variant parentField : rectangle1
19 function show(Boolean){
23 function setStartValue(val, idx){
25 list1.currentIndex = idx
28 signal valueSelected(string selected);
32 width: rectangle1.width-15
33 height: rectangle1.height*0.6;
35 anchors.centerIn: parent
36 font.pixelSize: rectangle1.height * .5;
37 onTextChanged: { rectangle1.valueSelected(text) }
43 height: parent.height;
44 anchors.centerIn: parent;
54 height: 0.5 * rectangle1.height;
55 anchors.top: parent.top
56 anchors.right: parent.right
58 anchors.rightMargin: 6
59 anchors.bottomMargin: 4
60 source: "qrc:/button/down_enable.png";
66 rectangle1.show(!rectangle1.expanded)
76 rectangle1.show(!rectangle1.expanded)
83 property string selected: rectangle1.startValue
85 function selectedValue(nr, value) {
88 rectangle1.show(false)
91 anchors.rightMargin: 5
93 anchors.bottomMargin: 10
97 highlightResizeSpeed: 1000
101 width: rectangle1.width
102 height: contentText.height
109 list1.selectedValue(number, content)
113 list1.currentIndex = number
122 anchors.verticalCenter: parent.verticalCenter
123 anchors.leftMargin: 5
124 elide: Text.ElideRight;
136 when: (rectangle1.expanded == false && rectangle1.disabled == false)
137 PropertyChanges { target: list1; z: 0; visible: false }
138 PropertyChanges { target: text1; z: 0; visible: true }
139 PropertyChanges { target: rectangle1; border.width: 1}
140 PropertyChanges { target: rectangle1; height: rectangle1.basicHeight}
141 PropertyChanges { target: imageDown; height: 0.5 * rectangle1.basicHeight}
142 PropertyChanges { target: shadeDisable; visible: false; z:-1}
146 when: (rectangle1.expanded == true && rectangle1.disabled == false)
147 PropertyChanges { target: list1; z: 10; visible: true }
148 PropertyChanges { target: text1; z: 10; visible: false }
149 PropertyChanges { target: rectangle1; border.width: 1}
150 PropertyChanges { target: rectangle1; height: rectangle1.expandedHeight}
151 PropertyChanges { target: imageDown; height: 0.5 * rectangle1.basicHeight}
152 PropertyChanges { target: shadeDisable; visible: false; z: -1}
153 PropertyChanges { target: rectangle1; anchors.fill: parentField}
157 when: rectangle1.disabled == true
158 PropertyChanges { target: list1; z: 0; visible: false }
159 PropertyChanges { target: text1; z: 0; visible: true }
160 PropertyChanges { target: rectangle1; border.width: 1}
161 PropertyChanges { target: rectangle1; expanded: false}
162 PropertyChanges { target: rectangle1; height: rectangle1.basicHeight}
163 PropertyChanges { target: imageDown; visible: true}
164 PropertyChanges { target: shadeDisable; visible: true; z:10}