diff options
author | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2013-05-07 08:24:22 +0300 |
---|---|---|
committer | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2013-05-07 08:43:12 +0300 |
commit | e824058bc1926a656736fa2490cb892ea9a4e2f5 (patch) | |
tree | c84007ce6535649de8d116d3e753a7b0a63127a0 /tests/auto | |
parent | 65acb111b085568597ebf8a83241f4b0ab63a037 (diff) |
Add API to specify plot area background.
Task-number: http://jira.sc.local/browse/QTRD-1886
Change-Id: Ica9bd72482fdca14a81574087ba0ec4614169cd2
Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/qchart/tst_qchart.cpp | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/tests/auto/qchart/tst_qchart.cpp b/tests/auto/qchart/tst_qchart.cpp index f92be649..4f78d4e4 100644 --- a/tests/auto/qchart/tst_qchart.cpp +++ b/tests/auto/qchart/tst_qchart.cpp @@ -71,6 +71,12 @@ private slots: void backgroundPen(); void isBackgroundVisible_data(); void isBackgroundVisible(); + void plotAreaBackgroundBrush_data(); + void plotAreaBackgroundBrush(); + void plotAreaBackgroundPen_data(); + void plotAreaBackgroundPen(); + void isPlotAreaBackgroundVisible_data(); + void isPlotAreaBackgroundVisible(); void legend_data(); void legend(); void plotArea_data(); @@ -357,6 +363,52 @@ void tst_QChart::isBackgroundVisible() QCOMPARE(m_chart->isBackgroundVisible(), isBackgroundVisible); } +void tst_QChart::plotAreaBackgroundBrush_data() +{ + QTest::addColumn<QBrush>("plotAreaBackgroundBrush"); + QTest::newRow("null") << QBrush(); + QTest::newRow("blue") << QBrush(Qt::blue); + QTest::newRow("white") << QBrush(Qt::white); + QTest::newRow("black") << QBrush(Qt::black); +} + +void tst_QChart::plotAreaBackgroundBrush() +{ + QFETCH(QBrush, plotAreaBackgroundBrush); + m_chart->setPlotAreaBackgroundBrush(plotAreaBackgroundBrush); + QCOMPARE(m_chart->plotAreaBackgroundBrush(), plotAreaBackgroundBrush); +} + +void tst_QChart::plotAreaBackgroundPen_data() +{ + QTest::addColumn<QPen>("plotAreaBackgroundPen"); + QTest::newRow("null") << QPen(); + QTest::newRow("blue") << QPen(Qt::blue); + QTest::newRow("white") << QPen(Qt::white); + QTest::newRow("black") << QPen(Qt::black); +} + + +void tst_QChart::plotAreaBackgroundPen() +{ + QFETCH(QPen, plotAreaBackgroundPen); + m_chart->setPlotAreaBackgroundPen(plotAreaBackgroundPen); + QCOMPARE(m_chart->plotAreaBackgroundPen(), plotAreaBackgroundPen); +} + +void tst_QChart::isPlotAreaBackgroundVisible_data() +{ + QTest::addColumn<bool>("isPlotAreaBackgroundVisible"); + QTest::newRow("true") << true; + QTest::newRow("false") << false; +} + +void tst_QChart::isPlotAreaBackgroundVisible() +{ + QFETCH(bool, isPlotAreaBackgroundVisible); + m_chart->setPlotAreaBackgroundVisible(isPlotAreaBackgroundVisible); + QCOMPARE(m_chart->isPlotAreaBackgroundVisible(), isPlotAreaBackgroundVisible); +} void tst_QChart::legend_data() { |