diff options
author | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2014-01-09 09:55:52 +0200 |
---|---|---|
committer | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2014-01-09 11:02:27 +0200 |
commit | 450dc3e6d74ffe93a761a5e2491458935ecac7b7 (patch) | |
tree | 99184e6eddb3d8529733de2b273e93b8b96bb73b /tests/qmlmultigraph/qml/qmlmultigraph/main.qml | |
parent | 466c03c4e560b875121090bf883d9aefa9d44616 (diff) |
Make active axes properties in C++
Also provide axis changed signals both C++ and QML.
Some other minor fixes, too.
Task-number: QTRD-2669
Change-Id: Ib797bffd6720382cf26359a9059e1809efdf58da
Reviewed-by: Mika Salmela <mika.salmela@digia.com>
Diffstat (limited to 'tests/qmlmultigraph/qml/qmlmultigraph/main.qml')
-rw-r--r-- | tests/qmlmultigraph/qml/qmlmultigraph/main.qml | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/tests/qmlmultigraph/qml/qmlmultigraph/main.qml b/tests/qmlmultigraph/qml/qmlmultigraph/main.qml index fdc49132..11c4ab2d 100644 --- a/tests/qmlmultigraph/qml/qmlmultigraph/main.qml +++ b/tests/qmlmultigraph/qml/qmlmultigraph/main.qml @@ -43,6 +43,16 @@ Item { valueRole: "expenses" } } + + onRowAxisChanged: { + console.log("Bars: Row axis changed.") + } + onColumnAxisChanged: { + console.log("Bars: column axis changed.") + } + onValueAxisChanged: { + console.log("Bars: Value axis changed.") + } } ListModel { @@ -75,6 +85,16 @@ Item { zPosRole: "zPos" } } + + onAxisXChanged: { + console.log("Scatter: axis X changed.") + } + onAxisYChanged: { + console.log("Scatter: axis Y changed.") + } + onAxisZChanged: { + console.log("Scatter: axis Z changed.") + } } ListModel { @@ -105,6 +125,16 @@ Item { valueRole: "pop_density" } } + + onAxisXChanged: { + console.log("Surface: axis X changed.") + } + onAxisYChanged: { + console.log("Surface: axis Y changed.") + } + onAxisZChanged: { + console.log("Surface: axis Z changed.") + } } ListModel { id: surfaceDataModel @@ -141,6 +171,24 @@ Item { text: "Quit" onClicked: Qt.quit(0); } + + NewButton { + id: resetAxesButton + Layout.fillHeight: true + Layout.fillWidth: true + text: "Reset axes" + onClicked: { + barGraph.rowAxis = null + barGraph.columnAxis = null + barGraph.valueAxis = null + scatterGraph.axisX = null + scatterGraph.axisY = null + scatterGraph.axisZ = null + surfaceGraph.axisX = null + surfaceGraph.axisY = null + surfaceGraph.axisZ = null + } + } } Rectangle { |