summaryrefslogtreecommitdiffstats
path: root/tests/manual/qmlchartproperties/qml/qmlchartproperties/BarEditor.qml
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@theqtcompany.com>2014-11-11 12:17:45 +0200
committerMiikka Heikkinen <miikka.heikkinen@theqtcompany.com>2014-11-11 12:44:27 +0200
commit69f73db4ec09826487454f85670f992cec1af51a (patch)
tree6275e8530475857ba6eec590b250ee320f2a72a5 /tests/manual/qmlchartproperties/qml/qmlchartproperties/BarEditor.qml
parentc6ed50e68438e5558e7cda0e36c194a4b99f7f83 (diff)
Moved manual tests to separate directory.
This allows publishing autotests. Git export attributes changed accordingly. Change-Id: I6db2eb52dabdb8f12e0bc2a992a873abfa15b1a5 Reviewed-by: Titta Heikkala <titta.heikkala@theqtcompany.com>
Diffstat (limited to 'tests/manual/qmlchartproperties/qml/qmlchartproperties/BarEditor.qml')
-rw-r--r--tests/manual/qmlchartproperties/qml/qmlchartproperties/BarEditor.qml199
1 files changed, 199 insertions, 0 deletions
diff --git a/tests/manual/qmlchartproperties/qml/qmlchartproperties/BarEditor.qml b/tests/manual/qmlchartproperties/qml/qmlchartproperties/BarEditor.qml
new file mode 100644
index 00000000..cdd847a5
--- /dev/null
+++ b/tests/manual/qmlchartproperties/qml/qmlchartproperties/BarEditor.qml
@@ -0,0 +1,199 @@
+/****************************************************************************
+**
+** Copyright (C) 2014 Digia Plc
+** All rights reserved.
+** For any questions to Digia, please use contact form at http://qt.digia.com
+**
+** This file is part of the Qt Enterprise Charts Add-on.
+**
+** $QT_BEGIN_LICENSE$
+** Licensees holding valid Qt Enterprise licenses may use this file in
+** accordance with the Qt Enterprise License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia.
+**
+** If you have questions regarding the use of this file, please use
+** contact form at http://qt.digia.com
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+
+Row {
+ anchors.fill: parent
+ spacing: 5
+ property variant series
+
+ // buttons for selecting the edited object: series, barset or label
+ Flow {
+ spacing: 5
+ flow: Flow.TopToBottom
+ Button {
+ id: seriesButton
+ text: "series"
+ unpressedColor: "#79bd8f"
+ onClicked: {
+ seriesFlow.visible = true;
+ setFlow.visible = false;
+ labelsFlow.visible = false;
+ color = "#00a388";
+ setButton.color = "#79bd8f";
+ labelButton.color = "#79bd8f";
+ }
+ }
+ Button {
+ id: setButton
+ text: "BarSet"
+ unpressedColor: "#79bd8f"
+ onClicked: {
+ seriesFlow.visible = false;
+ setFlow.visible = true;
+ labelsFlow.visible = false;
+ color = "#00a388";
+ seriesButton.color = "#79bd8f";
+ labelButton.color = "#79bd8f";
+ }
+ }
+ Button {
+ id: labelButton
+ text: "label"
+ unpressedColor: "#79bd8f"
+ onClicked: {
+ seriesFlow.visible = false;
+ setFlow.visible = false;
+ labelsFlow.visible = true;
+ color = "#00a388";
+ seriesButton.color = "#79bd8f";
+ setButton.color = "#79bd8f";
+ }
+ }
+ }
+
+ // Buttons for editing series
+ Flow {
+ id: seriesFlow
+ spacing: 5
+ flow: Flow.TopToBottom
+ visible: false
+
+ Button {
+ text: "visible"
+ onClicked: series.visible = !series.visible;
+ }
+ Button {
+ text: "opacity +"
+ onClicked: series.opacity += 0.1;
+ }
+ Button {
+ text: "opacity -"
+ onClicked: series.opacity -= 0.1;
+ }
+ Button {
+ text: "bar width +"
+ onClicked: series.barWidth += 0.1;
+ }
+ Button {
+ text: "bar width -"
+ onClicked: series.barWidth -= 0.1;
+ }
+ }
+
+ // Buttons for editing sets
+ Flow {
+ id: setFlow
+ spacing: 5
+ flow: Flow.TopToBottom
+ visible: false
+
+ Button {
+ text: "append set"
+ onClicked: {
+ var count = series.count;
+ series.append("set" + count, [0, 0.1 * count, 0.2 * count, 0.3 * count, 0.4 * count, 0.5 * count, 0.6 * count]);
+ }
+ }
+ Button {
+ text: "insert set"
+ onClicked: {
+ var count = series.count;
+ series.insert(count - 1, "set" + count, [0, 0.1 * count, 0.2 * count, 0.3 * count, 0.4 * count, 0.5 * count, 0.6 * count]);
+ }
+ }
+ Button {
+ text: "remove set"
+ onClicked: series.remove(series.at(series.count - 1));
+ }
+ Button {
+ text: "clear sets"
+ onClicked: series.clear();
+ }
+
+ Button {
+ text: "set 1 append"
+ onClicked: series.at(0).append(series.at(0).count + 1);
+ }
+ Button {
+ text: "set 1 replace"
+ onClicked: series.at(0).replace(series.at(0).count - 1, series.at(0).at(series.at(0).count - 1) + 1.5);
+ }
+ Button {
+ text: "set 1 remove"
+ onClicked: series.at(0).remove(series.at(0).count - 1);
+ }
+
+ Button {
+ text: "set 1 color"
+ onClicked: series.at(0).color = main.nextColor();
+ }
+ Button {
+ text: "set 1 border color"
+ onClicked: series.at(0).borderColor = main.nextColor();
+ }
+ Button {
+ text: "set 1 borderWidth +"
+ onClicked: series.at(0).borderWidth += 0.5;
+ }
+ Button {
+ text: "set 1 borderWidth -"
+ onClicked: series.at(0).borderWidth -= 0.5;
+ }
+ }
+
+
+ Flow {
+ id: labelsFlow
+ spacing: 5
+ flow: Flow.TopToBottom
+ visible: false
+
+ Button {
+ text: "labels visible"
+ onClicked: series.labelsVisible = !series.labelsVisible;
+ }
+ Button {
+ text: "labels format"
+ onClicked: {
+ if (series.labelsFormat === "@value")
+ series.labelsFormat = "@value%"
+ else
+ series.labelsFormat = "@value"
+ }
+ }
+ Button {
+ text: "labels position"
+ onClicked: series.changeLabelsPosition();
+ }
+ Button {
+ text: "set 1 label color"
+ onClicked: series.at(0).labelColor = main.nextColor();
+ }
+ FontEditor {
+ id: fontEditor
+ fontDescription: "label"
+ function editedFont() {
+ return series.at(0).labelFont;
+ }
+ }
+ }
+}