diff options
Diffstat (limited to 'tests/quick2chartproperties/qml')
27 files changed, 0 insertions, 2694 deletions
diff --git a/tests/quick2chartproperties/qml/quick2chartproperties/AreaChart.qml b/tests/quick2chartproperties/qml/quick2chartproperties/AreaChart.qml deleted file mode 100644 index c942b288..00000000 --- a/tests/quick2chartproperties/qml/quick2chartproperties/AreaChart.qml +++ /dev/null @@ -1,111 +0,0 @@ -/**************************************************************************** -** -** 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 -import QtCommercial.Chart 1.4 - -ChartView { - title: "area series" - anchors.fill: parent - animationOptions: ChartView.SeriesAnimations - - property variant series: areaSeries - - AreaSeries { - id: areaSeries - name: "area 1" - - upperSeries: LineSeries { - XYPoint { x: 0; y: 1 } - XYPoint { x: 1; y: 1 } - XYPoint { x: 2; y: 3 } - XYPoint { x: 3; y: 3 } - XYPoint { x: 4; y: 2 } - XYPoint { x: 5; y: 0 } - XYPoint { x: 6; y: 2 } - XYPoint { x: 7; y: 1 } - XYPoint { x: 8; y: 2 } - XYPoint { x: 9; y: 1 } - 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 } - } - - pointLabelsFormat: "@xPoint, @yPoint"; - - onNameChanged: console.log(name + ".onNameChanged: " + name); - onVisibleChanged: console.log(name + ".onVisibleChanged: " + visible); - onOpacityChanged: console.log(name + ".onOpacityChanged: " + opacity); - onClicked: console.log(name + ".onClicked: " + point.x + ", " + point.y); - onSelected: console.log(name + ".onSelected"); - onColorChanged: console.log(name + ".onColorChanged: " + color); - onBorderColorChanged: console.log(name + ".onBorderColorChanged: " + borderColor); - onBorderWidthChanged: console.log(name + ".onBorderChanged: " + borderWidth); -// onCountChanged: console.log(name + ".onCountChanged: " + count); - onHovered: console.log("lineSeries.onHovered:" + point.x + "," + point.y + " " + state); - onPointLabelsVisibilityChanged: console.log(name + ".onPointLabelsVisibilityChanged: " - + visible); - onPointLabelsFormatChanged: console.log(name + ".onPointLabelsFormatChanged: " - + format); - onPointLabelsFontChanged: console.log(name + ".onPointLabelsFontChanged: " - + font.family); - onPointLabelsColorChanged: console.log(name + ".onPointLabelsColorChanged: " - + color); - } - - AreaSeries { - name: "area 2" - - upperSeries: LineSeries { - XYPoint { x: 0; y: 0.5 } - XYPoint { x: 1; y: 1.5 } - XYPoint { x: 2; y: 0.3 } - XYPoint { x: 3; y: 1.5 } - XYPoint { x: 4; y: 0.1 } - XYPoint { x: 5; y: 0.3 } - XYPoint { x: 6; y: 1.2 } - XYPoint { x: 7; y: 1.3 } - XYPoint { x: 8; y: 0.2 } - XYPoint { x: 9; y: 0.1 } - XYPoint { x: 10; y: 3.2 } - XYPoint { x: 11; y: 4.6 } - } - - onNameChanged: console.log(name + ".onNameChanged: " + name); - onVisibleChanged: console.log(name + ".onVisibleChanged: " + visible); - onClicked: console.log(name + ".onClicked: " + point.x + ", " + point.y); - onSelected: console.log(name + ".onSelected"); - onColorChanged: console.log(name + ".onColorChanged: " + color); - onBorderColorChanged: console.log(name + ".onBorderColorChanged: " + borderColor); - } -} diff --git a/tests/quick2chartproperties/qml/quick2chartproperties/AreaEditor.qml b/tests/quick2chartproperties/qml/quick2chartproperties/AreaEditor.qml deleted file mode 100644 index 168dc957..00000000 --- a/tests/quick2chartproperties/qml/quick2chartproperties/AreaEditor.qml +++ /dev/null @@ -1,111 +0,0 @@ -/**************************************************************************** -** -** 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 - -Flow { - id: flow - spacing: 5 - flow: Flow.TopToBottom - property variant series - - 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: "color" - onClicked: series.color = main.nextColor(); - } - Button { - text: "borderColor" - onClicked: series.borderColor = main.nextColor(); - } - Button { - text: series != undefined ? "borderWidth + (" + series.borderWidth + ")" : "" - onClicked: series.borderWidth += 0.5; - } - Button { - text: series != undefined ? "borderWidth - (" + series.borderWidth + ")" : "" - onClicked: series.borderWidth -= 0.5; - } - Button { - text: "point labels visible" - onClicked: series.pointLabelsVisible = !series.pointLabelsVisible; - } - Button { - text: "point labels format" - onClicked: { - if (series.pointLabelsFormat === "@xPoint, @yPoint") - series.pointLabelsFormat = "(@xPoint)" - else - series.pointLabelsFormat = "@xPoint, @yPoint" - } - } - Button { - text: "point labels font" - onClicked: { - if (series.pointLabelsFont.family === "Times") - series.pointLabelsFont.family = "Courier"; - else - series.pointLabelsFont.family = "Times"; - } - } - Button { - text: "point labels color" - onClicked: series.pointLabelsColor = main.nextColor(); - } - Button { - id: upperButton - text: "upper series" - unpressedColor: "#79bd8f" - onClicked: { - lineEditor.visible = true; - color = "#00a388"; - lowerButton.color = "#79bd8f"; - lineEditor.series = series.upperSeries; - } - } - Button { - id: lowerButton - text: "lower series" - unpressedColor: "#79bd8f" - onClicked: { - lineEditor.visible = true; - color = "#00a388"; - upperButton.color = "#79bd8f"; - lineEditor.series = series.lowerSeries; - } - } - LineEditor { - id: lineEditor - visible: false - } - - onSeriesChanged: lineEditor.series = series.upperSeries; -} diff --git a/tests/quick2chartproperties/qml/quick2chartproperties/BarChart.qml b/tests/quick2chartproperties/qml/quick2chartproperties/BarChart.qml deleted file mode 100644 index 8a91cdb8..00000000 --- a/tests/quick2chartproperties/qml/quick2chartproperties/BarChart.qml +++ /dev/null @@ -1,76 +0,0 @@ -/**************************************************************************** -** -** 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 -import QtCommercial.Chart 1.4 - -ChartView { - title: "Bar series" - anchors.fill: parent - theme: ChartView.ChartThemeLight - legend.alignment: Qt.AlignBottom - animationOptions: ChartView.SeriesAnimations - - property variant series: mySeries - - - BarSeries { - id: mySeries - name: "bar" - labelsFormat: "@value"; - axisX: BarCategoryAxis { 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 + " " + index); - onPenChanged: console.log("barset.onPenChanged: " + pen); - onBrushChanged: console.log("barset.onBrushChanged: " + brush); - onLabelChanged: console.log("barset.onLabelChanged: " + label); - onLabelBrushChanged: console.log("barset.onLabelBrushChanged: " + labelBrush); - onLabelFontChanged: console.log("barset.onLabelFontChanged: " + labelFont); - onColorChanged: console.log("barset.onColorChanged: " + color); - onBorderColorChanged: console.log("barset.onBorderColorChanged: " + color); - onLabelColorChanged: console.log("barset.onLabelColorChanged: " + color); - onCountChanged: console.log("barset.onCountChanged: " + count); - onValuesAdded: console.log("barset.onValuesAdded: " + index + ", " + count); - onValuesRemoved: console.log("barset.onValuesRemoved: " + index + ", " + count); - onValueChanged: console.log("barset.onValuesChanged: " + index); - } - BarSet { label: "Susan"; values: [5, 1, 2, 4, 1, 7] } - BarSet { label: "James"; values: [3, 5, 8, 13, 5, 8] } - - onNameChanged: console.log("barSeries.onNameChanged: " + series.name); - onVisibleChanged: console.log("barSeries.onVisibleChanged: " + series.visible); - onOpacityChanged: console.log("barSeries.onOpacityChanged: " + opacity); - onClicked: console.log("barSeries.onClicked: " + barset + " " + index); - onHovered: console.log("barSeries.onHovered: " + barset + " " + status - + " " + index); - onLabelsVisibleChanged: console.log("barSeries.onLabelsVisibleChanged: " + series.labelsVisible); - onCountChanged: console.log("barSeries.onCountChanged: " + count); - onLabelsFormatChanged: console.log("barSeries.onLabelsFormatChanged: " + format); - onLabelsPositionChanged: console.log("barSeries.onLabelsPositionChanged: " + series.labelsPosition); - - function changeLabelsPosition() { - if (labelsPosition === BarSeries.LabelsCenter) - labelsPosition = BarSeries.LabelsInsideEnd; - else - labelsPosition = BarSeries.LabelsCenter; - } - } -} diff --git a/tests/quick2chartproperties/qml/quick2chartproperties/BarEditor.qml b/tests/quick2chartproperties/qml/quick2chartproperties/BarEditor.qml deleted file mode 100644 index cdd847a5..00000000 --- a/tests/quick2chartproperties/qml/quick2chartproperties/BarEditor.qml +++ /dev/null @@ -1,199 +0,0 @@ -/**************************************************************************** -** -** 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; - } - } - } -} diff --git a/tests/quick2chartproperties/qml/quick2chartproperties/Button.qml b/tests/quick2chartproperties/qml/quick2chartproperties/Button.qml deleted file mode 100644 index 61df081d..00000000 --- a/tests/quick2chartproperties/qml/quick2chartproperties/Button.qml +++ /dev/null @@ -1,70 +0,0 @@ -/**************************************************************************** -** -** 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 - -Rectangle { - id: button - height: 25 - width: 140 - color: unpressedColor - radius: 5 - property color unpressedColor: "#afafaf" - - property string text: "button" - signal clicked - - Text { - id: buttonText - anchors.centerIn: parent - text: button.text - } - - MouseArea { - anchors.fill: parent - onClicked: { - button.clicked(); - } - onPressedChanged: { - if (pressed) { - button.color = "#efefef"; - } else { - button.color = unpressedColor; - } - } - onPressAndHold: { - repeatTimer.start(); - } - onReleased: { - repeatTimer.stop(); - } - } - - Timer { - id: repeatTimer - interval: 140 - repeat: true - triggeredOnStart: false - running: false - onTriggered: { - button.clicked(); - } - } -} diff --git a/tests/quick2chartproperties/qml/quick2chartproperties/Chart.qml b/tests/quick2chartproperties/qml/quick2chartproperties/Chart.qml deleted file mode 100644 index 3183c57f..00000000 --- a/tests/quick2chartproperties/qml/quick2chartproperties/Chart.qml +++ /dev/null @@ -1,110 +0,0 @@ -/**************************************************************************** -** -** 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 -import QtCommercial.Chart 1.3 - -ChartView { - id: chartView - title: "Chart Title" - anchors.fill: parent - property variant chart: chartView - - LineSeries { - name: "line" - XYPoint { x: 0; y: 0 } - XYPoint { x: 1.1; y: 2.1 } - XYPoint { x: 1.9; y: 3.3 } - XYPoint { x: 2.1; y: 2.1 } - XYPoint { x: 2.9; y: 4.9 } - XYPoint { x: 3.4; y: 3.0 } - XYPoint { x: 4.1; y: 3.3 } - } - - onVisibleChanged: console.log("chart.onVisibleChanged: " + visible); - onTitleColorChanged: console.log("chart.onTitleColorChanged: " + color); - onBackgroundColorChanged: console.log("chart.onBackgroundColorChanged: " + chart.backgroundColor); - onDropShadowEnabledChanged: console.log("chart.onDropShadowEnabledChanged: " + enabled); - onBackgroundRoundnessChanged: console.log("chart.onBackgroundRoundnessChanged: " + diameter); - onSeriesAdded: console.log("chart.onSeriesAdded: " + series.name); - onSeriesRemoved: console.log("chart.onSeriesRemoved: " + series.name); - onPlotAreaColorChanged: console.log("chart.plotAreaColorChanged: " + chart.plotAreaColor); - - legend.onVisibleChanged: console.log("legend.onVisibleChanged: " + chart.legend.visible); - legend.onBackgroundVisibleChanged: console.log("legend.onBackgroundVisibleChanged: " + visible); - legend.onColorChanged: console.log("legend.onColorChanged: " + color); - legend.onBorderColorChanged: console.log("legend.onBorderColorChanged: " + color); - legend.onLabelColorChanged: console.log("legend.onLabelColorChanged: " + color); - legend.onReverseMarkersChanged: console.log("legend.onReverseMarkersChanged: " - + chart.legend.reverseMarkers) - margins.onTopChanged: console.log("chart.margins.onTopChanged: " + top ); - margins.onBottomChanged: console.log("chart.margins.onBottomChanged: " + bottom); - margins.onLeftChanged: console.log("chart.margins.onLeftChanged: " + left); - margins.onRightChanged: console.log("chart.margins.onRightChanged: " + right); - onPlotAreaChanged: { - console.log("chart.onPlotAreaChanged, width: " + chartView.plotArea.width - + " height: " + chartView.plotArea.height - + " y: " + chartView.plotArea.y - + " x: " + chartView.plotArea.x); - marginVisualizer.opacity = 1.0; - } - - ValueAxis{ - onColorChanged: console.log("axisX.onColorChanged: " + color); - onLabelsVisibleChanged: console.log("axisX.onLabelsVisibleChanged: " + visible); - onLabelsColorChanged: console.log("axisX.onLabelsColorChanged: " + color); - onVisibleChanged: console.log("axisX.onVisibleChanged: " + visible); - onGridVisibleChanged: console.log("axisX.onGridVisibleChanged: " + visible); - onShadesVisibleChanged: console.log("axisX.onShadesVisibleChanged: " + visible); - onShadesColorChanged: console.log("axisX.onShadesColorChanged: " + color); - onShadesBorderColorChanged: console.log("axisX.onShadesBorderColorChanged: " + color); - onMinChanged: console.log("axisX.onMinChanged: " + min); - onMaxChanged: console.log("axisX.onMaxChanged: " + max); - } - - ValueAxis{ - onColorChanged: console.log("axisY.onColorChanged: " + color); - onLabelsVisibleChanged: console.log("axisY.onLabelsVisibleChanged: " + visible); - onLabelsColorChanged: console.log("axisY.onLabelsColorChanged: " + color); - onVisibleChanged: console.log("axisY.onVisibleChanged: " + visible); - onGridVisibleChanged: console.log("axisY.onGridVisibleChanged: " + visible); - onShadesVisibleChanged: console.log("axisY.onShadesVisibleChanged: " + visible); - onShadesColorChanged: console.log("axisY.onShadesColorChanged: " + color); - onShadesBorderColorChanged: console.log("axisY.onShadesBorderColorChanged: " + color); - onMinChanged: console.log("axisY.onMinChanged: " + min); - onMaxChanged: console.log("axisY.onMaxChanged: " + max); - } - - Rectangle { - id: marginVisualizer - color: "transparent" - border.color: "red" - anchors.fill: parent - anchors.topMargin: chartView.minimumMargins.top - anchors.bottomMargin: chartView.minimumMargins.bottom - anchors.leftMargin: chartView.minimumMargins.left - anchors.rightMargin: chartView.minimumMargins.right - opacity: 0.0 - onOpacityChanged: if (opacity > 0.9) opacity = 0.0; - Behavior on opacity { - NumberAnimation { duration: 800 } - } - } -} diff --git a/tests/quick2chartproperties/qml/quick2chartproperties/ChartEditor.qml b/tests/quick2chartproperties/qml/quick2chartproperties/ChartEditor.qml deleted file mode 100644 index 87139f35..00000000 --- a/tests/quick2chartproperties/qml/quick2chartproperties/ChartEditor.qml +++ /dev/null @@ -1,119 +0,0 @@ -/**************************************************************************** -** -** 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 - -Item { - id: chartEditor - property variant chart - onChartChanged: { - if (loader.item != undefined) - loader.item.chart = chart; - } - - function selectButton(button) { - chartButton.color = "#79bd8f"; - titleButton.color = "#79bd8f"; - legendButton.color = "#79bd8f"; - axisXButton.color = "#79bd8f"; - axisYButton.color = "#79bd8f"; - seriesButton.color = "#79bd8f"; - button.color = "#00a388"; - } - - Flow { - id: selectorFlow - anchors.top: parent.top - height: 90 - anchors.left: parent.left - anchors.right: parent.right - spacing: 5 - flow: Flow.TopToBottom - - Button { - id: chartButton - text: "Chart properties" - unpressedColor: "#79bd8f" - onClicked: { - selectButton(chartButton); - loader.source = "ChartEditorProperties.qml"; - loader.item.chart = chart; - } - } - Button { - id: titleButton - text: "Title properties" - unpressedColor: "#79bd8f" - onClicked: { - selectButton(titleButton); - loader.source = "ChartEditorTitle.qml"; - loader.item.chart = chart; - } - } - Button { - id: legendButton - text: "Legend properties" - unpressedColor: "#79bd8f" - onClicked: { - selectButton(legendButton); - loader.source = "ChartEditorLegend.qml"; - loader.item.chartLegend = chart.legend; - } - } - Button { - id: axisXButton - text: "Axis X properties" - unpressedColor: "#79bd8f" - onClicked: { - selectButton(axisXButton); - loader.source = "ChartEditorAxis.qml"; - loader.item.axis = chart.axisX(); - } - } - Button { - id: axisYButton - text: "Axis Y properties" - unpressedColor: "#79bd8f" - onClicked: { - selectButton(axisYButton); - loader.source = "ChartEditorAxis.qml"; - loader.item.axis = chart.axisY(); - } - } - Button { - id: seriesButton - text: "Series" - unpressedColor: "#79bd8f" - onClicked: { - selectButton(seriesButton); - loader.source = "ChartEditorSeries.qml"; - loader.item.chart = chart; - } - } - } - - Loader { - id: loader - anchors.top: selectorFlow.bottom - anchors.bottom: parent.bottom - anchors.left: parent.left - anchors.right: parent.right - } -} diff --git a/tests/quick2chartproperties/qml/quick2chartproperties/ChartEditorAxis.qml b/tests/quick2chartproperties/qml/quick2chartproperties/ChartEditorAxis.qml deleted file mode 100644 index 0c6d8dce..00000000 --- a/tests/quick2chartproperties/qml/quick2chartproperties/ChartEditorAxis.qml +++ /dev/null @@ -1,131 +0,0 @@ -/**************************************************************************** -** -** 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 axis - - Flow { - spacing: 5 - flow: Flow.TopToBottom - height: parent.height - - Button { - text: "axis visible" - onClicked: axis.visible = !axis.visible; - } - Button { - text: "axis line visible" - onClicked: axis.lineVisible = !axis.lineVisible; - } - Button { - text: "axis color" - onClicked: axis.color = main.nextColor(); - } - Button { - text: "axis labels visible" - onClicked: axis.labelsVisible = !axis.labelsVisible; - } - Button { - text: "axis labels angle +" - onClicked: axis.labelsAngle += 5; - } - Button { - text: "axis labels angle -" - onClicked: axis.labelsAngle -= 5; - } - Button { - text: "axis labels color" - onClicked: axis.labelsColor = main.nextColor(); - } - Button { - text: "axis grid visible" - onClicked: axis.gridVisible = !axis.gridVisible; - } - Button { - text: "axis shades visible" - onClicked: axis.shadesVisible = !axis.shadesVisible; - } - Button { - text: "axis shades color" - onClicked: axis.shadesColor = main.nextColor(); - } - Button { - text: "axis shades bcolor" - onClicked: axis.shadesBorderColor = main.nextColor(); - } - Button { - text: "axis title text" - onClicked: axis.titleText = axis.titleText + "X"; - } - Button { - text: "axis title visible" - onClicked: axis.titleVisible = !axis.titleVisible; - } - Button { - text: "axis max +" - onClicked: axis.max += 0.1; - } - Button { - text: "axis max -" - onClicked: axis.max -= 0.1; - } - Button { - text: "axis min +" - onClicked: axis.min += 0.1; - } - Button { - text: "axis min -" - onClicked: axis.min -= 0.1; - } - Button { - text: "axis tick count +" - onClicked: axis.tickCount++; - } - Button { - text: "axis tick count -" - - onClicked: axis.tickCount--; - } - Button { - text: "axis nice nmb" - onClicked: axis.niceNumbersEnabled = !axis.niceNumbersEnabled; - } - - FontEditor { - id: fontEditor - fontDescription: "axis" - function editedFont() { - return axis.labelsFont; - } - } - - FontEditor { - id: titleFontEditor - fontDescription: "title" - function editedFont() { - return axis.titleFont; - } - } - } -} diff --git a/tests/quick2chartproperties/qml/quick2chartproperties/ChartEditorLegend.qml b/tests/quick2chartproperties/qml/quick2chartproperties/ChartEditorLegend.qml deleted file mode 100644 index 24ffd9ef..00000000 --- a/tests/quick2chartproperties/qml/quick2chartproperties/ChartEditorLegend.qml +++ /dev/null @@ -1,80 +0,0 @@ -/**************************************************************************** -** -** 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 chartLegend - - Flow { - spacing: 5 - flow: Flow.TopToBottom - - Button { - text: "legend visible" - onClicked: chartLegend.visible = !chartLegend.visible; - } - Button { - text: "legend bckgrd visible" - onClicked: chartLegend.backgroundVisible = !chartLegend.backgroundVisible; - } - Button { - text: "legend color" - onClicked: chartLegend.color = main.nextColor(); - } - Button { - text: "legend border color" - onClicked: chartLegend.borderColor = main.nextColor(); - } - Button { - text: "legend label color" - onClicked: chartLegend.labelColor = main.nextColor(); - } - Button { - text: "legend top" - onClicked: chartLegend.alignment = Qt.AlignTop; - } - Button { - text: "legend bottom" - onClicked: chartLegend.alignment = Qt.AlignBottom; - } - Button { - text: "legend left" - onClicked: chartLegend.alignment = Qt.AlignLeft; - } - Button { - text: "legend right" - onClicked: chartLegend.alignment = Qt.AlignRight; - } - Button { - text: "legend use reverse order" - onClicked: chartLegend.reverseMarkers = !chartLegend.reverseMarkers; - } - } - - FontEditor { - fontDescription: "legend" - function editedFont() { - return chartLegend.font; - } - } -} diff --git a/tests/quick2chartproperties/qml/quick2chartproperties/ChartEditorProperties.qml b/tests/quick2chartproperties/qml/quick2chartproperties/ChartEditorProperties.qml deleted file mode 100644 index d172e4d8..00000000 --- a/tests/quick2chartproperties/qml/quick2chartproperties/ChartEditorProperties.qml +++ /dev/null @@ -1,124 +0,0 @@ -/**************************************************************************** -** -** 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 - -Flow { - anchors.fill: parent - property variant chart - flow: Flow.TopToBottom - spacing: 5 - Button { - text: "visible" - onClicked: chart.visible = !chart.visible; - } - Button { - text: "theme +" - onClicked: chart.theme++; - } - Button { - text: "theme -" - onClicked: chart.theme--; - } - Button { - text: "animation opt +" - onClicked: chart.animationOptions++; - } - Button { - text: "animation opt -" - onClicked: chart.animationOptions--; - } - Button { - text: "background color" - onClicked: chart.backgroundColor = main.nextColor(); - } - Button { - text: "plot area color" - onClicked: chart.plotAreaColor = main.nextColor(); - } - Button { - text: "drop shadow enabled" - onClicked: chart.dropShadowEnabled = !chart.dropShadowEnabled; - } - Button { - text: "roundness" - onClicked: chart.backgroundRoundness++; - } - Button { - text: "zoom +" - onClicked: chart.zoom(2); - } - Button { - text: "zoom -" - onClicked: chart.zoom(0.5); - } - Button { - text: "scroll left" - onClicked: chart.scrollLeft(10); - } - Button { - text: "scroll right" - onClicked: chart.scrollRight(10); - } - Button { - text: "scroll up" - onClicked: chart.scrollUp(10); - } - Button { - text: "scroll down" - onClicked: chart.scrollDown(10); - } - Button { - text: "title color" - onClicked: chart.titleColor = main.nextColor(); - } - Button { - text: "top margin +" - onClicked: chart.margins.top += 5; - } - Button { - text: "top margin -" - onClicked: chart.margins.top -= 5; - } - Button { - text: "bottom margin +" - onClicked: chart.margins.bottom += 5; - } - Button { - text: "bottom margin -" - onClicked: chart.margins.bottom -= 5; - } - Button { - text: "left margin +" - onClicked: chart.margins.left += 5; - } - Button { - text: "left margin -" - onClicked: chart.margins.left -= 5; - } - Button { - text: "right margin +" - onClicked: chart.margins.right += 5; - } - Button { - text: "right margin -" - onClicked: chart.margins.right -= 5; - } -} diff --git a/tests/quick2chartproperties/qml/quick2chartproperties/ChartEditorSeries.qml b/tests/quick2chartproperties/qml/quick2chartproperties/ChartEditorSeries.qml deleted file mode 100644 index 06b8618b..00000000 --- a/tests/quick2chartproperties/qml/quick2chartproperties/ChartEditorSeries.qml +++ /dev/null @@ -1,64 +0,0 @@ -/**************************************************************************** -** -** 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 -import QtCommercial.Chart 1.1 - -Flow { - anchors.fill: parent - property variant chart - flow: Flow.TopToBottom - spacing: 5 - - Button { - text: "add line" - onClicked: addXYSeries(ChartView.SeriesTypeLine, "line"); - } - Button { - text: "add spline" - onClicked: addXYSeries(ChartView.SeriesTypeSpline, "spline"); - } - Button { - text: "add scatter" - onClicked: addXYSeries(ChartView.SeriesTypeScatter, "scatter"); - } - Button { - text: "remove last" - onClicked: { - if (chart.count > 0) - chart.removeSeries(chart.series(chart.count - 1)); - else - chart.removeSeries(0); - } - } - Button { - text: "remove all" - onClicked: chart.removeAllSeries(); - } - - function addXYSeries(type, name) { - var series = chart.createSeries(type, name + " " + chart.count); - for (var i = chart.axisX().min; i < chart.axisX().max; i++) { - var y = Math.random() * (chart.axisY().max - chart.axisY().min) + chart.axisY().min; - var x = Math.random() + i; - series.append(x, y); - } - } -} diff --git a/tests/quick2chartproperties/qml/quick2chartproperties/ChartEditorTitle.qml b/tests/quick2chartproperties/qml/quick2chartproperties/ChartEditorTitle.qml deleted file mode 100644 index 61b4365f..00000000 --- a/tests/quick2chartproperties/qml/quick2chartproperties/ChartEditorTitle.qml +++ /dev/null @@ -1,35 +0,0 @@ -/**************************************************************************** -** -** 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 - -Flow { - property variant chart - anchors.fill: parent - flow: Flow.TopToBottom - spacing: 5 - - FontEditor { - fontDescription: "title" - function editedFont() { - return chart.titleFont; - } - } -} diff --git a/tests/quick2chartproperties/qml/quick2chartproperties/FontEditor.qml b/tests/quick2chartproperties/qml/quick2chartproperties/FontEditor.qml deleted file mode 100644 index 3531597f..00000000 --- a/tests/quick2chartproperties/qml/quick2chartproperties/FontEditor.qml +++ /dev/null @@ -1,92 +0,0 @@ -/**************************************************************************** -** -** 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 - -Flow { - flow: Flow.TopToBottom - spacing: 5 - property string fontDescription: "" - - Button { - text: fontDescription + " bold" - onClicked: editedFont().bold = !editedFont().bold; - } - Button { - text: fontDescription + " capitalization" - onClicked: editedFont().capitalization++; - } - Button { - text: fontDescription + " font family" - onClicked: editedFont().family = "courier"; - } - Button { - text: fontDescription + " font italic" - onClicked: editedFont().italic = !editedFont().italic; - } - Button { - text: fontDescription + " letterSpacing +" - onClicked: editedFont().letterSpacing++; - } - Button { - text: fontDescription + " letterSpacing -" - onClicked: editedFont().letterSpacing--; - } - Button { - text: fontDescription + " pixelSize +" - onClicked: editedFont().pixelSize++; - } - Button { - text: fontDescription + " pixelSize -" - onClicked: editedFont().pixelSize--; - } - Button { - text: fontDescription + " pointSize +" - onClicked: editedFont().pointSize++; - } - Button { - text: fontDescription + " pointSize -" - onClicked: editedFont().pointSize--; - } - Button { - text: fontDescription + " strikeout" - onClicked: editedFont().strikeout = !editedFont().strikeout; - } - Button { - text: fontDescription + " underline" - onClicked: editedFont().underline = !editedFont().underline; - } - Button { - text: fontDescription + " weight +" - onClicked: editedFont().weight++; - } - Button { - text: fontDescription + " weight -" - onClicked: editedFont().weight--; - } - Button { - text: fontDescription + " wordSpacing +" - onClicked: editedFont().wordSpacing++; - } - Button { - text: fontDescription + " wordSpacing -" - onClicked: editedFont().wordSpacing--; - } -} diff --git a/tests/quick2chartproperties/qml/quick2chartproperties/HorizontalBarChart.qml b/tests/quick2chartproperties/qml/quick2chartproperties/HorizontalBarChart.qml deleted file mode 100644 index 342995cf..00000000 --- a/tests/quick2chartproperties/qml/quick2chartproperties/HorizontalBarChart.qml +++ /dev/null @@ -1,77 +0,0 @@ -/**************************************************************************** -** -** 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 -import QtCommercial.Chart 1.4 - -ChartView { - title: "Bar series" - anchors.fill: parent - theme: ChartView.ChartThemeLight - legend.alignment: Qt.AlignBottom - animationOptions: ChartView.SeriesAnimations - - property variant series: mySeries - - HorizontalBarSeries { - id: mySeries - name: "bar" - labelsFormat: "@value"; - axisY: BarCategoryAxis { 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 + " " + index); - onPenChanged: console.log("barset.onPenChanged: " + pen); - onBrushChanged: console.log("barset.onBrushChanged: " + brush); - onLabelChanged: console.log("barset.onLabelChanged: " + label); - onLabelBrushChanged: console.log("barset.onLabelBrushChanged: " + labelBrush); - onLabelFontChanged: console.log("barset.onLabelFontChanged: " + labelFont); - onColorChanged: console.log("barset.onColorChanged: " + color); - onBorderColorChanged: console.log("barset.onBorderColorChanged: " + color); - onLabelColorChanged: console.log("barset.onLabelColorChanged: " + color); - onCountChanged: console.log("barset.onCountChanged: " + count); - onValuesAdded: console.log("barset.onValuesAdded: " + index + ", " + count); - onValuesRemoved: console.log("barset.onValuesRemoved: " + index + ", " + count); - onValueChanged: console.log("barset.onValuesChanged: " + index); - } - BarSet { label: "Susan"; values: [5, 1, 2, 4, 1, 7] } - BarSet { label: "James"; values: [3, 5, 8, 13, 5, 8] } - - onNameChanged: console.log("horizontalBarSeries.onNameChanged: " + series.name); - onVisibleChanged: console.log("horizontalBarSeries.onVisibleChanged: " + series.visible); - onOpacityChanged: console.log("horizontalBarSeries.onOpacityChanged: " + opacity); - onClicked: console.log("horizontalBarSeries.onClicked: " + barset + " " + index); - onHovered: console.log("horizontalBarSeries.onHovered: " + barset + " " - + status + " " + index); - onLabelsVisibleChanged: console.log("horizontalBarSeries.onLabelsVisibleChanged: " + series.labelsVisible); - onCountChanged: console.log("horizontalBarSeries.onCountChanged: " + count); - onLabelsFormatChanged: console.log("horizontalBarSeries.onLabelsFormatChanged: " - + format); - onLabelsPositionChanged: console.log("horizontalBarSeries.onLabelsPositionChanged: " - + series.labelsPosition); - - function changeLabelsPosition() { - if (labelsPosition === BarSeries.LabelsCenter) - labelsPosition = BarSeries.LabelsInsideEnd; - else - labelsPosition = BarSeries.LabelsCenter; - } - } -} diff --git a/tests/quick2chartproperties/qml/quick2chartproperties/HorizontalPercentBarChart.qml b/tests/quick2chartproperties/qml/quick2chartproperties/HorizontalPercentBarChart.qml deleted file mode 100644 index 0ef7e17a..00000000 --- a/tests/quick2chartproperties/qml/quick2chartproperties/HorizontalPercentBarChart.qml +++ /dev/null @@ -1,79 +0,0 @@ -/**************************************************************************** -** -** 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 -import QtCommercial.Chart 1.4 - -ChartView { - title: "Percent bar series" - anchors.fill: parent - theme: ChartView.ChartThemeLight - legend.alignment: Qt.AlignBottom - animationOptions: ChartView.SeriesAnimations - - property variant series: mySeries - - HorizontalPercentBarSeries { - id: mySeries - name: "bar" - labelsFormat: "@value"; - axisY: BarCategoryAxis { 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 + " " + index); - onPenChanged: console.log("barset.onPenChanged: " + pen); - onBrushChanged: console.log("barset.onBrushChanged: " + brush); - onLabelChanged: console.log("barset.onLabelChanged: " + label); - onLabelBrushChanged: console.log("barset.onLabelBrushChanged: " + labelBrush); - onLabelFontChanged: console.log("barset.onLabelFontChanged: " + labelFont); - onColorChanged: console.log("barset.onColorChanged: " + color); - onBorderColorChanged: console.log("barset.onBorderColorChanged: " + color); - onLabelColorChanged: console.log("barset.onLabelColorChanged: " + color); - onCountChanged: console.log("barset.onCountChanged: " + count); - onValuesAdded: console.log("barset.onValuesAdded: " + index + ", " + count); - onValuesRemoved: console.log("barset.onValuesRemoved: " + index + ", " + count); - onValueChanged: console.log("barset.onValuesChanged: " + index); - } - BarSet { label: "Susan"; values: [5, 1, 2, 4, 1, 7] } - BarSet { label: "James"; values: [3, 5, 8, 13, 5, 8] } - - onNameChanged: console.log("horizontalPercentBarSeries.onNameChanged: " + series.name); - onVisibleChanged: console.log("horizontalPercentBarSeries.onVisibleChanged: " + series.visible); - onOpacityChanged: console.log("horizontalPercentBarSeries.onOpacityChanged: " + opacity); - onClicked: console.log("horizontalPercentBarSeries.onClicked: " + barset + " " + index); - onHovered: console.log("horizontalPercentBarSeries.onHovered: " + barset - + " " + status + " " + index); - onLabelsVisibleChanged: console.log("horizontalPercentBarSeries.onLabelsVisibleChanged: " + series.labelsVisible); - onCountChanged: console.log("horizontalPercentBarSeries.onCountChanged: " + count); - onLabelsFormatChanged: console.log( - "horizontalPercentBarSeries.onLabelsFormatChanged: " - + format); - onLabelsPositionChanged: console.log( - "horizontalPercentBarSeries.onLabelsPositionChanged: " - + series.labelsPosition); - - function changeLabelsPosition() { - if (labelsPosition === BarSeries.LabelsCenter) - labelsPosition = BarSeries.LabelsInsideEnd; - else - labelsPosition = BarSeries.LabelsCenter; - } - } -} diff --git a/tests/quick2chartproperties/qml/quick2chartproperties/HorizontalStackedBarChart.qml b/tests/quick2chartproperties/qml/quick2chartproperties/HorizontalStackedBarChart.qml deleted file mode 100644 index c1ef51b8..00000000 --- a/tests/quick2chartproperties/qml/quick2chartproperties/HorizontalStackedBarChart.qml +++ /dev/null @@ -1,79 +0,0 @@ -/**************************************************************************** -** -** 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 -import QtCommercial.Chart 1.4 - -ChartView { - title: "Stacked bar series" - anchors.fill: parent - theme: ChartView.ChartThemeLight - legend.alignment: Qt.AlignBottom - animationOptions: ChartView.SeriesAnimations - - property variant series: mySeries - - HorizontalStackedBarSeries { - id: mySeries - name: "bar" - labelsFormat: "@value"; - axisY: BarCategoryAxis { 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 + " " + index); - onPenChanged: console.log("barset.onPenChanged: " + pen); - onBrushChanged: console.log("barset.onBrushChanged: " + brush); - onLabelChanged: console.log("barset.onLabelChanged: " + label); - onLabelBrushChanged: console.log("barset.onLabelBrushChanged: " + labelBrush); - onLabelFontChanged: console.log("barset.onLabelFontChanged: " + labelFont); - onColorChanged: console.log("barset.onColorChanged: " + color); - onBorderColorChanged: console.log("barset.onBorderColorChanged: " + color); - onLabelColorChanged: console.log("barset.onLabelColorChanged: " + color); - onCountChanged: console.log("barset.onCountChanged: " + count); - onValuesAdded: console.log("barset.onValuesAdded: " + index + ", " + count); - onValuesRemoved: console.log("barset.onValuesRemoved: " + index + ", " + count); - onValueChanged: console.log("barset.onValuesChanged: " + index); - } - BarSet { label: "Susan"; values: [5, 1, 2, 4, 1, 7] } - BarSet { label: "James"; values: [3, 5, 8, 13, 5, 8] } - - onNameChanged: console.log("horizontalStackedBarSeries.onNameChanged: " + series.name); - onVisibleChanged: console.log("horizontalStackedBarSeries.onVisibleChanged: " + series.visible); - onOpacityChanged: console.log("horizontalStackedBarSeries.onOpacityChanged: " + opacity); - onClicked: console.log("horizontalStackedBarSeries.onClicked: " + barset + " " + index); - onHovered: console.log("horizontalStackedBarSeries.onHovered: " + barset - + " " + status + " " + index); - onLabelsVisibleChanged: console.log("horizontalStackedBarSeries.onLabelsVisibleChanged: " + series.labelsVisible); - onCountChanged: console.log("horizontalStackedBarSeries.onCountChanged: " + count); - onLabelsFormatChanged: console.log( - "horizontalStackedBarSeries.onLabelsFormatChanged: " - + format); - onLabelsPositionChanged: console.log( - "horizontalStackedBarSeries.onLabelsPositionChanged: " - + series.labelsPosition); - - function changeLabelsPosition() { - if (labelsPosition === BarSeries.LabelsCenter) - labelsPosition = BarSeries.LabelsInsideEnd; - else - labelsPosition = BarSeries.LabelsCenter; - } - } -} diff --git a/tests/quick2chartproperties/qml/quick2chartproperties/LineChart.qml b/tests/quick2chartproperties/qml/quick2chartproperties/LineChart.qml deleted file mode 100644 index 3190ac35..00000000 --- a/tests/quick2chartproperties/qml/quick2chartproperties/LineChart.qml +++ /dev/null @@ -1,78 +0,0 @@ -/**************************************************************************** -** -** 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 -import QtCommercial.Chart 1.4 - -ChartView { - property variant series: lineSeries - - title: "line series" - anchors.fill: parent - animationOptions: ChartView.SeriesAnimations - - LineSeries { - id: lineSeries - name: "line 1" - XYPoint { x: 0; y: 0 } - XYPoint { x: 1.1; y: 2.1 } - XYPoint { x: 1.9; y: 3.3 } - XYPoint { x: 2.1; y: 2.1 } - XYPoint { x: 2.9; y: 4.9 } - XYPoint { x: 3.4; y: 3.0 } - XYPoint { x: 4.1; y: 3.3 } - - pointLabelsFormat: "@xPoint, @yPoint"; - - onNameChanged: console.log("lineSeries.onNameChanged: " + name); - onVisibleChanged: console.log("lineSeries.onVisibleChanged: " + visible); - onOpacityChanged: console.log(name + ".onOpacityChanged: " + opacity); - onClicked: console.log(name + ".onClicked: " + point.x + ", " + point.y); - onPointReplaced: console.log("lineSeries.onPointReplaced: " + index); - onPointRemoved: console.log("lineSeries.onPointRemoved: " + index); - onPointAdded: console.log("lineSeries.onPointAdded: " + series.at(index).x + ", " + series.at(index).y); - onColorChanged: console.log("lineSeries.onColorChanged: " + color); - onWidthChanged: console.log("lineSeries.onWidthChanged: " + width); - onStyleChanged: console.log("lineSeries.onStyleChanged: " + style); - onCapStyleChanged: console.log("lineSeries.onCapStyleChanged: " + capStyle); - onCountChanged: console.log("lineSeries.onCountChanged: " + count); - onHovered: console.log("lineSeries.onHovered:" + point.x + "," + point.y + " " + state); - onPointLabelsVisibilityChanged: console.log("lineSeries.onPointLabelsVisibilityChanged: " - + visible); - onPointLabelsFormatChanged: console.log("lineSeries.onPointLabelsFormatChanged: " - + format); - onPointLabelsFontChanged: console.log("lineSeries.onPointLabelsFontChanged: " - + font.family); - onPointLabelsColorChanged: console.log("lineSeries.onPointLabelsColorChanged: " - + color); - } - - LineSeries { - name: "line 2" - XYPoint { x: 1.1; y: 1.1 } - XYPoint { x: 1.9; y: 2.3 } - XYPoint { x: 2.1; y: 1.1 } - XYPoint { x: 2.9; y: 3.9 } - XYPoint { x: 3.4; y: 2.0 } - XYPoint { x: 4.1; y: 2.3 } - onClicked: console.log(name + ".onClicked: " + point.x + ", " + point.y); - onHovered: console.log(name + ".onHovered: " + point.x + ", " + point.y); - } -} diff --git a/tests/quick2chartproperties/qml/quick2chartproperties/LineEditor.qml b/tests/quick2chartproperties/qml/quick2chartproperties/LineEditor.qml deleted file mode 100644 index 7960b4a1..00000000 --- a/tests/quick2chartproperties/qml/quick2chartproperties/LineEditor.qml +++ /dev/null @@ -1,123 +0,0 @@ -/**************************************************************************** -** -** 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 - - -Flow { - id: flow - spacing: 5 - flow: Flow.TopToBottom - property variant series - - 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: "color" - onClicked: series.color = main.nextColor(); - } - Button { - text: series != undefined ? "width + (" + series.width + ")" : "" - onClicked: series.width += 0.5; - } - Button { - text: series != undefined ? "width - (" + series.width + ")" : "" - onClicked: series.width -= 0.5; - } - Button { - text: series != undefined ? "style + (" + series.style + ")" : "" - onClicked: series.style++; - } - Button { - text: series != undefined ? "style - (" + series.style + ")" : "" - onClicked: series.style--; - } - Button { - text: series != undefined ? "cap style + (" + series.capStyle + ")" : "" - onClicked: series.capStyle++; - } - Button { - text: series != undefined ? "cap style - (" +series.capStyle + ")" : "" - onClicked: series.capStyle--; - } - Button { - text: "points visible" - onClicked: series.pointsVisible = !series.pointsVisible; - } - Button { - text: "point labels visible" - onClicked: series.pointLabelsVisible = !series.pointLabelsVisible; - } - Button { - text: "point labels format" - onClicked: { - if (series.pointLabelsFormat === "@xPoint, @yPoint") - series.pointLabelsFormat = "(@xPoint)" - else - series.pointLabelsFormat = "@xPoint, @yPoint" - } - } - Button { - text: "point labels font" - onClicked: { - if (series.pointLabelsFont.family === "Times") - series.pointLabelsFont.family = "Courier"; - else - series.pointLabelsFont.family = "Times"; - } - } - Button { - text: "point labels color" - onClicked: series.pointLabelsColor = main.nextColor(); - } - Button { - text: "append point" - onClicked: series.append(series.count - 1, series.count - 1); - } - Button { - text: "replace point" - onClicked: { - var xyPoint = series.at(series.count - 1); - series.replace(series.count - 1, xyPoint.x, xyPoint.y + 0.1); - } - } - Button { - text: "remove point" - onClicked: series.remove(series.count - 1); - } - Button { - text: "insert point" - onClicked: series.insert(series.count - 2, series.count - 2, series.count - 2); - } - Button { - text: "clear" - onClicked: series.clear(); - } -} diff --git a/tests/quick2chartproperties/qml/quick2chartproperties/PercentBarChart.qml b/tests/quick2chartproperties/qml/quick2chartproperties/PercentBarChart.qml deleted file mode 100644 index 822a1839..00000000 --- a/tests/quick2chartproperties/qml/quick2chartproperties/PercentBarChart.qml +++ /dev/null @@ -1,78 +0,0 @@ -/**************************************************************************** -** -** 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 -import QtCommercial.Chart 1.4 - -ChartView { - title: "Percent bar series" - anchors.fill: parent - theme: ChartView.ChartThemeLight - legend.alignment: Qt.AlignBottom - animationOptions: ChartView.SeriesAnimations - - property variant series: mySeries - - PercentBarSeries { - id: mySeries - name: "bar" - labelsFormat: "@value"; - axisX: BarCategoryAxis { 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 + " " + index); - onPenChanged: console.log("barset.onPenChanged: " + pen); - onBrushChanged: console.log("barset.onBrushChanged: " + brush); - onLabelChanged: console.log("barset.onLabelChanged: " + label); - onLabelBrushChanged: console.log("barset.onLabelBrushChanged: " + labelBrush); - onLabelFontChanged: console.log("barset.onLabelFontChanged: " + labelFont); - onColorChanged: console.log("barset.onColorChanged: " + color); - onBorderColorChanged: console.log("barset.onBorderColorChanged: " + color); - onLabelColorChanged: console.log("barset.onLabelColorChanged: " + color); - onCountChanged: console.log("barset.onCountChanged: " + count); - onValuesAdded: console.log("barset.onValuesAdded: " + index + ", " + count); - onValuesRemoved: console.log("barset.onValuesRemoved: " + index + ", " + count); - onValueChanged: console.log("barset.onValuesChanged: " + index); - } - BarSet { label: "Susan"; values: [5, 1, 2, 4, 1, 7] } - BarSet { label: "James"; values: [3, 5, 8, 13, 5, 8] } - - onNameChanged: console.log("percentBarSeries.onNameChanged: " + series.name); - onVisibleChanged: console.log("percentBarSeries.onVisibleChanged: " + series.visible); - onOpacityChanged: console.log("percentBarSeries.onOpacityChanged: " + opacity); - onClicked: console.log("percentBarSeries.onClicked: " + barset + " " + index); - onHovered: console.log("percentBarSeries.onHovered: " + barset - + " " + status + " " + index); - onLabelsVisibleChanged: console.log("percentBarSeries.onLabelsVisibleChanged: " + series.labelsVisible); - onCountChanged: console.log("percentBarSeries.onCountChanged: " + count); - onLabelsFormatChanged: console.log("percentBarSeries.onLabelsFormatChanged: " - + format); - onLabelsPositionChanged: console.log("percentBarSeries.onLabelsPositionChanged: " - + series.labelsPosition); - - function changeLabelsPosition() { - if (labelsPosition === BarSeries.LabelsCenter) - labelsPosition = BarSeries.LabelsInsideEnd; - else - labelsPosition = BarSeries.LabelsCenter; - } - } -} diff --git a/tests/quick2chartproperties/qml/quick2chartproperties/PieChart.qml b/tests/quick2chartproperties/qml/quick2chartproperties/PieChart.qml deleted file mode 100644 index 6ee1ac91..00000000 --- a/tests/quick2chartproperties/qml/quick2chartproperties/PieChart.qml +++ /dev/null @@ -1,67 +0,0 @@ -/**************************************************************************** -** -** 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 -import QtCommercial.Chart 1.1 - -ChartView { - id: chart - title: "pie series" - animationOptions: ChartView.SeriesAnimations - - property variant series: pieSeries - - PieSeries { - id: pieSeries - name: "pie" - PieSlice { label: "slice1"; value: 11; - onValueChanged: console.log("slice.onValueChanged: " + value); - onLabelVisibleChanged: console.log("slice.onLabelVisibleChanged: " + labelVisible); - onPenChanged: console.log("slice.onPenChanged: " + pen); - onBorderColorChanged: console.log("slice.onBorderColorChanged: " + borderColor); - onBorderWidthChanged: console.log("slice.onBorderWidthChanged: " + borderWidth); - onBrushChanged: console.log("slice.onBrushChanged: " + brush); - onColorChanged: console.log("slice.onColorChanged: " + color); - onLabelColorChanged: console.log("slice.onLabelColorChanged: " + labelColor); - onLabelBrushChanged: console.log("slice.onLabelBrushChanged: " + labelBrush); - onLabelFontChanged: console.log("slice.onLabelFontChanged: " + labelFont); - onPercentageChanged: console.log("slice.onPercentageChanged: " + percentage); - onStartAngleChanged: console.log("slice.onStartAngleChanged: " + startAngle); - onAngleSpanChanged: console.log("slice.onAngleSpanChanged: " + angleSpan); - onClicked: console.log("slice.onClicked: " + label); - onHovered: console.log("slice.onHovered: " + state); - } - PieSlice { label: "slice2"; value: 22 } - PieSlice { label: "slice3"; value: 33 } - PieSlice { label: "slice4"; value: 44 } - - onNameChanged: console.log("pieSeries.onNameChanged: " + name); - onVisibleChanged: console.log("pieSeries.onVisibleChanged: " + series.visible); - onOpacityChanged: console.log("pieSeries.onOpacityChanged: " + opacity); - onClicked: console.log("pieSeries.onClicked: " + slice.label); - onHovered: console.log("pieSeries.onHovered: " + slice.label); - onAdded: console.log("pieSeries.onAdded: " + slices); - onSliceAdded: console.log("pieSeries.onSliceAdded: " + slice.label); - onRemoved: console.log("pieSeries.onRemoved: " + slices); - onSliceRemoved: console.log("pieSeries.onSliceRemoved: " + slice.label); - onCountChanged: console.log("pieSeries.onCountChanged: " + count); - onSumChanged: console.log("pieSeries.onSumChanged: " + sum); - } -} diff --git a/tests/quick2chartproperties/qml/quick2chartproperties/PieEditor.qml b/tests/quick2chartproperties/qml/quick2chartproperties/PieEditor.qml deleted file mode 100644 index 09464e0f..00000000 --- a/tests/quick2chartproperties/qml/quick2chartproperties/PieEditor.qml +++ /dev/null @@ -1,228 +0,0 @@ -/**************************************************************************** -** -** 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 -import QtCommercial.Chart 1.1 - -Row { - anchors.fill: parent - spacing: 5 - property variant series - property int sliceIndex: 0 - - // buttons for selecting the edited object: series, slice or label - Flow { - spacing: 5 - flow: Flow.TopToBottom - Button { - id: seriesButton - text: "series" - unpressedColor: "#79bd8f" - onClicked: { - seriesFlow.visible = true; - slicesFlow.visible = false; - labelsFlow.visible = false; - color = "#00a388"; - sliceButton.color = "#79bd8f"; - labelButton.color = "#79bd8f"; - } - } - Button { - id: sliceButton - text: "slice" - unpressedColor: "#79bd8f" - onClicked: { - seriesFlow.visible = false; - slicesFlow.visible = true; - labelsFlow.visible = false; - color = "#00a388"; - seriesButton.color = "#79bd8f"; - labelButton.color = "#79bd8f"; - } - } - Button { - id: labelButton - text: "label" - unpressedColor: "#79bd8f" - onClicked: { - seriesFlow.visible = false; - slicesFlow.visible = false; - labelsFlow.visible = true; - color = "#00a388"; - seriesButton.color = "#79bd8f"; - sliceButton.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: "series opacity +" - onClicked: series.opacity += 0.1; - } - Button { - text: "series opacity -" - onClicked: series.opacity -= 0.1; - } - Button { - text: "series hpos +" - onClicked: series.horizontalPosition += 0.1; - } - Button { - text: "series hpos -" - onClicked: series.horizontalPosition -= 0.1; - } - Button { - text: "series vpos +" - onClicked: series.verticalPosition += 0.1; - } - Button { - text: "series vpos -" - onClicked: series.verticalPosition -= 0.1; - } - Button { - text: "series size +" - onClicked: series.size += 0.1; - } - Button { - text: "series size -" - onClicked: series.size -= 0.1; - } - Button { - text: "series start angle +" - onClicked: series.startAngle += 1.1; - } - Button { - text: "series start angle -" - onClicked: series.startAngle -= 1.1; - } - Button { - text: "series end angle +" - onClicked: series.endAngle += 1.1; - } - Button { - text: "series end angle -" - onClicked: series.endAngle -= 1.1; - } - } - - // Buttons for editing slices - Flow { - id: slicesFlow - spacing: 5 - flow: Flow.TopToBottom - visible: false - - Button { - text: "append slice" - onClicked: series.append("slice" + (series.count + 1), 3.0); - } - Button { - text: "remove slice" - onClicked: series.remove(series.at(series.count - 1)); - } - Button { - text: "slice color" - onClicked: series.at(sliceIndex).color = main.nextColor(); - } - Button { - text: "slice border color" - onClicked: series.at(sliceIndex).borderColor = main.nextColor(); - } - Button { - text: "slice border width +" - onClicked: series.at(sliceIndex).borderWidth++; - } - Button { - text: "slice border width -" - onClicked: series.at(sliceIndex).borderWidth--; - } - Button { - text: "slice exploded" - onClicked: series.at(sliceIndex).exploded = !series.at(sliceIndex).exploded; - } - Button { - text: "slice explode dist +" - onClicked: series.at(sliceIndex).explodeDistanceFactor += 0.1; - } - Button { - text: "slice explode dist -" - onClicked: series.at(sliceIndex).explodeDistanceFactor -= 0.1; - } - } - - // Buttons for editing labels - Flow { - id: labelsFlow - spacing: 5 - flow: Flow.TopToBottom - visible: false - - Button { - text: "label visible" - onClicked: series.at(sliceIndex).labelVisible = !series.at(sliceIndex).labelVisible; - } - Button { - text: "LabelInsideNormal" - onClicked: series.at(sliceIndex).labelPosition = PieSlice.LabelInsideNormal; - } - Button { - text: "LabelInsideHorizontal" - onClicked: series.at(sliceIndex).labelPosition = PieSlice.LabelInsideHorizontal; - } - Button { - text: "LabelInsideTangential" - onClicked: series.at(sliceIndex).labelPosition = PieSlice.LabelInsideTangential; - } - Button { - text: "LabelOutside" - onClicked: series.at(sliceIndex).labelPosition = PieSlice.LabelOutside; - } - Button { - text: "label arm len +" - onClicked: series.at(sliceIndex).labelArmLengthFactor += 0.1; - } - Button { - text: "label arm len -" - onClicked: series.at(sliceIndex).labelArmLengthFactor -= 0.1; - } - Button { - text: "slice label color" - onClicked: series.at(sliceIndex).labelColor = main.nextColor(); - } - - FontEditor { - id: fontEditor - fontDescription: "label" - function editedFont() { - return series.at(sliceIndex).labelFont; - } - } - } -} diff --git a/tests/quick2chartproperties/qml/quick2chartproperties/ScatterChart.qml b/tests/quick2chartproperties/qml/quick2chartproperties/ScatterChart.qml deleted file mode 100644 index 64785d2b..00000000 --- a/tests/quick2chartproperties/qml/quick2chartproperties/ScatterChart.qml +++ /dev/null @@ -1,75 +0,0 @@ -/**************************************************************************** -** -** 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 -import QtCommercial.Chart 1.4 - -ChartView { - title: "scatter series" - property variant series: scatterSeries - animationOptions: ChartView.SeriesAnimations - - ScatterSeries { - id: scatterSeries - name: "scatter 1" - XYPoint { x: 1.5; y: 1.5 } - XYPoint { x: 1.5; y: 1.6 } - XYPoint { x: 1.57; y: 1.55 } - XYPoint { x: 1.8; y: 1.8 } - XYPoint { x: 1.9; y: 1.6 } - XYPoint { x: 2.1; y: 1.3 } - XYPoint { x: 2.5; y: 2.1 } - - pointLabelsFormat: "@xPoint, @yPoint"; - - onNameChanged: console.log("scatterSeries.onNameChanged: " + name); - onVisibleChanged: console.log("scatterSeries.onVisibleChanged: " + visible); - onOpacityChanged: console.log(name + ".onOpacityChanged: " + opacity); - onClicked: console.log(name + ".onClicked: " + point.x + ", " + point.y); - onHovered: console.log(name + ".onHovered: " + point.x + ", " + point.y); - onPointReplaced: console.log("scatterSeries.onPointReplaced: " + index); - onPointRemoved: console.log("scatterSeries.onPointRemoved: " + index); - onPointAdded: console.log("scatterSeries.onPointAdded: " + series.at(index).x + ", " + series.at(index).y); - onColorChanged: console.log("scatterSeries.onColorChanged: " + color); - onBorderColorChanged: console.log("scatterSeries.onBorderColorChanged: " + borderColor); - onBorderWidthChanged: console.log("scatterSeries.onBorderChanged: " + borderWidth); - onCountChanged: console.log("scatterSeries.onCountChanged: " + count); - onPointLabelsVisibilityChanged: console.log("lineSeries.onPointLabelsVisibilityChanged: " - + visible); - onPointLabelsFormatChanged: console.log("lineSeries.onPointLabelsFormatChanged: " - + format); - onPointLabelsFontChanged: console.log("lineSeries.onPointLabelsFontChanged: " - + font.family); - onPointLabelsColorChanged: console.log("lineSeries.onPointLabelsColorChanged: " - + color); - } - - ScatterSeries { - name: "scatter2" - XYPoint { x: 2.0; y: 2.0 } - XYPoint { x: 2.0; y: 2.1 } - XYPoint { x: 2.07; y: 2.05 } - XYPoint { x: 2.2; y: 2.9 } - XYPoint { x: 2.4; y: 2.7 } - XYPoint { x: 2.67; y: 2.65 } - onClicked: console.log(name + ".onClicked: " + point.x + ", " + point.y); - onHovered: console.log(name + ".onHovered: " + point.x + ", " + point.y); - } -} diff --git a/tests/quick2chartproperties/qml/quick2chartproperties/ScatterEditor.qml b/tests/quick2chartproperties/qml/quick2chartproperties/ScatterEditor.qml deleted file mode 100644 index 23afdb75..00000000 --- a/tests/quick2chartproperties/qml/quick2chartproperties/ScatterEditor.qml +++ /dev/null @@ -1,118 +0,0 @@ -/**************************************************************************** -** -** 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 - -Flow { - id: flow - spacing: 5 - flow: Flow.TopToBottom - property variant series - - 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: "color" - onClicked: series.color = main.nextColor(); - } - Button { - text: "borderColor" - onClicked: series.borderColor = main.nextColor(); - } - Button { - text: series != undefined ? "borderWidth + (" + series.borderWidth + ")" : "" - onClicked: series.borderWidth += 0.5; - } - Button { - text: series != undefined ? "borderWidth - (" + series.borderWidth + ")" : "" - onClicked: series.borderWidth -= 0.5; - } - Button { - text: "markerSize +" - onClicked: series.markerSize += 1.0; - } - Button { - text: "markerSize -" - onClicked: series.markerSize -= 1.0; - } - Button { - text: "markerShape" - onClicked: series.markerShape = ((series.markerShape + 1) % 2); - } - Button { - text: "point labels visible" - onClicked: series.pointLabelsVisible = !series.pointLabelsVisible; - } - Button { - text: "point labels format" - onClicked: { - if (series.pointLabelsFormat === "@xPoint, @yPoint") - series.pointLabelsFormat = "(@xPoint)" - else - series.pointLabelsFormat = "@xPoint, @yPoint" - } - } - Button { - text: "point labels font" - onClicked: { - if (series.pointLabelsFont.family === "Times") - series.pointLabelsFont.family = "Courier"; - else - series.pointLabelsFont.family = "Times"; - } - } - Button { - text: "point labels color" - onClicked: series.pointLabelsColor = main.nextColor(); - } - Button { - text: "append point" - onClicked: series.append(series.count - 1, series.count - 1); - } - Button { - text: "replace point" - onClicked: { - var xyPoint = series.at(series.count - 1); - series.replace(series.count - 1, xyPoint.x, xyPoint.y + 0.1); - } - } - Button { - text: "remove point" - onClicked: series.remove(series.count - 1); - } - Button { - text: "insert point" - onClicked: series.insert(series.count - 2, series.count - 2, series.count - 2); - } - Button { - text: "clear" - onClicked: series.clear(); - } -} diff --git a/tests/quick2chartproperties/qml/quick2chartproperties/SplineChart.qml b/tests/quick2chartproperties/qml/quick2chartproperties/SplineChart.qml deleted file mode 100644 index e7c8793d..00000000 --- a/tests/quick2chartproperties/qml/quick2chartproperties/SplineChart.qml +++ /dev/null @@ -1,77 +0,0 @@ -/**************************************************************************** -** -** 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 -import QtCommercial.Chart 1.4 - -ChartView { - title: "spline series" - anchors.fill: parent - property variant series: splineSeries - animationOptions: ChartView.SeriesAnimations - - SplineSeries { - id: splineSeries - name: "spline 1" - XYPoint { x: 0; y: 0 } - XYPoint { x: 1.1; y: 2.1 } - XYPoint { x: 1.9; y: 3.3 } - XYPoint { x: 2.1; y: 2.1 } - XYPoint { x: 2.9; y: 4.9 } - XYPoint { x: 3.4; y: 3.0 } - XYPoint { x: 4.1; y: 3.3 } - - pointLabelsFormat: "@xPoint, @yPoint"; - - onNameChanged: console.log("splineSeries.onNameChanged: " + name); - onVisibleChanged: console.log("splineSeries.onVisibleChanged: " + visible); - onOpacityChanged: console.log(name + ".onOpacityChanged: " + opacity); - onClicked: console.log(name + ".onClicked: " + point.x + ", " + point.y); - onHovered: console.log(name + ".onHovered: " + point.x + ", " + point.y); - onPointReplaced: console.log("splineSeries.onPointReplaced: " + index); - onPointRemoved: console.log("splineSeries.onPointRemoved: " + index); - onPointAdded: console.log("splineSeries.onPointAdded: " + series.at(index).x + ", " + series.at(index).y); - onColorChanged: console.log("splineSeries.onColorChanged: " + color); - onWidthChanged: console.log("splineSeries.onWidthChanged: " + width); - onStyleChanged: console.log("splineSeries.onStyleChanged: " + style); - onCapStyleChanged: console.log("splineSeries.onCapStyleChanged: " + capStyle); - onCountChanged: console.log("splineSeries.onCountChanged: " + count); - onPointLabelsVisibilityChanged: console.log("splineSeries.onPointLabelsVisibilityChanged: " - + visible); - onPointLabelsFormatChanged: console.log("splineSeries.onPointLabelsFormatChanged: " - + format); - onPointLabelsFontChanged: console.log("splineSeries.onPointLabelsFontChanged: " - + font.family); - onPointLabelsColorChanged: console.log("splineSeries.onPointLabelsColorChanged: " - + color); - } - - SplineSeries { - name: "spline 2" - XYPoint { x: 1.1; y: 1.1 } - XYPoint { x: 1.9; y: 2.3 } - XYPoint { x: 2.1; y: 1.1 } - XYPoint { x: 2.9; y: 3.9 } - XYPoint { x: 3.4; y: 2.0 } - XYPoint { x: 4.1; y: 2.3 } - onClicked: console.log(name + ".onClicked: " + point.x + ", " + point.y); - onHovered: console.log(name + ".onHovered: " + point.x + ", " + point.y); - } -} diff --git a/tests/quick2chartproperties/qml/quick2chartproperties/StackedBarChart.qml b/tests/quick2chartproperties/qml/quick2chartproperties/StackedBarChart.qml deleted file mode 100644 index 0890884c..00000000 --- a/tests/quick2chartproperties/qml/quick2chartproperties/StackedBarChart.qml +++ /dev/null @@ -1,77 +0,0 @@ -/**************************************************************************** -** -** 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 -import QtCommercial.Chart 1.4 - -ChartView { - title: "Stacked bar series" - anchors.fill: parent - theme: ChartView.ChartThemeLight - legend.alignment: Qt.AlignBottom - animationOptions: ChartView.SeriesAnimations - - property variant series: mySeries - - StackedBarSeries { - id: mySeries - name: "bar" - labelsFormat: "@value"; - axisX: BarCategoryAxis { 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 + " " + index); - onPenChanged: console.log("barset.onPenChanged: " + pen); - onBrushChanged: console.log("barset.onBrushChanged: " + brush); - onLabelChanged: console.log("barset.onLabelChanged: " + label); - onLabelBrushChanged: console.log("barset.onLabelBrushChanged: " + labelBrush); - onLabelFontChanged: console.log("barset.onLabelFontChanged: " + labelFont); - onColorChanged: console.log("barset.onColorChanged: " + color); - onBorderColorChanged: console.log("barset.onBorderColorChanged: " + color); - onLabelColorChanged: console.log("barset.onLabelColorChanged: " + color); - onCountChanged: console.log("barset.onCountChanged: " + count); - onValuesAdded: console.log("barset.onValuesAdded: " + index + ", " + count); - onValuesRemoved: console.log("barset.onValuesRemoved: " + index + ", " + count); - onValueChanged: console.log("barset.onValuesChanged: " + index); - } - BarSet { label: "Susan"; values: [5, 1, 2, 4, 1, 7] } - BarSet { label: "James"; values: [3, 5, 8, 13, 5, 8] } - - onNameChanged: console.log("stackedBarSeries.onNameChanged: " + series.name); - onVisibleChanged: console.log("stackedBarSeries.onVisibleChanged: " + series.visible); - onOpacityChanged: console.log("stackedBarSeries.onOpacityChanged: " + opacity); - onClicked: console.log("stackedBarSeries.onClicked: " + barset + " " + index); - onHovered: console.log("stackedBarSeries.onHovered: " + barset - + " " + status + " " + index); - onLabelsVisibleChanged: console.log("stackedBarSeries.onLabelsVisibleChanged: " + series.labelsVisible); - onCountChanged: console.log("stackedBarSeries.onCountChanged: " + count); - onLabelsFormatChanged: console.log("stackedBarSeries.onLabelsFormatChanged: " - + format); - onLabelsPositionChanged: console.log("stackedBarSeries.onLabelsPositionChanged: " - + series.labelsPosition); - - function changeLabelsPosition() { - if (labelsPosition === BarSeries.LabelsCenter) - labelsPosition = BarSeries.LabelsInsideEnd; - else - labelsPosition = BarSeries.LabelsCenter; - } - } -} diff --git a/tests/quick2chartproperties/qml/quick2chartproperties/loader.qml b/tests/quick2chartproperties/qml/quick2chartproperties/loader.qml deleted file mode 100644 index 2b24d01c..00000000 --- a/tests/quick2chartproperties/qml/quick2chartproperties/loader.qml +++ /dev/null @@ -1,37 +0,0 @@ -/**************************************************************************** -** -** 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 - -Item { - id: container - width: 640 - height: 500 - Component.onCompleted: { - var co = Qt.createComponent("main.qml") - if (co.status == Component.Ready) { - var o = co.createObject(container) - } else { - console.log(co.errorString()) - console.log("QtCommercial.Chart 1.1 not available") - console.log("Please use correct QML_IMPORT_PATH export") - } - } -} diff --git a/tests/quick2chartproperties/qml/quick2chartproperties/main.qml b/tests/quick2chartproperties/qml/quick2chartproperties/main.qml deleted file mode 100644 index 8265e1ae..00000000 --- a/tests/quick2chartproperties/qml/quick2chartproperties/main.qml +++ /dev/null @@ -1,179 +0,0 @@ -/**************************************************************************** -** -** 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 - -Rectangle { - id: main - width: 800 - height: 600 - property int viewCount: 9 - property variant colors: ["#637D74", "#403D3A", "#8C3B3B", "#AB6937", "#D4A960"] - property int colorIndex: 0 - property int buttonWidth: 42 - - function nextColor() { - colorIndex++; - return colors[colorIndex % colors.length]; - } - - Row { - anchors.top: parent.top - anchors.bottom: buttonRow.top - anchors.bottomMargin: 10 - anchors.left: parent.left - anchors.right: parent.right - - Loader { - id: chartLoader - width: main.width - editorLoader.width - height: parent.height - source: "Chart.qml" - onStatusChanged: { - if (status == Loader.Ready && editorLoader.status == Loader.Ready && chartLoader.item) { - if (source.toString().search("/Chart.qml") > 0) - editorLoader.item.chart = chartLoader.item.chart; - else - editorLoader.item.series = chartLoader.item.series; - } - } - } - - Loader { - id: editorLoader - width: 280 - height: parent.height - source: "ChartEditor.qml" - onStatusChanged: { - if (status == Loader.Ready && chartLoader.status == Loader.Ready && chartLoader.item) { - if (source.toString().search("/ChartEditor.qml") > 0) - editorLoader.item.chart = chartLoader.item.chart; - else - editorLoader.item.series = chartLoader.item.series; - } - } - } - } - - Row { - id: buttonRow - height: 40 - anchors.bottom: parent.bottom - anchors.horizontalCenter: parent.horizontalCenter - spacing: 10 - - Button { - text: "chart" - width: buttonWidth - onClicked: { - chartLoader.source = "Chart.qml"; - editorLoader.source = "ChartEditor.qml"; - } - } - Button { - text: "pie" - width: buttonWidth - onClicked: { - chartLoader.source = "PieChart.qml"; - editorLoader.source = "PieEditor.qml"; - } - } - Button { - text: "line" - width: buttonWidth - onClicked: { - chartLoader.source = "LineChart.qml"; - editorLoader.source = "LineEditor.qml"; - } - } - Button { - text: "spline" - width: buttonWidth - onClicked: { - chartLoader.source = "SplineChart.qml"; - editorLoader.source = "LineEditor.qml"; - } - } - Button { - text: "scatter" - width: buttonWidth - onClicked: { - chartLoader.source = "ScatterChart.qml"; - editorLoader.source = "ScatterEditor.qml"; - } - } - Button { - text: "area" - width: buttonWidth - onClicked: { - chartLoader.source = "AreaChart.qml"; - editorLoader.source = "AreaEditor.qml"; - } - } - Button { - text: "bar" - width: buttonWidth - onClicked: { - chartLoader.source = "BarChart.qml"; - editorLoader.source = "BarEditor.qml"; - } - } - Button { - text: "sbar" - width: buttonWidth - onClicked: { - chartLoader.source = "StackedBarChart.qml"; - editorLoader.source = "BarEditor.qml"; - } - } - Button { - text: "pbar" - width: buttonWidth - onClicked: { - chartLoader.source = "PercentBarChart.qml"; - editorLoader.source = "BarEditor.qml"; - } - } - Button { - text: "hbar" - width: buttonWidth - onClicked: { - chartLoader.source = "HorizontalBarChart.qml"; - editorLoader.source = "BarEditor.qml"; - } - } - Button { - text: "hsbar" - width: buttonWidth - onClicked: { - chartLoader.source = "HorizontalStackedBarChart.qml"; - editorLoader.source = "BarEditor.qml"; - } - } - Button { - text: "hpbar" - width: buttonWidth - onClicked: { - chartLoader.source = "HorizontalPercentBarChart.qml"; - editorLoader.source = "BarEditor.qml"; - } - } - } -} |