@@ -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 | 21 | import QtQuick 1.0 |
|
22 | 22 | import QtCommercial.Chart 1.0 |
|
23 | 23 | |
|
24 |
|
|
|
25 | id: flow | |
|
24 | Row { | |
|
25 | anchors.fill: parent | |
|
26 | 26 | spacing: 5 |
|
27 | flow: Flow.TopToBottom | |
|
28 | 27 | property variant series |
|
29 | 28 | |
|
30 |
|
|
|
31 | text: "visible" | |
|
32 | onClicked: series.visible = !series.visible; | |
|
33 | } | |
|
34 | Button { | |
|
35 |
text: " |
|
|
36 |
onClicked: series. |
|
|
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]); | |
|
29 | Flow { | |
|
30 | spacing: 5 | |
|
31 | flow: Flow.TopToBottom | |
|
32 | ||
|
33 | Button { | |
|
34 | text: "visible" | |
|
35 | onClicked: series.visible = !series.visible; | |
|
51 | 36 | } |
|
52 | } | |
|
53 | Button { | |
|
54 | text: "insert set" | |
|
55 | onClicked: { | |
|
56 | var count = series.count; | |
|
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]); | |
|
37 | Button { | |
|
38 | text: "labels visible" | |
|
39 | onClicked: series.labelsVisible = !series.labelsVisible; | |
|
40 | } | |
|
41 | Button { | |
|
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 { | |
|
70 | text: "set 1 append" | |
|
71 | onClicked: series.at(0).append(series.at(0).count + 1); | |
|
72 | } | |
|
73 | Button { | |
|
74 | 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); | |
|
76 | } | |
|
77 | Button { | |
|
78 | text: "set 1 remove" | |
|
79 | onClicked: series.at(0).remove(series.at(0).count - 1); | |
|
80 | } | |
|
72 | Button { | |
|
73 | text: "set 1 append" | |
|
74 | onClicked: series.at(0).append(series.at(0).count + 1); | |
|
75 | } | |
|
76 | Button { | |
|
77 | text: "set 1 replace" | |
|
78 | onClicked: series.at(0).replace(series.at(0).count - 1, series.at(0).at(series.at(0).count - 1).y + 0.5); | |
|
79 | } | |
|
80 | Button { | |
|
81 | text: "set 1 remove" | |
|
82 | onClicked: series.at(0).remove(series.at(0).count - 1); | |
|
83 | } | |
|
81 | 84 | |
|
82 | Button { | |
|
83 | text: "set 1 color" | |
|
84 | onClicked: series.at(0).color = main.nextColor(); | |
|
85 | } | |
|
86 | Button { | |
|
87 | text: "set 1 border color" | |
|
88 | onClicked: series.at(0).borderColor = main.nextColor(); | |
|
89 | } | |
|
90 | Button { | |
|
91 | text: "set 1 label color" | |
|
92 | onClicked: series.at(0).labelColor = main.nextColor(); | |
|
93 | } | |
|
94 | Button { | |
|
95 | text: "set 1 font size +" | |
|
96 | onClicked: series.at(0).labelFont.pixelSize += 1; | |
|
85 | Button { | |
|
86 | text: "set 1 color" | |
|
87 | onClicked: series.at(0).color = main.nextColor(); | |
|
88 | } | |
|
89 | Button { | |
|
90 | text: "set 1 border color" | |
|
91 | onClicked: series.at(0).borderColor = main.nextColor(); | |
|
92 | } | |
|
93 | Button { | |
|
94 | text: "set 1 label color" | |
|
95 | onClicked: series.at(0).labelColor = main.nextColor(); | |
|
96 | } | |
|
97 | 97 | } |
|
98 | Button { | |
|
99 | text: "set 1 font size -" | |
|
100 | onClicked: series.at(0).labelFont.pixelSize -= 1; | |
|
98 | ||
|
99 | FontEditor { | |
|
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 | 24 | id: button |
|
25 | 25 | height: 25 |
|
26 | 26 | width: 140 |
|
27 | color: "#afafaf" | |
|
27 | color: unpressedColor | |
|
28 | 28 | radius: 5 |
|
29 | property color unpressedColor: "#afafaf" | |
|
29 | 30 | |
|
30 | 31 | property string text: "button" |
|
31 | 32 | signal clicked |
@@ -45,7 +46,7 Rectangle { | |||
|
45 | 46 | if (pressed) { |
|
46 | 47 | button.color = "#efefef"; |
|
47 | 48 | } else { |
|
48 |
button.color = |
|
|
49 | button.color = unpressedColor; | |
|
49 | 50 | } |
|
50 | 51 | } |
|
51 | 52 | onPressAndHold: { |
@@ -23,7 +23,7 import QtCommercial.Chart 1.0 | |||
|
23 | 23 | |
|
24 | 24 | ChartView { |
|
25 | 25 | id: chartView |
|
26 |
title: " |
|
|
26 | title: "Chart Title" | |
|
27 | 27 | anchors.fill: parent |
|
28 | 28 | property variant series: chartView |
|
29 | 29 | |
@@ -97,7 +97,7 ChartView { | |||
|
97 | 97 | anchors.leftMargin: parent.leftMargin |
|
98 | 98 | anchors.rightMargin: parent.rightMargin |
|
99 | 99 | opacity: 0.0 |
|
100 |
onOpacityChanged: if (opacity |
|
|
100 | onOpacityChanged: if (opacity > 0.9) opacity = 0.0; | |
|
101 | 101 | Behavior on opacity { |
|
102 | 102 | NumberAnimation { duration: 800 } |
|
103 | 103 | } |
@@ -21,246 +21,61 | |||
|
21 | 21 | import QtQuick 1.0 |
|
22 | 22 | import QtCommercial.Chart 1.0 |
|
23 | 23 | |
|
24 | ||
|
25 | Flow { | |
|
26 | id: flow | |
|
27 | spacing: 5 | |
|
28 | flow: Flow.TopToBottom | |
|
24 | Item { | |
|
25 | id: chartEditor | |
|
29 | 26 | property variant series // TODO: rename to chart |
|
27 | onSeriesChanged: loader.item.chart = series; | |
|
30 | 28 |
|
|
31 |
|
|
|
32 | text: "visible" | |
|
33 | onClicked: series.visible = !series.visible; | |
|
34 | } | |
|
35 | Button { | |
|
36 | text: "theme +" | |
|
37 | onClicked: series.theme++; | |
|
38 | } | |
|
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 | } | |
|
29 | Flow { | |
|
30 | id: selectorFlow | |
|
31 | anchors.top: parent.top | |
|
32 | height: 60 | |
|
33 | anchors.left: parent.left | |
|
34 | anchors.right: parent.right | |
|
35 | spacing: 5 | |
|
36 | flow: Flow.TopToBottom | |
|
91 | 37 | |
|
92 | Button { | |
|
93 | text: "legend visible" | |
|
94 | onClicked: series.legend.visible = !series.legend.visible; | |
|
95 | } | |
|
96 | Button { | |
|
97 | text: "legend bckgrd visible" | |
|
98 | onClicked: series.legend.backgroundVisible = !series.legend.backgroundVisible; | |
|
99 | } | |
|
100 | Button { | |
|
101 |
text: " |
|
|
102 | onClicked: series.legend.color = main.nextColor(); | |
|
103 | } | |
|
104 | Button { | |
|
105 | text: "legend border color" | |
|
106 | onClicked: series.legend.borderColor = main.nextColor(); | |
|
107 | } | |
|
108 | Button { | |
|
109 |
text: " |
|
|
110 | onClicked: series.legend.alignment ^= Qt.AlignTop; | |
|
111 | } | |
|
112 | Button { | |
|
113 | text: "legend bottom" | |
|
114 | onClicked: series.legend.alignment ^= Qt.AlignBottom; | |
|
115 | } | |
|
116 | Button { | |
|
117 | text: "legend left" | |
|
118 | onClicked: series.legend.alignment ^= Qt.AlignLeft; | |
|
119 | } | |
|
120 | Button { | |
|
121 | text: "legend right" | |
|
122 | onClicked: series.legend.alignment ^= Qt.AlignRight; | |
|
38 | Button { | |
|
39 | text: "Chart properties" | |
|
40 | unpressedColor: "#ff6138" | |
|
41 | onClicked: { | |
|
42 | loader.source = "ChartEditor1.qml"; | |
|
43 | loader.item.chart = series; | |
|
44 | } | |
|
45 | } | |
|
46 | Button { | |
|
47 | text: "Legend properties" | |
|
48 | unpressedColor: "#79bd8f" | |
|
49 | onClicked: { | |
|
50 | loader.source = "ChartEditor2.qml"; | |
|
51 | loader.item.chartLegend = series.legend; | |
|
52 | } | |
|
53 | } | |
|
54 | Button { | |
|
55 | text: "Axis X properties" | |
|
56 | unpressedColor: "#beeb9f" | |
|
57 | onClicked: { | |
|
58 | loader.source = "ChartEditor3.qml"; | |
|
59 | loader.item.axis = series.axisX; | |
|
60 | } | |
|
61 | } | |
|
62 | Button { | |
|
63 | text: "Axis Y properties" | |
|
64 | unpressedColor: "#00a388" | |
|
65 | onClicked: { | |
|
66 | loader.source = "ChartEditor3.qml"; | |
|
67 | loader.item.axis = series.axisY; | |
|
68 | } | |
|
69 | } | |
|
123 | 70 | } |
|
124 | 71 | |
|
125 | Button { | |
|
126 | text: "axis X visible" | |
|
127 | onClicked: series.axisX.visible = !series.axisX.visible; | |
|
128 | } | |
|
129 | Button { | |
|
130 | text: "axis X grid visible" | |
|
131 | onClicked: series.axisX.gridVisible = !series.axisX.gridVisible; | |
|
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; | |
|
72 | Loader { | |
|
73 | id: loader | |
|
74 | anchors.top: selectorFlow.bottom | |
|
75 | anchors.bottom: parent.bottom | |
|
76 | anchors.left: parent.left | |
|
77 | anchors.right: parent.right | |
|
78 | source: "ChartEditor1.qml" | |
|
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 | 21 | import QtQuick 1.0 |
|
22 | 22 | import QtCommercial.Chart 1.0 |
|
23 | 23 | |
|
24 |
|
|
|
25 | id: flow | |
|
24 | Row { | |
|
25 | anchors.fill: parent | |
|
26 | 26 | spacing: 5 |
|
27 | flow: Flow.TopToBottom | |
|
28 | 27 | property variant series |
|
29 | 28 | |
|
30 |
|
|
|
31 | text: "visible" | |
|
32 | onClicked: series.visible = !series.visible; | |
|
33 | } | |
|
34 | Button { | |
|
35 | text: "series hpos +" | |
|
36 | onClicked: series.horizontalPosition += 0.1; | |
|
37 | } | |
|
38 | Button { | |
|
39 | text: "series hpos -" | |
|
40 | onClicked: series.horizontalPosition -= 0.1; | |
|
41 | } | |
|
42 | Button { | |
|
43 | text: "series vpos +" | |
|
44 | onClicked: series.verticalPosition += 0.1; | |
|
45 | } | |
|
46 | Button { | |
|
47 | text: "series vpos -" | |
|
48 | onClicked: series.verticalPosition -= 0.1; | |
|
49 | } | |
|
50 | Button { | |
|
51 | text: "series size +" | |
|
52 | onClicked: series.size += 0.1; | |
|
53 | } | |
|
54 | Button { | |
|
55 | text: "series size -" | |
|
56 |
|
|
|
57 | } | |
|
58 | Button { | |
|
59 | text: "series start angle +" | |
|
60 | onClicked: series.startAngle += 1.1; | |
|
61 | } | |
|
62 | Button { | |
|
63 | text: "series start angle -" | |
|
64 |
|
|
|
65 | } | |
|
66 | Button { | |
|
67 | text: "series end angle +" | |
|
68 | onClicked: series.endAngle += 1.1; | |
|
69 | } | |
|
70 | Button { | |
|
71 | text: "series end angle -" | |
|
72 |
|
|
|
73 | } | |
|
74 | Button { | |
|
75 | text: "remove slice" | |
|
76 | onClicked: series.remove(series.at(series.count - 1)); | |
|
77 | } | |
|
78 | Button { | |
|
79 | text: "slice color" | |
|
80 | onClicked: series.at(0).color = main.nextColor(); | |
|
81 | } | |
|
82 | Button { | |
|
83 | text: "slice border color" | |
|
84 | onClicked: series.at(0).borderColor = main.nextColor(); | |
|
85 | } | |
|
86 | Button { | |
|
87 | text: "slice border width +" | |
|
88 | onClicked: series.at(0).borderWidth++; | |
|
89 | } | |
|
90 | Button { | |
|
91 | text: "slice border width -" | |
|
92 | onClicked: series.at(0).borderWidth--; | |
|
93 | } | |
|
94 | Button { | |
|
95 | text: "slice label visible" | |
|
96 | onClicked: series.at(0).labelVisible = !series.at(0).labelVisible; | |
|
97 | } | |
|
98 | Button { | |
|
99 | text: "slice label position inside" | |
|
100 | onClicked: series.at(0).labelPosition = PieSlice.LabelInside; | |
|
101 | } | |
|
102 | Button { | |
|
103 | text: "slice label position outside" | |
|
104 | onClicked: series.at(0).labelPosition = PieSlice.LabelOutside; | |
|
105 | } | |
|
106 | Button { | |
|
107 | text: "slice label arm len +" | |
|
108 | onClicked: series.at(0).labelArmLengthFactor += 0.1; | |
|
109 | } | |
|
110 | Button { | |
|
111 | text: "slice label arm len -" | |
|
112 | onClicked: series.at(0).labelArmLengthFactor -= 0.1; | |
|
113 | } | |
|
114 | Button { | |
|
115 | text: "slice label color" | |
|
116 | onClicked: series.at(0).labelColor = main.nextColor(); | |
|
117 | } | |
|
118 | Button { | |
|
119 | text: "slice exploded" | |
|
120 | onClicked: series.at(0).exploded = !series.at(0).exploded; | |
|
121 | } | |
|
122 | Button { | |
|
123 | text: "slice explode dist +" | |
|
124 | onClicked: series.at(0).explodeDistanceFactor += 0.1; | |
|
125 | } | |
|
126 | Button { | |
|
127 | text: "slice explode dist -" | |
|
128 | onClicked: series.at(0).explodeDistanceFactor -= 0.1; | |
|
129 | } | |
|
130 | Button { | |
|
131 | text: "slice label fontsize -" | |
|
132 | onClicked: series.at(0).labelFont.pixelSize -= 1; | |
|
29 | Flow { | |
|
30 | id: flow | |
|
31 | spacing: 5 | |
|
32 | flow: Flow.TopToBottom | |
|
33 | ||
|
34 | Button { | |
|
35 | text: "visible" | |
|
36 | onClicked: series.visible = !series.visible; | |
|
37 | } | |
|
38 | Button { | |
|
39 | text: "series hpos +" | |
|
40 | onClicked: series.horizontalPosition += 0.1; | |
|
41 | } | |
|
42 | Button { | |
|
43 | text: "series hpos -" | |
|
44 | onClicked: series.horizontalPosition -= 0.1; | |
|
45 | } | |
|
46 | Button { | |
|
47 | text: "series vpos +" | |
|
48 | onClicked: series.verticalPosition += 0.1; | |
|
49 | } | |
|
50 | Button { | |
|
51 | text: "series vpos -" | |
|
52 | onClicked: series.verticalPosition -= 0.1; | |
|
53 | } | |
|
54 | Button { | |
|
55 | text: "series size +" | |
|
56 | onClicked: series.size += 0.1; | |
|
57 | } | |
|
58 | Button { | |
|
59 | text: "series size -" | |
|
60 | onClicked: series.size -= 0.1; | |
|
61 | } | |
|
62 | Button { | |
|
63 | text: "series start angle +" | |
|
64 | onClicked: series.startAngle += 1.1; | |
|
65 | } | |
|
66 | Button { | |
|
67 | text: "series start angle -" | |
|
68 | onClicked: series.startAngle -= 1.1; | |
|
69 | } | |
|
70 | Button { | |
|
71 | text: "series end angle +" | |
|
72 | onClicked: series.endAngle += 1.1; | |
|
73 | } | |
|
74 | Button { | |
|
75 | text: "series end angle -" | |
|
76 | onClicked: series.endAngle -= 1.1; | |
|
77 | } | |
|
78 | Button { | |
|
79 | text: "remove slice" | |
|
80 | onClicked: series.remove(series.at(series.count - 1)); | |
|
81 | } | |
|
82 | Button { | |
|
83 | text: "slice color" | |
|
84 | onClicked: series.at(0).color = main.nextColor(); | |
|
85 | } | |
|
86 | Button { | |
|
87 | text: "slice border color" | |
|
88 | onClicked: series.at(0).borderColor = main.nextColor(); | |
|
89 | } | |
|
90 | Button { | |
|
91 | text: "slice border width +" | |
|
92 | onClicked: series.at(0).borderWidth++; | |
|
93 | } | |
|
94 | Button { | |
|
95 | text: "slice border width -" | |
|
96 | onClicked: series.at(0).borderWidth--; | |
|
97 | } | |
|
98 | Button { | |
|
99 | text: "slice label visible" | |
|
100 | onClicked: series.at(0).labelVisible = !series.at(0).labelVisible; | |
|
101 | } | |
|
102 | Button { | |
|
103 | text: "slice label position inside" | |
|
104 | onClicked: series.at(0).labelPosition = PieSlice.LabelInside; | |
|
105 | } | |
|
106 | Button { | |
|
107 | text: "slice label position outside" | |
|
108 | onClicked: series.at(0).labelPosition = PieSlice.LabelOutside; | |
|
109 | } | |
|
110 | Button { | |
|
111 | text: "slice label arm len +" | |
|
112 | onClicked: series.at(0).labelArmLengthFactor += 0.1; | |
|
113 | } | |
|
114 | Button { | |
|
115 | text: "slice label arm len -" | |
|
116 | onClicked: series.at(0).labelArmLengthFactor -= 0.1; | |
|
117 | } | |
|
118 | Button { | |
|
119 | text: "slice label color" | |
|
120 | onClicked: series.at(0).labelColor = main.nextColor(); | |
|
121 | } | |
|
122 | Button { | |
|
123 | text: "slice exploded" | |
|
124 | onClicked: series.at(0).exploded = !series.at(0).exploded; | |
|
125 | } | |
|
126 | Button { | |
|
127 | text: "slice explode dist +" | |
|
128 | onClicked: series.at(0).explodeDistanceFactor += 0.1; | |
|
129 | } | |
|
130 | Button { | |
|
131 | text: "slice explode dist -" | |
|
132 | onClicked: series.at(0).explodeDistanceFactor -= 0.1; | |
|
133 | } | |
|
133 | 134 | } |
|
134 | Button { | |
|
135 | text: "slice label fontsize +" | |
|
136 | onClicked: series.at(0).labelFont.pixelSize += 1; | |
|
135 | ||
|
136 | FontEditor { | |
|
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 | 19 | <file>qml/qmlchartproperties/PercentBarChart.qml</file> |
|
20 | 20 | <file>qml/qmlchartproperties/Chart.qml</file> |
|
21 | 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 | 26 | </qresource> |
|
23 | 27 | </RCC> |
General Comments 0
You need to be logged in to leave comments.
Login now