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