Port to Qt5
[profile/ivi/hfdialer.git] / qml / DialNumPad.qml
index 342c9fd..2d74142 100644 (file)
@@ -6,7 +6,7 @@
  * http://www.apache.org/licenses/LICENSE-2.0
  */
 
-import Qt 4.7
+import QtQuick 2.0
 
 Item
 {
@@ -30,25 +30,6 @@ Item
         }
     }
 
-    function show()
-    {
-        height = 72 * 5 + 4;
-        numPadShown = true;
-    }
-
-    function hide()
-    {
-        height = 72;
-        numPadShown = false;
-    }
-
-    function toggle()
-    {
-        if(numPadShown == true) {hide()} else {show()}
-    }
-
-    Behavior on height {PropertyAnimation {duration: 500; easing.type: Easing.OutBounce}}
-
     Image
     {
         id: numpad
@@ -219,7 +200,7 @@ Item
                     id: bCall;
 
                     height: parent.height
-                    width: parent.width - bDelete.width - 5
+                    width: parent.width - bDelete.width - closeButton.width - 5
                     source: "/usr/share/hfdialer/images/ivi_btn-call.png"
 
                     Image {
@@ -250,6 +231,25 @@ Item
                         }
                     }
                 }
+
+                Image
+                {
+                    id: closeButton
+                    source: "/usr/share/hfdialer/images/ivi_btn-close.png"
+                    height: parent.height   
+                    width: (parent.width / 7) - 5
+
+                    MouseArea {
+                        id: closeArea
+                          anchors.fill: parent
+
+                    onClicked: {
+                        console.log("CLOSE BUTTON CLICKED")
+
+                        Qt.quit()
+                        }
+                    }
+                }
             }
         }
     }