X-Git-Url: http://git.maemo.org/git/?p=ubi;a=blobdiff_plain;f=qml%2Fubi%2Fcomponents%2FNotification.qml;fp=qml%2Fubi%2Fcomponents%2FNotification.qml;h=0000000000000000000000000000000000000000;hp=aec3d2207ed030546f2ad49974f9bdda8f6efdeb;hb=5a25a20f2cc3029bcb66f5897088cd391d3c450d;hpb=dd71088cb495c09f4fa64ee1318f51315ee4e3fd diff --git a/qml/ubi/components/Notification.qml b/qml/ubi/components/Notification.qml deleted file mode 100644 index aec3d22..0000000 --- a/qml/ubi/components/Notification.qml +++ /dev/null @@ -1,100 +0,0 @@ -import QtQuick 1.0 // to target S60 5th Edition or Maemo 5 -import Qt 4.7 -//import QtMultimediaKit 1.1 -import "../UIConstants.js" as Const - -Item { - id: root - state: "invisible" - width: box.width; height: box.height - - Rectangle { - width: box.width - height: box.height - color: Const.SHADOW_COLOR; - radius: 10 - x: 2*Const.SHADOW_OFFSET; - y: 2*Const.SHADOW_OFFSET; - } - - Rectangle { - id: box - width: text.width+30 - height: text.height+30 - color: Const.DEFAULT_DIALOG_FOREGROUND_COLOR - radius: 10 - border.color: Const.WARM_GREY_COLOR - border.width: 4 - - Text { - anchors.centerIn: parent - id: text - color: Const.DEFAULT_BACKGROUND_COLOR - wrapMode: Text.WordWrap - font.pixelSize: Const.DEFAULT_FONT_PIXEL_SIZE - } - - MouseArea { - anchors.fill: parent - onClicked: tip.state = "invisible" - } - } - - function show(_text) - { - text.text= _text; - time.interval = 3000; - state = "visible" - //sound.play(); - time.restart(); - } - - function show2(_text,interval) - { - text.text= _text; - time.interval = interval; - state = "visible" - //sound.play(); - time.restart(); - } - - function hide() - { - text.text=""; - state="invisible"; - } - - /*Audio { - id: sound - source: "../sound/message.wav" - }*/ - - Timer { - id: time - interval: 3000 - onTriggered: { - //console.log("time"); - tip.state = "invisible"; - } - } - - states: [ - State { - name: "visible" - PropertyChanges { target: root; opacity: 1 } - }, - State { - name: "invisible" - PropertyChanges { target: root; opacity: 0 } - PropertyChanges { target: root; x: 0 } - PropertyChanges { target: root; y: 0 } - } - ] - - transitions: Transition { - NumberAnimation { properties: "opacity"; easing.type: Easing.InOutQuad } - NumberAnimation { properties: "x"; easing.type: Easing.InOutQuad } - NumberAnimation { properties: "y"; easing.type: Easing.InOutQuad } - } - -}