3 @author: Sudheer K. <scifi1947 at gmail.com>
4 @license: GNU General Public License
11 property bool updatePending: false
12 property bool displayIcons: true
13 property bool displayNavigation: false
14 property int componentHeight: toolbar.height
16 signal reloadButtonClicked
17 signal downButtonClicked
18 signal upButtonClicked
19 signal newsButtonClicked
21 BorderImage { source: "images/toolbar.sci"; width: parent.width; height: parent.height + 14; y: -7 }
27 anchors.left: parent.left
29 visible: toolbar.displayIcons
33 source: "images/reload.png"
35 anchors.centerIn: parent
37 NumberAnimation on rotation {
38 from: 0; to: 360; running: toolbar.updatePending == true; loops: Animation.Infinite; duration: 900
43 id: reloadButtonMouseArea
46 toolbar.updatePending = true;
47 toolbar.reloadButtonClicked();
52 name: "pressed"; when: reloadButtonMouseArea.pressed
53 PropertyChanges { target: reloadButtonArea; color: "#9a9a9a"}
61 anchors.right: parent.horizontalCenter; anchors.horizontalCenterOffset: -60;
63 visible: (toolbar.displayIcons && toolbar.displayNavigation)
67 source: "images/down.png"
69 anchors.verticalCenter: parent.verticalCenter
70 anchors.right: parent.right
71 anchors.rightMargin: 5
75 id: downButtonMouseArea
77 onClicked: toolbar.downButtonClicked()
81 name: "pressed"; when: downButtonMouseArea.pressed
82 PropertyChanges { target: downButtonArea; color: "#9a9a9a"}
91 anchors.left: parent.horizontalCenter; anchors.horizontalCenterOffset: 60;
93 visible: (toolbar.displayIcons && toolbar.displayNavigation)
97 source: "images/up.png"
99 anchors.verticalCenter: parent.verticalCenter
100 anchors.left: parent.left
101 anchors.leftMargin: 5
105 id: upButtonMouseArea
107 onClicked: toolbar.upButtonClicked()
111 name: "pressed"; when: upButtonMouseArea.pressed
112 PropertyChanges { target: upButtonArea; color: "#9a9a9a"}
121 height: parent.height
122 anchors.right: parent.right
124 visible: toolbar.displayIcons
128 source: "images/news.png"
129 width: 32; height: 32
130 anchors.centerIn: parent
134 id: newsButtonMouseArea
136 onClicked: toolbar.newsButtonClicked()
140 name: "pressed"; when: newsButtonMouseArea.pressed
141 PropertyChanges { target: newsButtonArea; color: "#9a9a9a"}