##// END OF EJS Templates
Allow editing of area series in QML tester app
Tero Ahola -
r1784:fcbf003a8d13
parent child
Show More
@@ -45,6 +45,20 ChartView {
45 XYPoint { x: 10; y: 3 }
45 XYPoint { x: 10; y: 3 }
46 XYPoint { x: 11; y: 3 }
46 XYPoint { x: 11; y: 3 }
47 }
47 }
48 lowerSeries: LineSeries {
49 XYPoint { x: 0; y: 0 }
50 XYPoint { x: 1; y: 0 }
51 XYPoint { x: 2; y: 0 }
52 XYPoint { x: 3; y: 0 }
53 XYPoint { x: 4; y: 0 }
54 XYPoint { x: 5; y: 0 }
55 XYPoint { x: 6; y: 0 }
56 XYPoint { x: 7; y: 0 }
57 XYPoint { x: 8; y: 0 }
58 XYPoint { x: 9; y: 0 }
59 XYPoint { x: 10; y: 0 }
60 XYPoint { x: 11; y: 0 }
61 }
48
62
49 onNameChanged: console.log(name + ".onNameChanged: " + name);
63 onNameChanged: console.log(name + ".onNameChanged: " + name);
50 onVisibleChanged: console.log(name + ".onVisibleChanged: " + visible);
64 onVisibleChanged: console.log(name + ".onVisibleChanged: " + visible);
@@ -41,19 +41,31 Flow {
41 onClicked: series.borderColor = main.nextColor();
41 onClicked: series.borderColor = main.nextColor();
42 }
42 }
43 Button {
43 Button {
44 text: "upper color"
44 id: upperButton
45 onClicked: series.upperSeries.color = main.nextColor();
45 text: "upper series"
46 unpressedColor: "#79bd8f"
47 onClicked: {
48 lineEditor.visible = true;
49 color = "#00a388";
50 lowerButton.color = "#79bd8f";
51 lineEditor.series = series.upperSeries;
52 }
46 }
53 }
47 Button {
54 Button {
48 text: "lower color"
55 id: lowerButton
49 onClicked: series.lowerSeries.color = main.nextColor();
56 text: "lower series"
57 unpressedColor: "#79bd8f"
58 onClicked: {
59 lineEditor.visible = true;
60 color = "#00a388";
61 upperButton.color = "#79bd8f";
62 lineEditor.series = series.lowerSeries;
63 }
50 }
64 }
51 Button {
65 LineEditor {
52 text: "upper points visible"
66 id: lineEditor
53 onClicked: series.upperSeries.pointsVisible = !series.pointsVisible;
67 visible: false
54 }
55 Button {
56 text: "lower points visible"
57 onClicked: series.lowerSeries.pointsVisible = !series.pointsVisible;
58 }
68 }
69
70 onSeriesChanged: lineEditor.series = series.upperSeries;
59 }
71 }
@@ -36,33 +36,53 Item {
36 flow: Flow.TopToBottom
36 flow: Flow.TopToBottom
37
37
38 Button {
38 Button {
39 id: chartButton
39 text: "Chart properties"
40 text: "Chart properties"
40 unpressedColor: "#ff6138"
41 unpressedColor: "#79bd8f"
41 onClicked: {
42 onClicked: {
43 color = "#00a388";
44 legendButton.color = "#79bd8f";
45 axisXButton.color = "#79bd8f";
46 axisYButton.color = "#79bd8f";
42 loader.source = "ChartEditor1.qml";
47 loader.source = "ChartEditor1.qml";
43 loader.item.chart = series;
48 loader.item.chart = series;
44 }
49 }
45 }
50 }
46 Button {
51 Button {
52 id: legendButton
47 text: "Legend properties"
53 text: "Legend properties"
48 unpressedColor: "#79bd8f"
54 unpressedColor: "#79bd8f"
49 onClicked: {
55 onClicked: {
56 color = "#00a388";
57 chartButton.color = "#79bd8f";
58 axisXButton.color = "#79bd8f";
59 axisYButton.color = "#79bd8f";
50 loader.source = "ChartEditor2.qml";
60 loader.source = "ChartEditor2.qml";
51 loader.item.chartLegend = series.legend;
61 loader.item.chartLegend = series.legend;
52 }
62 }
53 }
63 }
54 Button {
64 Button {
65 id: axisXButton
55 text: "Axis X properties"
66 text: "Axis X properties"
56 unpressedColor: "#beeb9f"
67 unpressedColor: "#79bd8f"
57 onClicked: {
68 onClicked: {
69 color = "#00a388";
70 chartButton.color = "#79bd8f";
71 legendButton.color = "#79bd8f";
72 axisYButton.color = "#79bd8f";
58 loader.source = "ChartEditor3.qml";
73 loader.source = "ChartEditor3.qml";
59 loader.item.axis = series.axisX;
74 loader.item.axis = series.axisX;
60 }
75 }
61 }
76 }
62 Button {
77 Button {
78 id: axisYButton
63 text: "Axis Y properties"
79 text: "Axis Y properties"
64 unpressedColor: "#00a388"
80 unpressedColor: "#79bd8f"
65 onClicked: {
81 onClicked: {
82 color = "#00a388";
83 chartButton.color = "#79bd8f";
84 legendButton.color = "#79bd8f";
85 axisXButton.color = "#79bd8f";
66 loader.source = "ChartEditor3.qml";
86 loader.source = "ChartEditor3.qml";
67 loader.item.axis = series.axisY;
87 loader.item.axis = series.axisY;
68 }
88 }
@@ -75,7 +95,6 Item {
75 anchors.bottom: parent.bottom
95 anchors.bottom: parent.bottom
76 anchors.left: parent.left
96 anchors.left: parent.left
77 anchors.right: parent.right
97 anchors.right: parent.right
78 source: "ChartEditor1.qml"
79 }
98 }
80
99
81 }
100 }
General Comments 0
You need to be logged in to leave comments. Login now