diff options
author | Tero Ahola <tero.ahola@digia.com> | 2012-08-22 13:48:25 +0300 |
---|---|---|
committer | Tero Ahola <tero.ahola@digia.com> | 2012-08-22 15:03:24 +0300 |
commit | c3705e59ed4078422b2ea28ea95135bdf12e49c5 (patch) | |
tree | 8e00ba366ef668a047c74f50dc68470a16309f15 /tests/qmlchartproperties | |
parent | 329e3a076da0a8f56d7c6b339a38cb60e7b1e253 (diff) |
Refactored QML axis handling
Diffstat (limited to 'tests/qmlchartproperties')
8 files changed, 4 insertions, 50 deletions
diff --git a/tests/qmlchartproperties/qml/qmlchartproperties/AreaChart.qml b/tests/qmlchartproperties/qml/qmlchartproperties/AreaChart.qml index 264352bc..2c2ee878 100644 --- a/tests/qmlchartproperties/qml/qmlchartproperties/AreaChart.qml +++ b/tests/qmlchartproperties/qml/qmlchartproperties/AreaChart.qml @@ -68,10 +68,6 @@ ChartView { onColorChanged: console.log(name + ".onColorChanged: " + color); onBorderColorChanged: console.log(name + ".onBorderColorChanged: " + borderColor); // onCountChanged: console.log(name + ".onCountChanged: " + count); - - Component.onCompleted: { - createDefaultAxes(); - } } AreaSeries { diff --git a/tests/qmlchartproperties/qml/qmlchartproperties/BarChart.qml b/tests/qmlchartproperties/qml/qmlchartproperties/BarChart.qml index 242fd15f..ad1243b4 100644 --- a/tests/qmlchartproperties/qml/qmlchartproperties/BarChart.qml +++ b/tests/qmlchartproperties/qml/qmlchartproperties/BarChart.qml @@ -30,14 +30,11 @@ ChartView { property variant series: mySeries - BarCategoriesAxis { - id:myAxis; - categories: ["2007", "2008", "2009", "2010", "2011", "2012" ] } BarSeries { id: mySeries name: "bar" - + axisX: BarCategoriesAxis { categories: ["2007", "2008", "2009", "2010", "2011", "2012" ] } BarSet { label: "Bob"; values: [2, 2, 3, 4, 5, 6] onClicked: console.log("barset.onClicked: " + index); onHovered: console.log("barset.onHovered: " + status); @@ -64,10 +61,4 @@ ChartView { onLabelsVisibleChanged: console.log("groupedBarSeries.onLabelsVisibleChanged: " + series.labelsVisible); onCountChanged: console.log("groupedBarSeries.onCountChanged: " + count); } - - Component.onCompleted: { - createDefaultAxes(); - setAxisX(myAxis,mySeries); - } - } diff --git a/tests/qmlchartproperties/qml/qmlchartproperties/Chart.qml b/tests/qmlchartproperties/qml/qmlchartproperties/Chart.qml index bedfc7af..82109ed0 100644 --- a/tests/qmlchartproperties/qml/qmlchartproperties/Chart.qml +++ b/tests/qmlchartproperties/qml/qmlchartproperties/Chart.qml @@ -107,8 +107,4 @@ ChartView { NumberAnimation { duration: 800 } } } - - Component.onCompleted: { - createDefaultAxes(); - } } diff --git a/tests/qmlchartproperties/qml/qmlchartproperties/LineChart.qml b/tests/qmlchartproperties/qml/qmlchartproperties/LineChart.qml index 68b5f497..279f443e 100644 --- a/tests/qmlchartproperties/qml/qmlchartproperties/LineChart.qml +++ b/tests/qmlchartproperties/qml/qmlchartproperties/LineChart.qml @@ -59,8 +59,4 @@ ChartView { XYPoint { x: 4.1; y: 2.3 } onClicked: console.log(name + ".onClicked: " + point.x + ", " + point.y); } - - Component.onCompleted: { - createDefaultAxes(); - } } diff --git a/tests/qmlchartproperties/qml/qmlchartproperties/PercentBarChart.qml b/tests/qmlchartproperties/qml/qmlchartproperties/PercentBarChart.qml index 7d5af230..f8c5ed34 100644 --- a/tests/qmlchartproperties/qml/qmlchartproperties/PercentBarChart.qml +++ b/tests/qmlchartproperties/qml/qmlchartproperties/PercentBarChart.qml @@ -30,14 +30,11 @@ ChartView { property variant series: mySeries - BarCategoriesAxis { - id: myAxis - categories: ["2007", "2008", "2009", "2010", "2011", "2012" ] - } - PercentBarSeries { id: mySeries name: "bar" + axisX: BarCategoriesAxis { categories: ["2007", "2008", "2009", "2010", "2011", "2012" ] } + BarSet { label: "Bob"; values: [2, 2, 3, 4, 5, 6] onClicked: console.log("barset.onClicked: " + index); onHovered: console.log("barset.onHovered: " + status); @@ -64,9 +61,4 @@ ChartView { onLabelsVisibleChanged: console.log("percentBarSeries.onLabelsVisibleChanged: " + series.labelsVisible); onCountChanged: console.log("percentBarSeries.onCountChanged: " + count); } - - Component.onCompleted: { - createDefaultAxes(); - setAxisX(myAxis,mySeries); - } } diff --git a/tests/qmlchartproperties/qml/qmlchartproperties/ScatterChart.qml b/tests/qmlchartproperties/qml/qmlchartproperties/ScatterChart.qml index 4a4a1cbb..e3765fb8 100644 --- a/tests/qmlchartproperties/qml/qmlchartproperties/ScatterChart.qml +++ b/tests/qmlchartproperties/qml/qmlchartproperties/ScatterChart.qml @@ -58,8 +58,4 @@ ChartView { XYPoint { x: 2.67; y: 2.65 } onClicked: console.log(name + ".onClicked: " + point.x + ", " + point.y); } - - Component.onCompleted: { - createDefaultAxes(); - } } diff --git a/tests/qmlchartproperties/qml/qmlchartproperties/SplineChart.qml b/tests/qmlchartproperties/qml/qmlchartproperties/SplineChart.qml index 0dbf65f3..7b12519b 100644 --- a/tests/qmlchartproperties/qml/qmlchartproperties/SplineChart.qml +++ b/tests/qmlchartproperties/qml/qmlchartproperties/SplineChart.qml @@ -58,8 +58,4 @@ ChartView { XYPoint { x: 4.1; y: 2.3 } onClicked: console.log(name + ".onClicked: " + point.x + ", " + point.y); } - - Component.onCompleted: { - createDefaultAxes(); - } } diff --git a/tests/qmlchartproperties/qml/qmlchartproperties/StackedBarChart.qml b/tests/qmlchartproperties/qml/qmlchartproperties/StackedBarChart.qml index 950ee119..9df3fa35 100644 --- a/tests/qmlchartproperties/qml/qmlchartproperties/StackedBarChart.qml +++ b/tests/qmlchartproperties/qml/qmlchartproperties/StackedBarChart.qml @@ -30,14 +30,10 @@ ChartView { property variant series: mySeries - BarCategoriesAxis { - id: myAxis - categories: ["2007", "2008", "2009", "2010", "2011", "2012" ] - } - StackedBarSeries { id: mySeries name: "bar" + axisX: BarCategoriesAxis { categories: ["2007", "2008", "2009", "2010", "2011", "2012" ] } BarSet { label: "Bob"; values: [2, 2, 3, 4, 5, 6] onClicked: console.log("barset.onClicked: " + index); onHovered: console.log("barset.onHovered: " + status); @@ -64,9 +60,4 @@ ChartView { onLabelsVisibleChanged: console.log("stackedBarSeries.onLabelsVisibleChanged: " + series.labelsVisible); onCountChanged: console.log("stackedBarSeries.onCountChanged: " + count); } - - Component.onCompleted: { - createDefaultAxes(); - setAxisX(myAxis,mySeries); - } } |