@@ -22,7 +22,7 @@ import Ubuntu.Components 0.1
2222import Ubuntu.Components.ListItems 0.1 as ListItem
2323
2424Page {
25− id: _page
25+ id: page
2626
2727 title: indicatorProperties && indicatorProperties.title ? indicatorProperties.title : ""
2828 property variant indicatorProperties
@@ -31,11 +31,10 @@ Page {
3131 anchors.fill: parent
3232
3333 ListItem.Standard {
34− id: button
35−
34+ id: visualCheckItem
3635 text: "Enable Visual Representation"
3736 control: Switch {
38− id: checked
37+ id: visualCheck
3938 checked: true
4039 }
4140 }
@@ -45,13 +44,14 @@ Page {
4544 objectName: "page_loader"
4645
4746 anchors {
48− top: button.bottom
47+ top: visualCheckItem.bottom
4948 left: parent.left
5049 right: parent.right
51− bottom: parent.bottom
50+ bottom: buttons.top
5251 topMargin: units.gu(2)
52+ bottomMargin: units.gu(2)
5353 }
54− source : checked.checked ? _page.pageSource : "IndicatorsTree.qml"
54+ source : visualCheck.checked ? page.pageSource : "IndicatorsTree.qml"
5555
5656 onLoaded: {
5757 for(var pName in indicatorProperties) {
@@ -62,4 +62,32 @@ Page {
6262 item.start();
6363 }
6464 }
65+
66+ Item {
67+ id: buttons
68+ anchors {
69+ left: parent.left
70+ right: parent.right
71+ bottom: parent.bottom
72+ margins: units.gu(1)
73+ }
74+ height: childrenRect.height
75+
76+ Button {
77+ anchors {
78+ left: parent.left
79+ }
80+ text: "Back"
81+ onClicked: page.pageStack.reset()
82+ }
83+ Button {
84+ id: refresh
85+ visible: !visualCheck.checked
86+ anchors {
87+ right: parent.right
88+ }
89+ text: "Refresh"
90+ onClicked: page_loader.item.refresh()
91+ }
92+ }
6593}