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 != "#")
47 if(numPadShown == true) {hide()} else {show()}
50 Behavior on height {PropertyAnimation {duration: 500; easing.type: Easing.OutBounce}}
55 width: parent.width; height: childrenRect.height + 21;
56 source: "/usr/share/hfdialer/images/ivi_buttonarea.png"
57 Behavior on opacity {PropertyAnimation {duration: 500}}
62 anchors {top: parent.top; right: parent.right; left: parent.left; margins: 11}
68 anchors {bottomMargin: 5}
75 onClicked: root.insertText(text);
76 onPressAndHold: main.dialMailbox();
82 onClicked: root.insertText(text);
83 onPressAndHold: main.dialSpeedDial(1);
89 onClicked: root.insertText(text);
90 onPressAndHold: main.dialSpeedDial(2);
96 anchors.horizontalCenter: parent.horizontalCenter
100 height: buttonHeight;
102 onClicked: root.insertText(text);
103 onPressAndHold: main.dialSpeedDial(3);
107 height: buttonHeight;
109 onClicked: root.insertText(text);
110 onPressAndHold: main.dialSpeedDial(4);
114 height: buttonHeight;
116 onClicked: root.insertText(text);
117 onPressAndHold: main.dialSpeedDial(5);
123 anchors.horizontalCenter: parent.horizontalCenter
127 height: buttonHeight;
128 detail: qsTr("pqrs");
129 onClicked: root.insertText(text);
130 onPressAndHold: main.dialSpeedDial(6);
134 height: buttonHeight;
136 onClicked: root.insertText(text);
137 onPressAndHold: main.dialSpeedDial(7);
141 height: buttonHeight;
142 detail: qsTr("wxyz");
143 onClicked: root.insertText(text);
144 onPressAndHold: main.dialSpeedDial(8);
150 anchors.horizontalCenter: parent.horizontalCenter
154 height: buttonHeight;
155 onClicked: root.insertText(text);
156 onPressAndHold: root.insertText("p");
160 height: buttonHeight;
162 onClicked: root.insertText(text);
163 onPressAndHold: root.insertText("+");
167 height: buttonHeight;
168 onClicked: root.insertText(text);
169 onPressAndHold: root.insertText("w");
178 width: parent.width; height: dial1.height
183 width: parent.width / 4; height: parent.height
184 source: "/usr/share/hfdialer/images/ivi_btn-delete.png"
186 anchors{ left: bDelete.left}
187 height: parent.height
189 source: "/usr/share/hfdialer/images/ivi_icon-delete.png"
190 fillMode: Image.PreserveAspectFit
199 if(entry.textInput.text == entry.placeHolderText)
202 entry.textInput.text = entry.textInput.text.substring(0, entry.textInput.text.length -1);
205 pidEdit.text = pidEdit.text.substring(0, pidEdit.text.length -1);
221 height: parent.height
222 width: parent.width - bDelete.width - closeButton.width - 5
223 source: "/usr/share/hfdialer/images/ivi_btn-call.png"
226 anchors { centerIn: parent}
227 height: parent.height
229 source: "/usr/share/hfdialer/images/ivi_icon-call.png"
230 fillMode: Image.PreserveAspectFit
240 console.log("*** QML *** :: You can not dial without a number!");
241 main.showErrorMessage(qsTr("You can't dial without a number!"));
245 if(main.dial(entry.textInput.text))
257 source: "/usr/share/hfdialer/images/ivi_btn-close2.png"
258 //anchors { left: parent.left; top: parent.top;}
259 height: parent.height
260 width: (parent.width / 7) - 5
267 console.log("CLOSE BUTTON CLICKED")