2 * Copyright 2012 Intel Corporation.
4 * This program is licensed under the terms and conditions of the
5 * Apache License, version 2.0. The full text of the Apache License is at
6 * http://www.apache.org/licenses/LICENSE-2.0
15 property bool numPadShown: true
16 property DialNumberEntry entry
19 property real buttonHeight: (parent.height / 5) - 41;
21 function insertText(text)
23 entry.appendChar(text)
40 if(numPadShown == true) {hide()} else {show()}
43 Behavior on height {PropertyAnimation {duration: 500; easing.type: Easing.OutBounce}}
48 width: parent.width; height: childrenRect.height + 21;
49 source: "/usr/share/hfdialer/images/ivi_buttonarea.png"
50 Behavior on opacity {PropertyAnimation {duration: 500}}
55 anchors {top: parent.top; right: parent.right; left: parent.left; margins: 11}
61 anchors {bottomMargin: 5}
68 onClicked: root.insertText(text);
69 onPressAndHold: main.dialMailbox();
75 onClicked: root.insertText(text);
76 onPressAndHold: main.dialSpeedDial(1);
82 onClicked: root.insertText(text);
83 onPressAndHold: main.dialSpeedDial(2);
89 anchors.horizontalCenter: parent.horizontalCenter
95 onClicked: root.insertText(text);
96 onPressAndHold: main.dialSpeedDial(3);
100 height: buttonHeight;
102 onClicked: root.insertText(text);
103 onPressAndHold: main.dialSpeedDial(4);
107 height: buttonHeight;
109 onClicked: root.insertText(text);
110 onPressAndHold: main.dialSpeedDial(5);
116 anchors.horizontalCenter: parent.horizontalCenter
120 height: buttonHeight;
121 detail: qsTr("pqrs");
122 onClicked: root.insertText(text);
123 onPressAndHold: main.dialSpeedDial(6);
127 height: buttonHeight;
129 onClicked: root.insertText(text);
130 onPressAndHold: main.dialSpeedDial(7);
134 height: buttonHeight;
135 detail: qsTr("wxyz");
136 onClicked: root.insertText(text);
137 onPressAndHold: main.dialSpeedDial(8);
143 anchors.horizontalCenter: parent.horizontalCenter
147 height: buttonHeight;
148 onClicked: root.insertText(text);
149 onPressAndHold: root.insertText("p");
153 height: buttonHeight;
155 onClicked: root.insertText(text);
156 onPressAndHold: root.insertText("+");
160 height: buttonHeight;
161 onClicked: root.insertText(text);
162 onPressAndHold: root.insertText("w");
171 width: parent.width; height: dial1.height
176 width: parent.width / 4; height: parent.height
177 source: "/usr/share/hfdialer/images/ivi_btn-delete.png"
179 anchors{ left: bDelete.left}
180 height: parent.height
182 source: "/usr/share/hfdialer/images/ivi_icon-delete.png"
183 fillMode: Image.PreserveAspectFit
190 if(entry.textInput.text == entry.placeHolderText)
193 entry.textInput.text = entry.textInput.text.substring(0, entry.textInput.text.length -1);
196 onPressAndHold: entry.clear();
204 height: parent.height
205 width: parent.width - bDelete.width - 5
206 source: "/usr/share/hfdialer/images/ivi_btn-call.png"
209 anchors { centerIn: parent}
210 height: parent.height
212 source: "/usr/share/hfdialer/images/ivi_icon-call.png"
213 fillMode: Image.PreserveAspectFit
221 console.log("*** QML *** :: You can not dial without a number!");
222 main.showErrorMessage(qsTr("You can't dial without a number!"));
226 if(main.dial(entry.textInput.text))