##// 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 45 XYPoint { x: 10; y: 3 }
46 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 63 onNameChanged: console.log(name + ".onNameChanged: " + name);
50 64 onVisibleChanged: console.log(name + ".onVisibleChanged: " + visible);
@@ -41,19 +41,31 Flow {
41 41 onClicked: series.borderColor = main.nextColor();
42 42 }
43 43 Button {
44 text: "upper color"
45 onClicked: series.upperSeries.color = main.nextColor();
44 id: upperButton
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 54 Button {
48 text: "lower color"
49 onClicked: series.lowerSeries.color = main.nextColor();
55 id: lowerButton
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 {
52 text: "upper points visible"
53 onClicked: series.upperSeries.pointsVisible = !series.pointsVisible;
54 }
55 Button {
56 text: "lower points visible"
57 onClicked: series.lowerSeries.pointsVisible = !series.pointsVisible;
65 LineEditor {
66 id: lineEditor
67 visible: false
58 68 }
69
70 onSeriesChanged: lineEditor.series = series.upperSeries;
59 71 }
@@ -36,33 +36,53 Item {
36 36 flow: Flow.TopToBottom
37 37
38 38 Button {
39 id: chartButton
39 40 text: "Chart properties"
40 unpressedColor: "#ff6138"
41 unpressedColor: "#79bd8f"
41 42 onClicked: {
43 color = "#00a388";
44 legendButton.color = "#79bd8f";
45 axisXButton.color = "#79bd8f";
46 axisYButton.color = "#79bd8f";
42 47 loader.source = "ChartEditor1.qml";
43 48 loader.item.chart = series;
44 49 }
45 50 }
46 51 Button {
52 id: legendButton
47 53 text: "Legend properties"
48 54 unpressedColor: "#79bd8f"
49 55 onClicked: {
56 color = "#00a388";
57 chartButton.color = "#79bd8f";
58 axisXButton.color = "#79bd8f";
59 axisYButton.color = "#79bd8f";
50 60 loader.source = "ChartEditor2.qml";
51 61 loader.item.chartLegend = series.legend;
52 62 }
53 63 }
54 64 Button {
65 id: axisXButton
55 66 text: "Axis X properties"
56 unpressedColor: "#beeb9f"
67 unpressedColor: "#79bd8f"
57 68 onClicked: {
69 color = "#00a388";
70 chartButton.color = "#79bd8f";
71 legendButton.color = "#79bd8f";
72 axisYButton.color = "#79bd8f";
58 73 loader.source = "ChartEditor3.qml";
59 74 loader.item.axis = series.axisX;
60 75 }
61 76 }
62 77 Button {
78 id: axisYButton
63 79 text: "Axis Y properties"
64 unpressedColor: "#00a388"
80 unpressedColor: "#79bd8f"
65 81 onClicked: {
82 color = "#00a388";
83 chartButton.color = "#79bd8f";
84 legendButton.color = "#79bd8f";
85 axisXButton.color = "#79bd8f";
66 86 loader.source = "ChartEditor3.qml";
67 87 loader.item.axis = series.axisY;
68 88 }
@@ -75,7 +95,6 Item {
75 95 anchors.bottom: parent.bottom
76 96 anchors.left: parent.left
77 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