diff options
author | Titta Heikkala <titta.heikkala@digia.com> | 2014-04-03 09:36:26 +0300 |
---|---|---|
committer | Titta Heikkala <titta.heikkala@digia.com> | 2014-04-04 08:41:30 +0300 |
commit | 23bf915495bcbba30c874b0951b4d23df0f5acf3 (patch) | |
tree | 8b5a2f2dd3668d60755f40e4d089525d5a40e6b6 /tests/auto | |
parent | 235cef4135ee65cd566a8b9db8cbb3f694bf425e (diff) |
Add possibility to set markers in legend in reverse order
Added new property for legend which defines whether the markers in
legend are shown in reverse order or not.
Task-number: QTRD-2512
Change-Id: Ia6e6551be74a183c9f544d7cb9fff679150f4d7e
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/qchart/tst_qchart.cpp | 8 | ||||
-rw-r--r-- | tests/auto/qml-qtquicktest/tst_chartview.qml | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/tests/auto/qchart/tst_qchart.cpp b/tests/auto/qchart/tst_qchart.cpp index 6035fd76..c0a8eee3 100644 --- a/tests/auto/qchart/tst_qchart.cpp +++ b/tests/auto/qchart/tst_qchart.cpp @@ -420,6 +420,7 @@ void tst_QChart::legend() { QLegend *legend = m_chart->legend(); QVERIFY(legend); + QVERIFY(!m_chart->legend()->reverseMarkers()); // Colors related signals QSignalSpy colorSpy(legend, SIGNAL(colorChanged(QColor))); @@ -456,6 +457,13 @@ void tst_QChart::legend() f.setBold(!f.bold()); legend->setFont(f); QCOMPARE(fontSpy.count(), 1); + + // reverseMarkersChanged + QSignalSpy reverseMarkersSpy(legend, SIGNAL(reverseMarkersChanged(bool))); + QCOMPARE(reverseMarkersSpy.count(), 0); + legend->setReverseMarkers(); + QCOMPARE(reverseMarkersSpy.count(), 1); + QVERIFY(legend->reverseMarkers()); } void tst_QChart::plotArea_data() diff --git a/tests/auto/qml-qtquicktest/tst_chartview.qml b/tests/auto/qml-qtquicktest/tst_chartview.qml index 11e4e191..bcfb605a 100644 --- a/tests/auto/qml-qtquicktest/tst_chartview.qml +++ b/tests/auto/qml-qtquicktest/tst_chartview.qml @@ -55,6 +55,7 @@ Rectangle { compare(chartView.legend.backgroundVisible, false, "ChartView.legend.backgroundVisible"); verify(chartView.legend.borderColor != undefined, "ChartView.legend.borderColor"); verify(chartView.legend.color != undefined, "ChartView.legend.color"); + compare(chartView.legend.reverseMarkers, false, "ChartView.legend.reverseMarkers"); // Legend font compare(chartView.legend.font.bold, false, "ChartView.legend.font.bold"); compare(chartView.legend.font.capitalization, Font.MixedCase, "ChartView.legend.font.capitalization"); |