summaryrefslogtreecommitdiffstats
path: root/CoffeeTweed/Remove.qml
diff options
context:
space:
mode:
Diffstat (limited to 'CoffeeTweed/Remove.qml')
-rw-r--r--CoffeeTweed/Remove.qml39
1 files changed, 39 insertions, 0 deletions
diff --git a/CoffeeTweed/Remove.qml b/CoffeeTweed/Remove.qml
new file mode 100644
index 0000000..66c35f1
--- /dev/null
+++ b/CoffeeTweed/Remove.qml
@@ -0,0 +1,39 @@
+import Qt 4.7
+
+Item {
+ id: bt_remove
+ width: 188; height: 188
+
+ signal removeClicked
+
+ Image {
+ id: bt_remove_off;
+ source: "images/bt_remove_off.png";
+ }
+
+ Image {
+ id: bt_remove_on;
+ source: "images/bt_remove_on.png";
+ opacity: 0;
+ Behavior on opacity { NumberAnimation { duration: 150; } }
+ }
+
+ MouseArea {
+ anchors.fill: parent
+ onPressed: { bt_remove.state = "pressed" }
+ onReleased: { bt_remove.state = "released"; bt_remove.removeClicked() }
+
+ }
+
+ states: [
+ State {
+ name: "pressed"
+ PropertyChanges{ target: bt_remove_on; opacity: 1; }
+ },
+ State {
+ name: "released"
+ PropertyChanges{ target: bt_remove_on; opacity: 0; }
+ }
+ ]
+
+}