##// END OF EJS Templates
QML chart properties tester to match the current QML api
Tero Ahola -
r2096:4834084a6f1a
parent child
Show More
@@ -1,186 +1,186
1 /****************************************************************************
1 /****************************************************************************
2 **
2 **
3 ** Copyright (C) 2012 Digia Plc
3 ** Copyright (C) 2012 Digia Plc
4 ** All rights reserved.
4 ** All rights reserved.
5 ** For any questions to Digia, please use contact form at http://qt.digia.com
5 ** For any questions to Digia, please use contact form at http://qt.digia.com
6 **
6 **
7 ** This file is part of the Qt Commercial Charts Add-on.
7 ** This file is part of the Qt Commercial Charts Add-on.
8 **
8 **
9 ** $QT_BEGIN_LICENSE$
9 ** $QT_BEGIN_LICENSE$
10 ** Licensees holding valid Qt Commercial licenses may use this file in
10 ** Licensees holding valid Qt Commercial licenses may use this file in
11 ** accordance with the Qt Commercial License Agreement provided with the
11 ** accordance with the Qt Commercial License Agreement provided with the
12 ** Software or, alternatively, in accordance with the terms contained in
12 ** Software or, alternatively, in accordance with the terms contained in
13 ** a written agreement between you and Digia.
13 ** a written agreement between you and Digia.
14 **
14 **
15 ** If you have questions regarding the use of this file, please use
15 ** If you have questions regarding the use of this file, please use
16 ** contact form at http://qt.digia.com
16 ** contact form at http://qt.digia.com
17 ** $QT_END_LICENSE$
17 ** $QT_END_LICENSE$
18 **
18 **
19 ****************************************************************************/
19 ****************************************************************************/
20
20
21 import QtQuick 1.0
21 import QtQuick 1.0
22
22
23 Row {
23 Row {
24 anchors.fill: parent
24 anchors.fill: parent
25 spacing: 5
25 spacing: 5
26 property variant series
26 property variant series
27
27
28 // buttons for selecting the edited object: series, barset or label
28 // buttons for selecting the edited object: series, barset or label
29 Flow {
29 Flow {
30 spacing: 5
30 spacing: 5
31 flow: Flow.TopToBottom
31 flow: Flow.TopToBottom
32 Button {
32 Button {
33 id: seriesButton
33 id: seriesButton
34 text: "series"
34 text: "series"
35 unpressedColor: "#79bd8f"
35 unpressedColor: "#79bd8f"
36 onClicked: {
36 onClicked: {
37 seriesFlow.visible = true;
37 seriesFlow.visible = true;
38 setFlow.visible = false;
38 setFlow.visible = false;
39 labelsFlow.visible = false;
39 labelsFlow.visible = false;
40 color = "#00a388";
40 color = "#00a388";
41 sliceButton.color = "#79bd8f";
41 setButton.color = "#79bd8f";
42 labelButton.color = "#79bd8f";
42 labelButton.color = "#79bd8f";
43 }
43 }
44 }
44 }
45 Button {
45 Button {
46 id: setButton
46 id: setButton
47 text: "BarSet"
47 text: "BarSet"
48 unpressedColor: "#79bd8f"
48 unpressedColor: "#79bd8f"
49 onClicked: {
49 onClicked: {
50 seriesFlow.visible = false;
50 seriesFlow.visible = false;
51 setFlow.visible = true;
51 setFlow.visible = true;
52 labelsFlow.visible = false;
52 labelsFlow.visible = false;
53 color = "#00a388";
53 color = "#00a388";
54 seriesButton.color = "#79bd8f";
54 seriesButton.color = "#79bd8f";
55 labelButton.color = "#79bd8f";
55 labelButton.color = "#79bd8f";
56 }
56 }
57 }
57 }
58 Button {
58 Button {
59 id: labelButton
59 id: labelButton
60 text: "label"
60 text: "label"
61 unpressedColor: "#79bd8f"
61 unpressedColor: "#79bd8f"
62 onClicked: {
62 onClicked: {
63 seriesFlow.visible = false;
63 seriesFlow.visible = false;
64 setFlow.visible = false;
64 setFlow.visible = false;
65 labelsFlow.visible = true;
65 labelsFlow.visible = true;
66 color = "#00a388";
66 color = "#00a388";
67 seriesButton.color = "#79bd8f";
67 seriesButton.color = "#79bd8f";
68 sliceButton.color = "#79bd8f";
68 setButton.color = "#79bd8f";
69 }
69 }
70 }
70 }
71 }
71 }
72
72
73 // Buttons for editing series
73 // Buttons for editing series
74 Flow {
74 Flow {
75 id: seriesFlow
75 id: seriesFlow
76 spacing: 5
76 spacing: 5
77 flow: Flow.TopToBottom
77 flow: Flow.TopToBottom
78 visible: false
78 visible: false
79
79
80 Button {
80 Button {
81 text: "visible"
81 text: "visible"
82 onClicked: series.visible = !series.visible;
82 onClicked: series.visible = !series.visible;
83 }
83 }
84 Button {
84 Button {
85 text: "opacity +"
85 text: "opacity +"
86 onClicked: series.opacity += 0.1;
86 onClicked: series.opacity += 0.1;
87 }
87 }
88 Button {
88 Button {
89 text: "opacity -"
89 text: "opacity -"
90 onClicked: series.opacity -= 0.1;
90 onClicked: series.opacity -= 0.1;
91 }
91 }
92 Button {
92 Button {
93 text: "bar width +"
93 text: "bar width +"
94 onClicked: series.barWidth += 0.1;
94 onClicked: series.barWidth += 0.1;
95 }
95 }
96 Button {
96 Button {
97 text: "bar width -"
97 text: "bar width -"
98 onClicked: series.barWidth -= 0.1;
98 onClicked: series.barWidth -= 0.1;
99 }
99 }
100 }
100 }
101
101
102 // Buttons for editing sets
102 // Buttons for editing sets
103 Flow {
103 Flow {
104 id: setFlow
104 id: setFlow
105 spacing: 5
105 spacing: 5
106 flow: Flow.TopToBottom
106 flow: Flow.TopToBottom
107 visible: false
107 visible: false
108
108
109 Button {
109 Button {
110 text: "append set"
110 text: "append set"
111 onClicked: {
111 onClicked: {
112 var count = series.count;
112 var count = series.count;
113 series.append("set" + count, [0, 0.1 * count, 0.2 * count, 0.3 * count, 0.4 * count, 0.5 * count, 0.6 * count]);
113 series.append("set" + count, [0, 0.1 * count, 0.2 * count, 0.3 * count, 0.4 * count, 0.5 * count, 0.6 * count]);
114 }
114 }
115 }
115 }
116 Button {
116 Button {
117 text: "insert set"
117 text: "insert set"
118 onClicked: {
118 onClicked: {
119 var count = series.count;
119 var count = series.count;
120 series.insert(count - 1, "set" + count, [0, 0.1 * count, 0.2 * count, 0.3 * count, 0.4 * count, 0.5 * count, 0.6 * count]);
120 series.insert(count - 1, "set" + count, [0, 0.1 * count, 0.2 * count, 0.3 * count, 0.4 * count, 0.5 * count, 0.6 * count]);
121 }
121 }
122 }
122 }
123 Button {
123 Button {
124 text: "remove set"
124 text: "remove set"
125 onClicked: series.remove(series.at(series.count - 1));
125 onClicked: series.remove(series.at(series.count - 1));
126 }
126 }
127 Button {
127 Button {
128 text: "clear sets"
128 text: "clear sets"
129 onClicked: series.clear();
129 onClicked: series.clear();
130 }
130 }
131
131
132 Button {
132 Button {
133 text: "set 1 append"
133 text: "set 1 append"
134 onClicked: series.at(0).append(series.at(0).count + 1);
134 onClicked: series.at(0).append(series.at(0).count + 1);
135 }
135 }
136 Button {
136 Button {
137 text: "set 1 replace"
137 text: "set 1 replace"
138 onClicked: series.at(0).replace(series.at(0).count - 1, series.at(0).at(series.at(0).count - 1) + 1.5);
138 onClicked: series.at(0).replace(series.at(0).count - 1, series.at(0).at(series.at(0).count - 1) + 1.5);
139 }
139 }
140 Button {
140 Button {
141 text: "set 1 remove"
141 text: "set 1 remove"
142 onClicked: series.at(0).remove(series.at(0).count - 1);
142 onClicked: series.at(0).remove(series.at(0).count - 1);
143 }
143 }
144
144
145 Button {
145 Button {
146 text: "set 1 color"
146 text: "set 1 color"
147 onClicked: series.at(0).color = main.nextColor();
147 onClicked: series.at(0).color = main.nextColor();
148 }
148 }
149 Button {
149 Button {
150 text: "set 1 border color"
150 text: "set 1 border color"
151 onClicked: series.at(0).borderColor = main.nextColor();
151 onClicked: series.at(0).borderColor = main.nextColor();
152 }
152 }
153 Button {
153 Button {
154 text: "set 1 borderWidth +"
154 text: "set 1 borderWidth +"
155 onClicked: series.at(0).borderWidth += 0.5;
155 onClicked: series.at(0).borderWidth += 0.5;
156 }
156 }
157 Button {
157 Button {
158 text: "set 1 borderWidth -"
158 text: "set 1 borderWidth -"
159 onClicked: series.at(0).borderWidth -= 0.5;
159 onClicked: series.at(0).borderWidth -= 0.5;
160 }
160 }
161 }
161 }
162
162
163
163
164 Flow {
164 Flow {
165 id: labelsFlow
165 id: labelsFlow
166 spacing: 5
166 spacing: 5
167 flow: Flow.TopToBottom
167 flow: Flow.TopToBottom
168 visible: false
168 visible: false
169
169
170 Button {
170 Button {
171 text: "labels visible"
171 text: "labels visible"
172 onClicked: series.labelsVisible = !series.labelsVisible;
172 onClicked: series.labelsVisible = !series.labelsVisible;
173 }
173 }
174 Button {
174 Button {
175 text: "set 1 label color"
175 text: "set 1 label color"
176 onClicked: series.at(0).labelColor = main.nextColor();
176 onClicked: series.at(0).labelColor = main.nextColor();
177 }
177 }
178 FontEditor {
178 FontEditor {
179 id: fontEditor
179 id: fontEditor
180 fontDescription: "label"
180 fontDescription: "label"
181 function editedFont() {
181 function editedFont() {
182 return series.at(0).labelFont;
182 return series.at(0).labelFont;
183 }
183 }
184 }
184 }
185 }
185 }
186 }
186 }
@@ -1,105 +1,105
1 /****************************************************************************
1 /****************************************************************************
2 **
2 **
3 ** Copyright (C) 2012 Digia Plc
3 ** Copyright (C) 2012 Digia Plc
4 ** All rights reserved.
4 ** All rights reserved.
5 ** For any questions to Digia, please use contact form at http://qt.digia.com
5 ** For any questions to Digia, please use contact form at http://qt.digia.com
6 **
6 **
7 ** This file is part of the Qt Commercial Charts Add-on.
7 ** This file is part of the Qt Commercial Charts Add-on.
8 **
8 **
9 ** $QT_BEGIN_LICENSE$
9 ** $QT_BEGIN_LICENSE$
10 ** Licensees holding valid Qt Commercial licenses may use this file in
10 ** Licensees holding valid Qt Commercial licenses may use this file in
11 ** accordance with the Qt Commercial License Agreement provided with the
11 ** accordance with the Qt Commercial License Agreement provided with the
12 ** Software or, alternatively, in accordance with the terms contained in
12 ** Software or, alternatively, in accordance with the terms contained in
13 ** a written agreement between you and Digia.
13 ** a written agreement between you and Digia.
14 **
14 **
15 ** If you have questions regarding the use of this file, please use
15 ** If you have questions regarding the use of this file, please use
16 ** contact form at http://qt.digia.com
16 ** contact form at http://qt.digia.com
17 ** $QT_END_LICENSE$
17 ** $QT_END_LICENSE$
18 **
18 **
19 ****************************************************************************/
19 ****************************************************************************/
20
20
21 import QtQuick 1.0
21 import QtQuick 1.0
22
22
23 Row {
23 Row {
24 anchors.fill: parent
24 anchors.fill: parent
25 spacing: 5
25 spacing: 5
26 property variant axis
26 property variant axis
27
27
28 Flow {
28 Flow {
29 spacing: 5
29 spacing: 5
30 flow: Flow.TopToBottom
30 flow: Flow.TopToBottom
31
31
32 Button {
32 Button {
33 text: "axis visible"
33 text: "axis visible"
34 onClicked: axis.visible = !axis.visible;
34 onClicked: axis.visible = !axis.visible;
35 }
35 }
36 Button {
36 Button {
37 text: "axis grid visible"
37 text: "axis grid visible"
38 onClicked: axis.gridVisible = !axis.gridVisible;
38 onClicked: axis.gridVisible = !axis.gridVisible;
39 }
39 }
40 Button {
40 Button {
41 text: "axis color"
41 text: "axis color"
42 onClicked: axis.color = main.nextColor();
42 onClicked: axis.color = main.nextColor();
43 }
43 }
44 Button {
44 Button {
45 text: "axis labels color"
45 text: "axis labels color"
46 onClicked: axis.labelsColor = main.nextColor();
46 onClicked: axis.labelsColor = main.nextColor();
47 }
47 }
48 Button {
48 Button {
49 text: "axis labels angle +"
49 text: "axis labels angle +"
50 onClicked: axis.labelsAngle += 5;
50 onClicked: axis.labelsAngle += 5;
51 }
51 }
52 Button {
52 Button {
53 text: "axis labels angle -"
53 text: "axis labels angle -"
54 onClicked: axis.labelsAngle -= 5;
54 onClicked: axis.labelsAngle -= 5;
55 }
55 }
56 Button {
56 Button {
57 text: "axis shades visible"
57 text: "axis shades visible"
58 onClicked: axis.shadesVisible = !axis.shadesVisible;
58 onClicked: axis.shadesVisible = !axis.shadesVisible;
59 }
59 }
60 Button {
60 Button {
61 text: "axis shades color"
61 text: "axis shades color"
62 onClicked: axis.shadesColor = main.nextColor();
62 onClicked: axis.shadesColor = main.nextColor();
63 }
63 }
64 Button {
64 Button {
65 text: "axis shades bcolor"
65 text: "axis shades bcolor"
66 onClicked: axis.shadesBorderColor = main.nextColor();
66 onClicked: axis.shadesBorderColor = main.nextColor();
67 }
67 }
68 Button {
68 Button {
69 text: "axis max +"
69 text: "axis max +"
70 onClicked: axis.max += 0.1;
70 onClicked: axis.max += 0.1;
71 }
71 }
72 Button {
72 Button {
73 text: "axis max -"
73 text: "axis max -"
74 onClicked: axis.max -= 0.1;
74 onClicked: axis.max -= 0.1;
75 }
75 }
76 Button {
76 Button {
77 text: "axis min +"
77 text: "axis min +"
78 onClicked: axis.min += 0.1;
78 onClicked: axis.min += 0.1;
79 }
79 }
80 Button {
80 Button {
81 text: "axis min -"
81 text: "axis min -"
82 onClicked: axis.min -= 0.1;
82 onClicked: axis.min -= 0.1;
83 }
83 }
84 Button {
84 Button {
85 text: "axis ticks count +"
85 text: "axis tick count +"
86 onClicked: axis.ticksCount++;
86 onClicked: axis.tickCount++;
87 }
87 }
88 Button {
88 Button {
89 text: "axis ticks count -"
89 text: "axis tick count -"
90 onClicked: axis.ticksCount--;
90 onClicked: axis.tickCount--;
91 }
91 }
92 Button {
92 Button {
93 text: "axis nice nmb"
93 text: "axis nice nmb"
94 onClicked: axis.niceNumbersEnabled = !axis.niceNumbersEnabled;
94 onClicked: axis.niceNumbersEnabled = !axis.niceNumbersEnabled;
95 }
95 }
96 }
96 }
97
97
98 FontEditor {
98 FontEditor {
99 id: fontEditor
99 id: fontEditor
100 fontDescription: "axis"
100 fontDescription: "axis"
101 function editedFont() {
101 function editedFont() {
102 return axis.labelsFont;
102 return axis.labelsFont;
103 }
103 }
104 }
104 }
105 }
105 }
@@ -1,179 +1,179
1 /****************************************************************************
1 /****************************************************************************
2 **
2 **
3 ** Copyright (C) 2012 Digia Plc
3 ** Copyright (C) 2012 Digia Plc
4 ** All rights reserved.
4 ** All rights reserved.
5 ** For any questions to Digia, please use contact form at http://qt.digia.com
5 ** For any questions to Digia, please use contact form at http://qt.digia.com
6 **
6 **
7 ** This file is part of the Qt Commercial Charts Add-on.
7 ** This file is part of the Qt Commercial Charts Add-on.
8 **
8 **
9 ** $QT_BEGIN_LICENSE$
9 ** $QT_BEGIN_LICENSE$
10 ** Licensees holding valid Qt Commercial licenses may use this file in
10 ** Licensees holding valid Qt Commercial licenses may use this file in
11 ** accordance with the Qt Commercial License Agreement provided with the
11 ** accordance with the Qt Commercial License Agreement provided with the
12 ** Software or, alternatively, in accordance with the terms contained in
12 ** Software or, alternatively, in accordance with the terms contained in
13 ** a written agreement between you and Digia.
13 ** a written agreement between you and Digia.
14 **
14 **
15 ** If you have questions regarding the use of this file, please use
15 ** If you have questions regarding the use of this file, please use
16 ** contact form at http://qt.digia.com
16 ** contact form at http://qt.digia.com
17 ** $QT_END_LICENSE$
17 ** $QT_END_LICENSE$
18 **
18 **
19 ****************************************************************************/
19 ****************************************************************************/
20
20
21 import QtQuick 1.0
21 import QtQuick 1.0
22
22
23 Rectangle {
23 Rectangle {
24 id: main
24 id: main
25 width: parent.width
25 width: parent.width
26 height: parent.height
26 height: parent.height
27 property int viewCount: 9
27 property int viewCount: 9
28 property variant colors: ["#637D74", "#403D3A", "#8C3B3B", "#AB6937", "#D4A960"]
28 property variant colors: ["#637D74", "#403D3A", "#8C3B3B", "#AB6937", "#D4A960"]
29 property int colorIndex: 0
29 property int colorIndex: 0
30 property int buttonWidth: 42
30 property int buttonWidth: 42
31
31
32 function nextColor() {
32 function nextColor() {
33 colorIndex++;
33 colorIndex++;
34 return colors[colorIndex % colors.length];
34 return colors[colorIndex % colors.length];
35 }
35 }
36
36
37 Row {
37 Row {
38 anchors.top: parent.top
38 anchors.top: parent.top
39 anchors.bottom: buttonRow.top
39 anchors.bottom: buttonRow.top
40 anchors.bottomMargin: 10
40 anchors.bottomMargin: 10
41 anchors.left: parent.left
41 anchors.left: parent.left
42 anchors.right: parent.right
42 anchors.right: parent.right
43
43
44 Loader {
44 Loader {
45 id: chartLoader
45 id: chartLoader
46 width: main.width - editorLoader.width
46 width: main.width - editorLoader.width
47 height: parent.height
47 height: parent.height
48 source: "Chart.qml"
48 source: "Chart.qml"
49 onStatusChanged: {
49 onStatusChanged: {
50 if (status == Loader.Ready && editorLoader.status == Loader.Ready && chartLoader.item) {
50 if (status == Loader.Ready && editorLoader.status == Loader.Ready && chartLoader.item) {
51 if (source.toString().search("Chart.qml") > 0)
51 if (source.toString().search("/Chart.qml") > 0)
52 editorLoader.item.chart = chartLoader.item.chart;
52 editorLoader.item.chart = chartLoader.item.chart;
53 else
53 else
54 editorLoader.item.series = chartLoader.item.series;
54 editorLoader.item.series = chartLoader.item.series;
55 }
55 }
56 }
56 }
57 }
57 }
58
58
59 Loader {
59 Loader {
60 id: editorLoader
60 id: editorLoader
61 width: 280
61 width: 280
62 height: parent.height
62 height: parent.height
63 source: "ChartEditor.qml"
63 source: "ChartEditor.qml"
64 onStatusChanged: {
64 onStatusChanged: {
65 if (status == Loader.Ready && chartLoader.status == Loader.Ready && chartLoader.item) {
65 if (status == Loader.Ready && chartLoader.status == Loader.Ready && chartLoader.item) {
66 if (source.toString().search("ChartEditor.qml") > 0)
66 if (source.toString().search("/ChartEditor.qml") > 0)
67 editorLoader.item.chart = chartLoader.item.chart;
67 editorLoader.item.chart = chartLoader.item.chart;
68 else
68 else
69 editorLoader.item.series = chartLoader.item.series;
69 editorLoader.item.series = chartLoader.item.series;
70 }
70 }
71 }
71 }
72 }
72 }
73 }
73 }
74
74
75 Row {
75 Row {
76 id: buttonRow
76 id: buttonRow
77 height: 40
77 height: 40
78 anchors.bottom: parent.bottom
78 anchors.bottom: parent.bottom
79 anchors.horizontalCenter: parent.horizontalCenter
79 anchors.horizontalCenter: parent.horizontalCenter
80 spacing: 10
80 spacing: 10
81
81
82 Button {
82 Button {
83 text: "chart"
83 text: "chart"
84 width: buttonWidth
84 width: buttonWidth
85 onClicked: {
85 onClicked: {
86 chartLoader.source = "Chart.qml";
86 chartLoader.source = "Chart.qml";
87 editorLoader.source = "ChartEditor.qml";
87 editorLoader.source = "ChartEditor.qml";
88 }
88 }
89 }
89 }
90 Button {
90 Button {
91 text: "pie"
91 text: "pie"
92 width: buttonWidth
92 width: buttonWidth
93 onClicked: {
93 onClicked: {
94 chartLoader.source = "PieChart.qml";
94 chartLoader.source = "PieChart.qml";
95 editorLoader.source = "PieEditor.qml";
95 editorLoader.source = "PieEditor.qml";
96 }
96 }
97 }
97 }
98 Button {
98 Button {
99 text: "line"
99 text: "line"
100 width: buttonWidth
100 width: buttonWidth
101 onClicked: {
101 onClicked: {
102 chartLoader.source = "LineChart.qml";
102 chartLoader.source = "LineChart.qml";
103 editorLoader.source = "LineEditor.qml";
103 editorLoader.source = "LineEditor.qml";
104 }
104 }
105 }
105 }
106 Button {
106 Button {
107 text: "spline"
107 text: "spline"
108 width: buttonWidth
108 width: buttonWidth
109 onClicked: {
109 onClicked: {
110 chartLoader.source = "SplineChart.qml";
110 chartLoader.source = "SplineChart.qml";
111 editorLoader.source = "LineEditor.qml";
111 editorLoader.source = "LineEditor.qml";
112 }
112 }
113 }
113 }
114 Button {
114 Button {
115 text: "scatter"
115 text: "scatter"
116 width: buttonWidth
116 width: buttonWidth
117 onClicked: {
117 onClicked: {
118 chartLoader.source = "ScatterChart.qml";
118 chartLoader.source = "ScatterChart.qml";
119 editorLoader.source = "ScatterEditor.qml";
119 editorLoader.source = "ScatterEditor.qml";
120 }
120 }
121 }
121 }
122 Button {
122 Button {
123 text: "area"
123 text: "area"
124 width: buttonWidth
124 width: buttonWidth
125 onClicked: {
125 onClicked: {
126 chartLoader.source = "AreaChart.qml";
126 chartLoader.source = "AreaChart.qml";
127 editorLoader.source = "AreaEditor.qml";
127 editorLoader.source = "AreaEditor.qml";
128 }
128 }
129 }
129 }
130 Button {
130 Button {
131 text: "bar"
131 text: "bar"
132 width: buttonWidth
132 width: buttonWidth
133 onClicked: {
133 onClicked: {
134 chartLoader.source = "BarChart.qml";
134 chartLoader.source = "BarChart.qml";
135 editorLoader.source = "BarEditor.qml";
135 editorLoader.source = "BarEditor.qml";
136 }
136 }
137 }
137 }
138 Button {
138 Button {
139 text: "sbar"
139 text: "sbar"
140 width: buttonWidth
140 width: buttonWidth
141 onClicked: {
141 onClicked: {
142 chartLoader.source = "StackedBarChart.qml";
142 chartLoader.source = "StackedBarChart.qml";
143 editorLoader.source = "BarEditor.qml";
143 editorLoader.source = "BarEditor.qml";
144 }
144 }
145 }
145 }
146 Button {
146 Button {
147 text: "pbar"
147 text: "pbar"
148 width: buttonWidth
148 width: buttonWidth
149 onClicked: {
149 onClicked: {
150 chartLoader.source = "PercentBarChart.qml";
150 chartLoader.source = "PercentBarChart.qml";
151 editorLoader.source = "BarEditor.qml";
151 editorLoader.source = "BarEditor.qml";
152 }
152 }
153 }
153 }
154 Button {
154 Button {
155 text: "hbar"
155 text: "hbar"
156 width: buttonWidth
156 width: buttonWidth
157 onClicked: {
157 onClicked: {
158 chartLoader.source = "HorizontalBarChart.qml";
158 chartLoader.source = "HorizontalBarChart.qml";
159 editorLoader.source = "BarEditor.qml";
159 editorLoader.source = "BarEditor.qml";
160 }
160 }
161 }
161 }
162 Button {
162 Button {
163 text: "hsbar"
163 text: "hsbar"
164 width: buttonWidth
164 width: buttonWidth
165 onClicked: {
165 onClicked: {
166 chartLoader.source = "HorizontalStackedBarChart.qml";
166 chartLoader.source = "HorizontalStackedBarChart.qml";
167 editorLoader.source = "BarEditor.qml";
167 editorLoader.source = "BarEditor.qml";
168 }
168 }
169 }
169 }
170 Button {
170 Button {
171 text: "hpbar"
171 text: "hpbar"
172 width: buttonWidth
172 width: buttonWidth
173 onClicked: {
173 onClicked: {
174 chartLoader.source = "HorizontalPercentBarChart.qml";
174 chartLoader.source = "HorizontalPercentBarChart.qml";
175 editorLoader.source = "BarEditor.qml";
175 editorLoader.source = "BarEditor.qml";
176 }
176 }
177 }
177 }
178 }
178 }
179 }
179 }
General Comments 0
You need to be logged in to leave comments. Login now