diff --git a/tests/qmlchartproperties/qml/qmlchartproperties/AreaChart.qml b/tests/qmlchartproperties/qml/qmlchartproperties/AreaChart.qml index 5ae4a8a..16ed331 100644 --- a/tests/qmlchartproperties/qml/qmlchartproperties/AreaChart.qml +++ b/tests/qmlchartproperties/qml/qmlchartproperties/AreaChart.qml @@ -45,6 +45,20 @@ ChartView { XYPoint { x: 10; y: 3 } XYPoint { x: 11; y: 3 } } + lowerSeries: LineSeries { + XYPoint { x: 0; y: 0 } + XYPoint { x: 1; y: 0 } + XYPoint { x: 2; y: 0 } + XYPoint { x: 3; y: 0 } + XYPoint { x: 4; y: 0 } + XYPoint { x: 5; y: 0 } + XYPoint { x: 6; y: 0 } + XYPoint { x: 7; y: 0 } + XYPoint { x: 8; y: 0 } + XYPoint { x: 9; y: 0 } + XYPoint { x: 10; y: 0 } + XYPoint { x: 11; y: 0 } + } onNameChanged: console.log(name + ".onNameChanged: " + name); onVisibleChanged: console.log(name + ".onVisibleChanged: " + visible); diff --git a/tests/qmlchartproperties/qml/qmlchartproperties/AreaEditor.qml b/tests/qmlchartproperties/qml/qmlchartproperties/AreaEditor.qml index 43ad78f..44c116c 100644 --- a/tests/qmlchartproperties/qml/qmlchartproperties/AreaEditor.qml +++ b/tests/qmlchartproperties/qml/qmlchartproperties/AreaEditor.qml @@ -41,19 +41,31 @@ Flow { onClicked: series.borderColor = main.nextColor(); } Button { - text: "upper color" - onClicked: series.upperSeries.color = main.nextColor(); + id: upperButton + text: "upper series" + unpressedColor: "#79bd8f" + onClicked: { + lineEditor.visible = true; + color = "#00a388"; + lowerButton.color = "#79bd8f"; + lineEditor.series = series.upperSeries; + } } Button { - text: "lower color" - onClicked: series.lowerSeries.color = main.nextColor(); + id: lowerButton + text: "lower series" + unpressedColor: "#79bd8f" + onClicked: { + lineEditor.visible = true; + color = "#00a388"; + upperButton.color = "#79bd8f"; + lineEditor.series = series.lowerSeries; + } } - Button { - text: "upper points visible" - onClicked: series.upperSeries.pointsVisible = !series.pointsVisible; - } - Button { - text: "lower points visible" - onClicked: series.lowerSeries.pointsVisible = !series.pointsVisible; + LineEditor { + id: lineEditor + visible: false } + + onSeriesChanged: lineEditor.series = series.upperSeries; } diff --git a/tests/qmlchartproperties/qml/qmlchartproperties/ChartEditor.qml b/tests/qmlchartproperties/qml/qmlchartproperties/ChartEditor.qml index 86e687e..1f1c711 100644 --- a/tests/qmlchartproperties/qml/qmlchartproperties/ChartEditor.qml +++ b/tests/qmlchartproperties/qml/qmlchartproperties/ChartEditor.qml @@ -36,33 +36,53 @@ Item { flow: Flow.TopToBottom Button { + id: chartButton text: "Chart properties" - unpressedColor: "#ff6138" + unpressedColor: "#79bd8f" onClicked: { + color = "#00a388"; + legendButton.color = "#79bd8f"; + axisXButton.color = "#79bd8f"; + axisYButton.color = "#79bd8f"; loader.source = "ChartEditor1.qml"; loader.item.chart = series; } } Button { + id: legendButton text: "Legend properties" unpressedColor: "#79bd8f" onClicked: { + color = "#00a388"; + chartButton.color = "#79bd8f"; + axisXButton.color = "#79bd8f"; + axisYButton.color = "#79bd8f"; loader.source = "ChartEditor2.qml"; loader.item.chartLegend = series.legend; } } Button { + id: axisXButton text: "Axis X properties" - unpressedColor: "#beeb9f" + unpressedColor: "#79bd8f" onClicked: { + color = "#00a388"; + chartButton.color = "#79bd8f"; + legendButton.color = "#79bd8f"; + axisYButton.color = "#79bd8f"; loader.source = "ChartEditor3.qml"; loader.item.axis = series.axisX; } } Button { + id: axisYButton text: "Axis Y properties" - unpressedColor: "#00a388" + unpressedColor: "#79bd8f" onClicked: { + color = "#00a388"; + chartButton.color = "#79bd8f"; + legendButton.color = "#79bd8f"; + axisXButton.color = "#79bd8f"; loader.source = "ChartEditor3.qml"; loader.item.axis = series.axisY; } @@ -75,7 +95,6 @@ Item { anchors.bottom: parent.bottom anchors.left: parent.left anchors.right: parent.right - source: "ChartEditor1.qml" } }