6 border.color: "#000666";
7 property int maxValue:500;
8 property int minValue:0;
9 property alias value:text_input1.text
11 signal valueChange(int intiger);
13 function stringToInt(string){
16 for (var i=string.length-1;i>=0;i--){
17 value+=(string.charCodeAt(i)-48)*pow10;
30 width: rectangle1.width-15
31 height: rectangle1.height*0.6;
33 anchors.centerIn: parent
34 validator: IntValidator{bottom: 0; top: 500;}
35 transformOrigin: Item.Left
37 font.pixelSize: rectangle1.height * .5;
38 onCursorPositionChanged: moveCursorSelection(cursorPosition);
39 //focus: rectangle1.focus;
40 onTextChanged: rectangle1.valueChange(stringToInt(text_input1.text));
50 if(mouseAreaUp.pressedButtons==Qt.LeftButton)
51 text_input1.text=((stringToInt(text_input1.text)+1)>maxValue)?(maxValue):(stringToInt(text_input1.text)+1);
63 if(mouseAreaDown.pressedButtons==Qt.LeftButton)
64 text_input1.text=((stringToInt(text_input1.text)-1)<minValue)?(minValue):(stringToInt(text_input1.text)-1);
73 height: parent.height;
74 anchors.centerIn: parent;
85 anchors.right: parent.right
86 anchors.top: parent.top
87 anchors.rightMargin: 2
89 source: "qrc:/button/up_enable.png";
97 anchors.right: parent.right
98 anchors.bottom: parent.bottom
99 anchors.rightMargin: 2
100 anchors.bottomMargin: 2
101 source: "qrc:/button/down_enable.png";
108 height: rectangle1.height/2;
109 anchors.right: parent.right
110 anchors.top: parent.top
111 onClicked: text_input1.text=((stringToInt(text_input1.text)+1)>maxValue)?(maxValue):(stringToInt(text_input1.text)+1);
114 timerUp.running=true;
122 height: rectangle1.height/2;
123 anchors.right: parent.right
124 anchors.bottom: parent.bottom
125 onClicked: text_input1.text=((stringToInt(text_input1.text)-1)<minValue)?(minValue):(stringToInt(text_input1.text)-1);
128 timerDown.running=true;
134 name: "DisableState"; when: rectangle1.enabled==false;
135 PropertyChanges { target: shadeDisable; z: 3; opacity: 0.5 }