summaryrefslogtreecommitdiffstats
path: root/demos/declarative/flickr/mobile/ToolBar.qml
diff options
context:
space:
mode:
Diffstat (limited to 'demos/declarative/flickr/mobile/ToolBar.qml')
-rw-r--r--demos/declarative/flickr/mobile/ToolBar.qml23
1 files changed, 11 insertions, 12 deletions
diff --git a/demos/declarative/flickr/mobile/ToolBar.qml b/demos/declarative/flickr/mobile/ToolBar.qml
index aa78c52..80897cc 100644
--- a/demos/declarative/flickr/mobile/ToolBar.qml
+++ b/demos/declarative/flickr/mobile/ToolBar.qml
@@ -2,22 +2,21 @@ import Qt 4.6
Item {
id: Toolbar
- property var button2: Button2
+
+ property var button1Label
+ property var button2Label
+ signal button1Clicked
+ signal button2Clicked
BorderImage { source: "images/titlebar2.sci"; width: parent.width; height: parent.height + 14; y: -7 }
- Button { anchors.left: parent.left; anchors.leftMargin: 5; y: 3; width: 140; height: 32; text: "Update"; onClicked: RssModel.reload() }
+ Button {
+ anchors.left: parent.left; anchors.leftMargin: 5; y: 3; width: 140; height: 32; text: button1Label
+ onClicked: Toolbar.button1Clicked()
+ }
Button {
- id: Button2
- anchors.right: parent.right; anchors.rightMargin: 5; y: 3; width: 140; height: 32; text: "View mode"
- onClicked: {
- if (Button2.text == "View mode") {
- if (Screen.inListView == true)
- Screen.inListView = false;
- else
- Screen.inListView = true
- }
- }
+ anchors.right: parent.right; anchors.rightMargin: 5; y: 3; width: 140; height: 32; text: button2Label
+ onClicked: Toolbar.button2Clicked()
}
}