##// END OF EJS Templates
QML font properties to chart properties test app
Tero Ahola -
r1525:00b43ba6a2f2
parent child
Show More
@@ -0,0 +1,97
1 /****************************************************************************
2 **
3 ** Copyright (C) 2012 Digia Plc
4 ** All rights reserved.
5 ** For any questions to Digia, please use contact form at http://qt.digia.com
6 **
7 ** This file is part of the Qt Commercial Charts Add-on.
8 **
9 ** $QT_BEGIN_LICENSE$
10 ** Licensees holding valid Qt Commercial licenses may use this file in
11 ** accordance with the Qt Commercial License Agreement provided with the
12 ** Software or, alternatively, in accordance with the terms contained in
13 ** a written agreement between you and Digia.
14 **
15 ** If you have questions regarding the use of this file, please use
16 ** contact form at http://qt.digia.com
17 ** $QT_END_LICENSE$
18 **
19 ****************************************************************************/
20
21 import QtQuick 1.0
22 import QtCommercial.Chart 1.0
23
24 Row {
25 anchors.fill: parent
26 spacing: 5
27 property variant chart
28
29 Flow {
30 flow: Flow.TopToBottom
31 spacing: 5
32 Button {
33 text: "visible"
34 onClicked: chart.visible = !chart.visible;
35 }
36 Button {
37 text: "theme +"
38 onClicked: chart.theme++;
39 }
40 Button {
41 text: "theme -"
42 onClicked: chart.theme--;
43 }
44 Button {
45 text: "animation opt +"
46 onClicked: chart.animationOptions++;
47 }
48 Button {
49 text: "animation opt -"
50 onClicked: chart.animationOptions--;
51 }
52 Button {
53 text: "background color"
54 onClicked: chart.backgroundColor = main.nextColor();
55 }
56 Button {
57 text: "drop shadow enabled"
58 onClicked: chart.dropShadowEnabled = !chart.dropShadowEnabled;
59 }
60 Button {
61 text: "zoom +"
62 onClicked: chart.zoom(2);
63 }
64 Button {
65 text: "zoom -"
66 onClicked: chart.zoom(0.5);
67 }
68 Button {
69 text: "scroll left"
70 onClicked: chart.scrollLeft(10);
71 }
72 Button {
73 text: "scroll right"
74 onClicked: chart.scrollRight(10);
75 }
76 Button {
77 text: "scroll up"
78 onClicked: chart.scrollUp(10);
79 }
80 Button {
81 text: "scroll down"
82 onClicked: chart.scrollDown(10);
83 }
84 Button {
85 text: "title color"
86 onClicked: chart.titleColor = main.nextColor();
87 }
88 }
89
90 FontEditor {
91 id: fontEditor
92 fontDescription: "title"
93 function editedFont() {
94 return chart.titleFont;
95 }
96 }
97 }
@@ -0,0 +1,73
1 /****************************************************************************
2 **
3 ** Copyright (C) 2012 Digia Plc
4 ** All rights reserved.
5 ** For any questions to Digia, please use contact form at http://qt.digia.com
6 **
7 ** This file is part of the Qt Commercial Charts Add-on.
8 **
9 ** $QT_BEGIN_LICENSE$
10 ** Licensees holding valid Qt Commercial licenses may use this file in
11 ** accordance with the Qt Commercial License Agreement provided with the
12 ** Software or, alternatively, in accordance with the terms contained in
13 ** a written agreement between you and Digia.
14 **
15 ** If you have questions regarding the use of this file, please use
16 ** contact form at http://qt.digia.com
17 ** $QT_END_LICENSE$
18 **
19 ****************************************************************************/
20
21 import QtQuick 1.0
22 import QtCommercial.Chart 1.0
23
24 Row {
25 anchors.fill: parent
26 spacing: 5
27 property variant chartLegend
28
29 Flow {
30 spacing: 5
31 flow: Flow.TopToBottom
32
33 Button {
34 text: "legend visible"
35 onClicked: chartLegend.visible = !chartLegend.visible;
36 }
37 Button {
38 text: "legend bckgrd visible"
39 onClicked: chartLegend.backgroundVisible = !chartLegend.backgroundVisible;
40 }
41 Button {
42 text: "legend color"
43 onClicked: chartLegend.color = main.nextColor();
44 }
45 Button {
46 text: "legend border color"
47 onClicked: chartLegend.borderColor = main.nextColor();
48 }
49 Button {
50 text: "legend top"
51 onClicked: chartLegend.alignment ^= Qt.AlignTop;
52 }
53 Button {
54 text: "legend bottom"
55 onClicked: chartLegend.alignment ^= Qt.AlignBottom;
56 }
57 Button {
58 text: "legend left"
59 onClicked: chartLegend.alignment ^= Qt.AlignLeft;
60 }
61 Button {
62 text: "legend right"
63 onClicked: chartLegend.alignment ^= Qt.AlignRight;
64 }
65 }
66
67 FontEditor {
68 fontDescription: "legend"
69 function editedFont() {
70 return chartLegend.font;
71 }
72 }
73 }
@@ -0,0 +1,107
1 /****************************************************************************
2 **
3 ** Copyright (C) 2012 Digia Plc
4 ** All rights reserved.
5 ** For any questions to Digia, please use contact form at http://qt.digia.com
6 **
7 ** This file is part of the Qt Commercial Charts Add-on.
8 **
9 ** $QT_BEGIN_LICENSE$
10 ** Licensees holding valid Qt Commercial licenses may use this file in
11 ** accordance with the Qt Commercial License Agreement provided with the
12 ** Software or, alternatively, in accordance with the terms contained in
13 ** a written agreement between you and Digia.
14 **
15 ** If you have questions regarding the use of this file, please use
16 ** contact form at http://qt.digia.com
17 ** $QT_END_LICENSE$
18 **
19 ****************************************************************************/
20
21 import QtQuick 1.0
22 import QtCommercial.Chart 1.0
23
24 Row {
25 anchors.fill: parent
26 spacing: 5
27 property variant axis
28
29 Flow {
30 id: flow
31 spacing: 5
32 flow: Flow.TopToBottom
33
34 Button {
35 text: "axis visible"
36 onClicked: axis.visible = !axis.visible;
37 }
38 Button {
39 text: "axis grid visible"
40 onClicked: axis.gridVisible = !axis.gridVisible;
41 }
42 Button {
43 text: "axis color"
44 onClicked: axis.color = main.nextColor();
45 }
46 Button {
47 text: "axis labels color"
48 onClicked: axis.labelsColor = main.nextColor();
49 }
50 Button {
51 text: "axis labels angle +"
52 onClicked: axis.labelsAngle += 5;
53 }
54 Button {
55 text: "axis labels angle -"
56 onClicked: axis.labelsAngle -= 5;
57 }
58 Button {
59 text: "axis shades visible"
60 onClicked: axis.shadesVisible = !axis.shadesVisible;
61 }
62 Button {
63 text: "axis shades color"
64 onClicked: axis.shadesColor = main.nextColor();
65 }
66 Button {
67 text: "axis shades bcolor"
68 onClicked: axis.shadesBorderColor = main.nextColor();
69 }
70 Button {
71 text: "axis max +"
72 onClicked: axis.max += 0.1;
73 }
74 Button {
75 text: "axis max -"
76 onClicked: axis.max -= 0.1;
77 }
78 Button {
79 text: "axis min +"
80 onClicked: axis.min += 0.1;
81 }
82 Button {
83 text: "axis min -"
84 onClicked: axis.min -= 0.1;
85 }
86 Button {
87 text: "axis ticks count +"
88 onClicked: axis.ticksCount++;
89 }
90 Button {
91 text: "axis ticks count -"
92 onClicked: axis.ticksCount--;
93 }
94 Button {
95 text: "axis nice nmb"
96 onClicked: axis.niceNumbersEnabled = !axis.niceNumbersEnabled;
97 }
98 }
99
100 FontEditor {
101 id: fontEditor
102 fontDescription: "axis"
103 function editedFont() {
104 return axis.labelsFont;
105 }
106 }
107 }
@@ -0,0 +1,93
1 /****************************************************************************
2 **
3 ** Copyright (C) 2012 Digia Plc
4 ** All rights reserved.
5 ** For any questions to Digia, please use contact form at http://qt.digia.com
6 **
7 ** This file is part of the Qt Commercial Charts Add-on.
8 **
9 ** $QT_BEGIN_LICENSE$
10 ** Licensees holding valid Qt Commercial licenses may use this file in
11 ** accordance with the Qt Commercial License Agreement provided with the
12 ** Software or, alternatively, in accordance with the terms contained in
13 ** a written agreement between you and Digia.
14 **
15 ** If you have questions regarding the use of this file, please use
16 ** contact form at http://qt.digia.com
17 ** $QT_END_LICENSE$
18 **
19 ****************************************************************************/
20
21 import QtQuick 1.0
22 import QtCommercial.Chart 1.0
23
24 Flow {
25 flow: Flow.TopToBottom
26 spacing: 5
27 property string fontDescription: ""
28
29 Button {
30 text: fontDescription + " bold"
31 onClicked: editedFont().bold = !editedFont().bold;
32 }
33 Button {
34 text: fontDescription + " capitalization"
35 onClicked: editedFont().capitalization++;
36 }
37 Button {
38 text: fontDescription + " family"
39 onClicked: editedFont().family = "courier";
40 }
41 Button {
42 text: fontDescription + " font italic"
43 onClicked: editedFont().italic = !editedFont().italic;
44 }
45 Button {
46 text: fontDescription + " letterSpacing +"
47 onClicked: editedFont().letterSpacing++;
48 }
49 Button {
50 text: fontDescription + " letterSpacing -"
51 onClicked: editedFont().letterSpacing--;
52 }
53 Button {
54 text: fontDescription + " pixelSize +"
55 onClicked: editedFont().pixelSize++;
56 }
57 Button {
58 text: fontDescription + " pixelSize -"
59 onClicked: editedFont().pixelSize--;
60 }
61 Button {
62 text: fontDescription + " pointSize +"
63 onClicked: editedFont().pointSize++;
64 }
65 Button {
66 text: fontDescription + " pointSize -"
67 onClicked: editedFont().pointSize--;
68 }
69 Button {
70 text: fontDescription + " strikeout"
71 onClicked: editedFont().strikeout = !editedFont().strikeout;
72 }
73 Button {
74 text: fontDescription + " underline"
75 onClicked: editedFont().underline = !editedFont().underline;
76 }
77 Button {
78 text: fontDescription + " weight +"
79 onClicked: editedFont().weight++;
80 }
81 Button {
82 text: fontDescription + " weight -"
83 onClicked: editedFont().weight--;
84 }
85 Button {
86 text: fontDescription + " wordSpacing +"
87 onClicked: editedFont().wordSpacing++;
88 }
89 Button {
90 text: fontDescription + " wordSpacing -"
91 onClicked: editedFont().wordSpacing--;
92 }
93 }
@@ -21,82 +21,86
21 import QtQuick 1.0
21 import QtQuick 1.0
22 import QtCommercial.Chart 1.0
22 import QtCommercial.Chart 1.0
23
23
24 Flow {
24 Row {
25 id: flow
25 anchors.fill: parent
26 spacing: 5
26 spacing: 5
27 flow: Flow.TopToBottom
28 property variant series
27 property variant series
29
28
30 Button {
29 Flow {
31 text: "visible"
30 spacing: 5
32 onClicked: series.visible = !series.visible;
31 flow: Flow.TopToBottom
33 }
32
34 Button {
33 Button {
35 text: "labels visible"
34 text: "visible"
36 onClicked: series.labelsVisible = !series.labelsVisible;
35 onClicked: series.visible = !series.visible;
37 }
38 Button {
39 text: "bar width +"
40 onClicked: series.barWidth += 0.1;
41 }
42 Button {
43 text: "bar width -"
44 onClicked: series.barWidth -= 0.1;
45 }
46 Button {
47 text: "append set"
48 onClicked: {
49 var count = series.count;
50 series.append("set" + count, [0, 0.1 * count, 0.2 * count, 0.3 * count, 0.4 * count, 0.5 * count, 0.6 * count]);
51 }
36 }
52 }
37 Button {
53 Button {
38 text: "labels visible"
54 text: "insert set"
39 onClicked: series.labelsVisible = !series.labelsVisible;
55 onClicked: {
40 }
56 var count = series.count;
41 Button {
57 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]);
42 text: "bar width +"
43 onClicked: series.barWidth += 0.1;
44 }
45 Button {
46 text: "bar width -"
47 onClicked: series.barWidth -= 0.1;
48 }
49 Button {
50 text: "append set"
51 onClicked: {
52 var count = series.count;
53 series.append("set" + count, [0, 0.1 * count, 0.2 * count, 0.3 * count, 0.4 * count, 0.5 * count, 0.6 * count]);
54 }
55 }
56 Button {
57 text: "insert set"
58 onClicked: {
59 var count = series.count;
60 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]);
61 }
62 }
63 Button {
64 text: "remove set"
65 onClicked: series.remove(series.at(series.count - 1));
66 }
67 Button {
68 text: "clear sets"
69 onClicked: series.clear();
58 }
70 }
59 }
60 Button {
61 text: "remove set"
62 onClicked: series.remove(series.at(series.count - 1));
63 }
64 Button {
65 text: "clear sets"
66 onClicked: series.clear();
67 }
68
71
69 Button {
72 Button {
70 text: "set 1 append"
73 text: "set 1 append"
71 onClicked: series.at(0).append(series.at(0).count + 1);
74 onClicked: series.at(0).append(series.at(0).count + 1);
72 }
75 }
73 Button {
76 Button {
74 text: "set 1 replace"
77 text: "set 1 replace"
75 onClicked: series.at(0).replace(series.at(0).count - 1, series.at(0).at(series.at(0).count - 1).y + 0.5);
78 onClicked: series.at(0).replace(series.at(0).count - 1, series.at(0).at(series.at(0).count - 1).y + 0.5);
76 }
79 }
77 Button {
80 Button {
78 text: "set 1 remove"
81 text: "set 1 remove"
79 onClicked: series.at(0).remove(series.at(0).count - 1);
82 onClicked: series.at(0).remove(series.at(0).count - 1);
80 }
83 }
81
84
82 Button {
85 Button {
83 text: "set 1 color"
86 text: "set 1 color"
84 onClicked: series.at(0).color = main.nextColor();
87 onClicked: series.at(0).color = main.nextColor();
85 }
88 }
86 Button {
89 Button {
87 text: "set 1 border color"
90 text: "set 1 border color"
88 onClicked: series.at(0).borderColor = main.nextColor();
91 onClicked: series.at(0).borderColor = main.nextColor();
89 }
92 }
90 Button {
93 Button {
91 text: "set 1 label color"
94 text: "set 1 label color"
92 onClicked: series.at(0).labelColor = main.nextColor();
95 onClicked: series.at(0).labelColor = main.nextColor();
93 }
96 }
94 Button {
95 text: "set 1 font size +"
96 onClicked: series.at(0).labelFont.pixelSize += 1;
97 }
97 }
98 Button {
98
99 text: "set 1 font size -"
99 FontEditor {
100 onClicked: series.at(0).labelFont.pixelSize -= 1;
100 id: fontEditor
101 fontDescription: "label"
102 function editedFont() {
103 return series.at(0).labelFont;
104 }
101 }
105 }
102 }
106 }
@@ -24,8 +24,9 Rectangle {
24 id: button
24 id: button
25 height: 25
25 height: 25
26 width: 140
26 width: 140
27 color: "#afafaf"
27 color: unpressedColor
28 radius: 5
28 radius: 5
29 property color unpressedColor: "#afafaf"
29
30
30 property string text: "button"
31 property string text: "button"
31 signal clicked
32 signal clicked
@@ -45,7 +46,7 Rectangle {
45 if (pressed) {
46 if (pressed) {
46 button.color = "#efefef";
47 button.color = "#efefef";
47 } else {
48 } else {
48 button.color = "#afafaf";
49 button.color = unpressedColor;
49 }
50 }
50 }
51 }
51 onPressAndHold: {
52 onPressAndHold: {
@@ -23,7 +23,7 import QtCommercial.Chart 1.0
23
23
24 ChartView {
24 ChartView {
25 id: chartView
25 id: chartView
26 title: "chart"
26 title: "Chart Title"
27 anchors.fill: parent
27 anchors.fill: parent
28 property variant series: chartView
28 property variant series: chartView
29
29
@@ -97,7 +97,7 ChartView {
97 anchors.leftMargin: parent.leftMargin
97 anchors.leftMargin: parent.leftMargin
98 anchors.rightMargin: parent.rightMargin
98 anchors.rightMargin: parent.rightMargin
99 opacity: 0.0
99 opacity: 0.0
100 onOpacityChanged: if (opacity == 1.0) opacity = 0.0;
100 onOpacityChanged: if (opacity > 0.9) opacity = 0.0;
101 Behavior on opacity {
101 Behavior on opacity {
102 NumberAnimation { duration: 800 }
102 NumberAnimation { duration: 800 }
103 }
103 }
@@ -21,246 +21,61
21 import QtQuick 1.0
21 import QtQuick 1.0
22 import QtCommercial.Chart 1.0
22 import QtCommercial.Chart 1.0
23
23
24
24 Item {
25 Flow {
25 id: chartEditor
26 id: flow
27 spacing: 5
28 flow: Flow.TopToBottom
29 property variant series // TODO: rename to chart
26 property variant series // TODO: rename to chart
27 onSeriesChanged: loader.item.chart = series;
30
28
31 Button {
29 Flow {
32 text: "visible"
30 id: selectorFlow
33 onClicked: series.visible = !series.visible;
31 anchors.top: parent.top
34 }
32 height: 60
35 Button {
33 anchors.left: parent.left
36 text: "theme +"
34 anchors.right: parent.right
37 onClicked: series.theme++;
35 spacing: 5
38 }
36 flow: Flow.TopToBottom
39 Button {
40 text: "theme -"
41 onClicked: series.theme--;
42 }
43 Button {
44 text: "animation opt +"
45 onClicked: series.animationOptions++;
46 }
47 Button {
48 text: "animation opt -"
49 onClicked: series.animationOptions--;
50 }
51 Button {
52 text: "title font bold"
53 onClicked: series.titleFont.bold = !series.titleFont.bold;
54 }
55 Button {
56 text: "title color"
57 onClicked: series.titleColor = main.nextColor();
58 }
59 Button {
60 text: "background color"
61 onClicked: series.backgroundColor = main.nextColor();
62 }
63 Button {
64 text: "drop shadow enabled"
65 onClicked: series.dropShadowEnabled = !series.dropShadowEnabled;
66 }
67 Button {
68 text: "zoom +"
69 onClicked: series.zoom(2);
70 }
71 Button {
72 text: "zoom -"
73 onClicked: series.zoom(0.5);
74 }
75 Button {
76 text: "scroll left"
77 onClicked: series.scrollLeft(10);
78 }
79 Button {
80 text: "scroll right"
81 onClicked: series.scrollRight(10);
82 }
83 Button {
84 text: "scroll up"
85 onClicked: series.scrollUp(10);
86 }
87 Button {
88 text: "scroll down"
89 onClicked: series.scrollDown(10);
90 }
91
37
92 Button {
38 Button {
93 text: "legend visible"
39 text: "Chart properties"
94 onClicked: series.legend.visible = !series.legend.visible;
40 unpressedColor: "#ff6138"
95 }
41 onClicked: {
96 Button {
42 loader.source = "ChartEditor1.qml";
97 text: "legend bckgrd visible"
43 loader.item.chart = series;
98 onClicked: series.legend.backgroundVisible = !series.legend.backgroundVisible;
44 }
99 }
45 }
100 Button {
46 Button {
101 text: "legend color"
47 text: "Legend properties"
102 onClicked: series.legend.color = main.nextColor();
48 unpressedColor: "#79bd8f"
103 }
49 onClicked: {
104 Button {
50 loader.source = "ChartEditor2.qml";
105 text: "legend border color"
51 loader.item.chartLegend = series.legend;
106 onClicked: series.legend.borderColor = main.nextColor();
52 }
107 }
53 }
108 Button {
54 Button {
109 text: "legend top"
55 text: "Axis X properties"
110 onClicked: series.legend.alignment ^= Qt.AlignTop;
56 unpressedColor: "#beeb9f"
111 }
57 onClicked: {
112 Button {
58 loader.source = "ChartEditor3.qml";
113 text: "legend bottom"
59 loader.item.axis = series.axisX;
114 onClicked: series.legend.alignment ^= Qt.AlignBottom;
60 }
115 }
61 }
116 Button {
62 Button {
117 text: "legend left"
63 text: "Axis Y properties"
118 onClicked: series.legend.alignment ^= Qt.AlignLeft;
64 unpressedColor: "#00a388"
119 }
65 onClicked: {
120 Button {
66 loader.source = "ChartEditor3.qml";
121 text: "legend right"
67 loader.item.axis = series.axisY;
122 onClicked: series.legend.alignment ^= Qt.AlignRight;
68 }
69 }
123 }
70 }
124
71
125 Button {
72 Loader {
126 text: "axis X visible"
73 id: loader
127 onClicked: series.axisX.visible = !series.axisX.visible;
74 anchors.top: selectorFlow.bottom
128 }
75 anchors.bottom: parent.bottom
129 Button {
76 anchors.left: parent.left
130 text: "axis X grid visible"
77 anchors.right: parent.right
131 onClicked: series.axisX.gridVisible = !series.axisX.gridVisible;
78 source: "ChartEditor1.qml"
132 }
133 Button {
134 text: "axis X labels italic"
135 onClicked: series.axisX.labelsFont.italic = !series.axisX.labelsFont.italic;
136 }
137 Button {
138 text: "axis X labels visible"
139 onClicked: series.axisX.labelsVisible = !series.axisX.labelsVisible;
140 }
141 Button {
142 text: "axis X color"
143 onClicked: series.axisX.color = main.nextColor();
144 }
145 Button {
146 text: "axis X labels color"
147 onClicked: series.axisX.labelsColor = main.nextColor();
148 }
149 Button {
150 text: "axis X labels angle +"
151 onClicked: series.axisX.labelsAngle += 5;
152 }
153 Button {
154 text: "axis X labels angle -"
155 onClicked: series.axisX.labelsAngle -= 5;
156 }
157 Button {
158 text: "axis X shades visible"
159 onClicked: series.axisX.shadesVisible = !series.axisX.shadesVisible;
160 }
161 Button {
162 text: "axis X shades color"
163 onClicked: series.axisX.shadesColor = main.nextColor();
164 }
165 Button {
166 text: "axis X shades bcolor"
167 onClicked: series.axisX.shadesBorderColor = main.nextColor();
168 }
169 Button {
170 text: "axis X max +"
171 onClicked: series.axisX.max += 0.1;
172 }
173 Button {
174 text: "axis X max -"
175 onClicked: series.axisX.max -= 0.1;
176 }
177 Button {
178 text: "axis X min +"
179 onClicked: series.axisX.min += 0.1;
180 }
181 Button {
182 text: "axis X min -"
183 onClicked: series.axisX.min -= 0.1;
184 }
185 Button {
186 text: "axis X ticks count +"
187 onClicked: series.axisX.ticksCount++;
188 }
189 Button {
190 text: "axis X ticks count -"
191 onClicked: series.axisX.ticksCount--;
192 }
193 Button {
194 text: "axis X nice nmb"
195 onClicked: series.axisX.niceNumbersEnabled = !series.axisX.niceNumbersEnabled;
196 }
79 }
197
80
198 Button {
199 text: "axis Y visible"
200 onClicked: series.axisY.visible = !series.axisY.visible;
201 }
202 Button {
203 text: "axis Y grid visible"
204 onClicked: series.axisY.gridVisible = !series.axisY.gridVisible;
205 }
206 Button {
207 text: "axis Y labels visible"
208 onClicked: series.axisY.labelsVisible = !series.axisY.labelsVisible;
209 }
210 Button {
211 text: "axis Y color"
212 onClicked: series.axisY.color = main.nextColor();
213 }
214 Button {
215 text: "axis Y labels color"
216 onClicked: series.axisY.labelsColor = main.nextColor();
217 }
218 Button {
219 text: "axis Y labels angle +"
220 onClicked: series.axisY.labelsAngle += 5;
221 }
222 Button {
223 text: "axis Y labels angle -"
224 onClicked: series.axisY.labelsAngle -= 5;
225 }
226 Button {
227 text: "axis Y shades visible"
228 onClicked: series.axisY.shadesVisible = !series.axisY.shadesVisible;
229 }
230 Button {
231 text: "axis Y shades color"
232 onClicked: series.axisY.shadesColor = main.nextColor();
233 }
234 Button {
235 text: "axis Y shades bcolor"
236 onClicked: series.axisY.shadesBorderColor = main.nextColor();
237 }
238 Button {
239 text: "axis Y max +"
240 onClicked: series.axisY.max += 0.1;
241 }
242 Button {
243 text: "axis Y max -"
244 onClicked: series.axisY.max -= 0.1;
245 }
246 Button {
247 text: "axis Y min +"
248 onClicked: series.axisY.min += 0.1;
249 }
250 Button {
251 text: "axis Y min -"
252 onClicked: series.axisY.min -= 0.1;
253 }
254 Button {
255 text: "axis Y ticks count +"
256 onClicked: series.axisY.ticksCount++;
257 }
258 Button {
259 text: "axis Y ticks count -"
260 onClicked: series.axisY.ticksCount--;
261 }
262 Button {
263 text: "axis Y nice nmb"
264 onClicked: series.axisY.niceNumbersEnabled = !series.axisY.niceNumbersEnabled;
265 }
266 }
81 }
@@ -21,118 +21,123
21 import QtQuick 1.0
21 import QtQuick 1.0
22 import QtCommercial.Chart 1.0
22 import QtCommercial.Chart 1.0
23
23
24 Flow {
24 Row {
25 id: flow
25 anchors.fill: parent
26 spacing: 5
26 spacing: 5
27 flow: Flow.TopToBottom
28 property variant series
27 property variant series
29
28
30 Button {
29 Flow {
31 text: "visible"
30 id: flow
32 onClicked: series.visible = !series.visible;
31 spacing: 5
33 }
32 flow: Flow.TopToBottom
34 Button {
33
35 text: "series hpos +"
34 Button {
36 onClicked: series.horizontalPosition += 0.1;
35 text: "visible"
37 }
36 onClicked: series.visible = !series.visible;
38 Button {
37 }
39 text: "series hpos -"
38 Button {
40 onClicked: series.horizontalPosition -= 0.1;
39 text: "series hpos +"
41 }
40 onClicked: series.horizontalPosition += 0.1;
42 Button {
41 }
43 text: "series vpos +"
42 Button {
44 onClicked: series.verticalPosition += 0.1;
43 text: "series hpos -"
45 }
44 onClicked: series.horizontalPosition -= 0.1;
46 Button {
45 }
47 text: "series vpos -"
46 Button {
48 onClicked: series.verticalPosition -= 0.1;
47 text: "series vpos +"
49 }
48 onClicked: series.verticalPosition += 0.1;
50 Button {
49 }
51 text: "series size +"
50 Button {
52 onClicked: series.size += 0.1;
51 text: "series vpos -"
53 }
52 onClicked: series.verticalPosition -= 0.1;
54 Button {
53 }
55 text: "series size -"
54 Button {
56 onClicked: series.size -= 0.1;
55 text: "series size +"
57 }
56 onClicked: series.size += 0.1;
58 Button {
57 }
59 text: "series start angle +"
58 Button {
60 onClicked: series.startAngle += 1.1;
59 text: "series size -"
61 }
60 onClicked: series.size -= 0.1;
62 Button {
61 }
63 text: "series start angle -"
62 Button {
64 onClicked: series.startAngle -= 1.1;
63 text: "series start angle +"
65 }
64 onClicked: series.startAngle += 1.1;
66 Button {
65 }
67 text: "series end angle +"
66 Button {
68 onClicked: series.endAngle += 1.1;
67 text: "series start angle -"
69 }
68 onClicked: series.startAngle -= 1.1;
70 Button {
69 }
71 text: "series end angle -"
70 Button {
72 onClicked: series.endAngle -= 1.1;
71 text: "series end angle +"
73 }
72 onClicked: series.endAngle += 1.1;
74 Button {
73 }
75 text: "remove slice"
74 Button {
76 onClicked: series.remove(series.at(series.count - 1));
75 text: "series end angle -"
77 }
76 onClicked: series.endAngle -= 1.1;
78 Button {
77 }
79 text: "slice color"
78 Button {
80 onClicked: series.at(0).color = main.nextColor();
79 text: "remove slice"
81 }
80 onClicked: series.remove(series.at(series.count - 1));
82 Button {
81 }
83 text: "slice border color"
82 Button {
84 onClicked: series.at(0).borderColor = main.nextColor();
83 text: "slice color"
85 }
84 onClicked: series.at(0).color = main.nextColor();
86 Button {
85 }
87 text: "slice border width +"
86 Button {
88 onClicked: series.at(0).borderWidth++;
87 text: "slice border color"
89 }
88 onClicked: series.at(0).borderColor = main.nextColor();
90 Button {
89 }
91 text: "slice border width -"
90 Button {
92 onClicked: series.at(0).borderWidth--;
91 text: "slice border width +"
93 }
92 onClicked: series.at(0).borderWidth++;
94 Button {
93 }
95 text: "slice label visible"
94 Button {
96 onClicked: series.at(0).labelVisible = !series.at(0).labelVisible;
95 text: "slice border width -"
97 }
96 onClicked: series.at(0).borderWidth--;
98 Button {
97 }
99 text: "slice label position inside"
98 Button {
100 onClicked: series.at(0).labelPosition = PieSlice.LabelInside;
99 text: "slice label visible"
101 }
100 onClicked: series.at(0).labelVisible = !series.at(0).labelVisible;
102 Button {
101 }
103 text: "slice label position outside"
102 Button {
104 onClicked: series.at(0).labelPosition = PieSlice.LabelOutside;
103 text: "slice label position inside"
105 }
104 onClicked: series.at(0).labelPosition = PieSlice.LabelInside;
106 Button {
105 }
107 text: "slice label arm len +"
106 Button {
108 onClicked: series.at(0).labelArmLengthFactor += 0.1;
107 text: "slice label position outside"
109 }
108 onClicked: series.at(0).labelPosition = PieSlice.LabelOutside;
110 Button {
109 }
111 text: "slice label arm len -"
110 Button {
112 onClicked: series.at(0).labelArmLengthFactor -= 0.1;
111 text: "slice label arm len +"
113 }
112 onClicked: series.at(0).labelArmLengthFactor += 0.1;
114 Button {
113 }
115 text: "slice label color"
114 Button {
116 onClicked: series.at(0).labelColor = main.nextColor();
115 text: "slice label arm len -"
117 }
116 onClicked: series.at(0).labelArmLengthFactor -= 0.1;
118 Button {
117 }
119 text: "slice exploded"
118 Button {
120 onClicked: series.at(0).exploded = !series.at(0).exploded;
119 text: "slice label color"
121 }
120 onClicked: series.at(0).labelColor = main.nextColor();
122 Button {
121 }
123 text: "slice explode dist +"
122 Button {
124 onClicked: series.at(0).explodeDistanceFactor += 0.1;
123 text: "slice exploded"
125 }
124 onClicked: series.at(0).exploded = !series.at(0).exploded;
126 Button {
125 }
127 text: "slice explode dist -"
126 Button {
128 onClicked: series.at(0).explodeDistanceFactor -= 0.1;
127 text: "slice explode dist +"
129 }
128 onClicked: series.at(0).explodeDistanceFactor += 0.1;
130 Button {
129 }
131 text: "slice label fontsize -"
130 Button {
132 onClicked: series.at(0).labelFont.pixelSize -= 1;
131 text: "slice explode dist -"
132 onClicked: series.at(0).explodeDistanceFactor -= 0.1;
133 }
133 }
134 }
134 Button {
135
135 text: "slice label fontsize +"
136 FontEditor {
136 onClicked: series.at(0).labelFont.pixelSize += 1;
137 id: fontEditor
138 fontDescription: "label"
139 function editedFont() {
140 return series.at(0).labelFont;
141 }
137 }
142 }
138 }
143 }
@@ -19,5 +19,9
19 <file>qml/qmlchartproperties/PercentBarChart.qml</file>
19 <file>qml/qmlchartproperties/PercentBarChart.qml</file>
20 <file>qml/qmlchartproperties/Chart.qml</file>
20 <file>qml/qmlchartproperties/Chart.qml</file>
21 <file>qml/qmlchartproperties/ChartEditor.qml</file>
21 <file>qml/qmlchartproperties/ChartEditor.qml</file>
22 <file>qml/qmlchartproperties/ChartEditor1.qml</file>
23 <file>qml/qmlchartproperties/ChartEditor2.qml</file>
24 <file>qml/qmlchartproperties/ChartEditor3.qml</file>
25 <file>qml/qmlchartproperties/FontEditor.qml</file>
22 </qresource>
26 </qresource>
23 </RCC>
27 </RCC>
General Comments 0
You need to be logged in to leave comments. Login now