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
17 property TextInput pidEdit
18 property bool pidRequest: false
21 property real buttonHeight: (parent.height / 5) - 41;
23 function insertText(text)
26 entry.appendChar(text)
27 else if (text != "*" && text != "#")
36 width: parent.width; height: childrenRect.height + 21;
37 source: "/usr/share/hfdialer/images/ivi_buttonarea.png"
38 Behavior on opacity {PropertyAnimation {duration: 500}}
43 anchors {top: parent.top; right: parent.right; left: parent.left; margins: 11}
49 anchors {bottomMargin: 5}
56 onClicked: root.insertText(text);
57 onPressAndHold: main.dialMailbox();
63 onClicked: root.insertText(text);
64 onPressAndHold: main.dialSpeedDial(1);
70 onClicked: root.insertText(text);
71 onPressAndHold: main.dialSpeedDial(2);
77 anchors.horizontalCenter: parent.horizontalCenter
83 onClicked: root.insertText(text);
84 onPressAndHold: main.dialSpeedDial(3);
90 onClicked: root.insertText(text);
91 onPressAndHold: main.dialSpeedDial(4);
97 onClicked: root.insertText(text);
98 onPressAndHold: main.dialSpeedDial(5);
104 anchors.horizontalCenter: parent.horizontalCenter
108 height: buttonHeight;
109 detail: qsTr("pqrs");
110 onClicked: root.insertText(text);
111 onPressAndHold: main.dialSpeedDial(6);
115 height: buttonHeight;
117 onClicked: root.insertText(text);
118 onPressAndHold: main.dialSpeedDial(7);
122 height: buttonHeight;
123 detail: qsTr("wxyz");
124 onClicked: root.insertText(text);
125 onPressAndHold: main.dialSpeedDial(8);
131 anchors.horizontalCenter: parent.horizontalCenter
135 height: buttonHeight;
136 onClicked: root.insertText(text);
137 onPressAndHold: root.insertText("p");
141 height: buttonHeight;
143 onClicked: root.insertText(text);
144 onPressAndHold: root.insertText("+");
148 height: buttonHeight;
149 onClicked: root.insertText(text);
150 onPressAndHold: root.insertText("w");
159 width: parent.width; height: dial1.height
164 width: parent.width / 4; height: parent.height
165 source: "/usr/share/hfdialer/images/ivi_btn-delete.png"
167 anchors{ left: bDelete.left}
168 height: parent.height
170 source: "/usr/share/hfdialer/images/ivi_icon-delete.png"
171 fillMode: Image.PreserveAspectFit
180 if(entry.textInput.text == entry.placeHolderText)
183 entry.textInput.text = entry.textInput.text.substring(0, entry.textInput.text.length -1);
186 pidEdit.text = pidEdit.text.substring(0, pidEdit.text.length -1);
202 height: parent.height
203 width: parent.width - bDelete.width - closeButton.width - 5
204 source: "/usr/share/hfdialer/images/ivi_btn-call.png"
207 anchors { centerIn: parent}
208 height: parent.height
210 source: "/usr/share/hfdialer/images/ivi_icon-call.png"
211 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))
238 source: "/usr/share/hfdialer/images/ivi_btn-close.png"
239 height: parent.height
240 width: (parent.width / 7) - 5
247 console.log("CLOSE BUTTON CLICKED")