diff options
author | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2014-03-27 14:26:07 +0200 |
---|---|---|
committer | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2014-03-28 07:47:21 +0200 |
commit | fffa26dc1470ad6562e390133314fc149134b8e5 (patch) | |
tree | 425aa473c79671bd48111a12e5a94ad62e68bb53 /tests/barstest/chart.cpp | |
parent | 1e99ff2c532977d21776f5f363b8171ef147a7d9 (diff) |
Improve axis formatter flexibility
Number of grid lines and labels are no longer tied to segment
count.
Change-Id: I517ebc905f1f70e2e00ae86c05fd0e49e922845d
Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>
Diffstat (limited to 'tests/barstest/chart.cpp')
-rw-r--r-- | tests/barstest/chart.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/barstest/chart.cpp b/tests/barstest/chart.cpp index c6c7678d..6ecd375a 100644 --- a/tests/barstest/chart.cpp +++ b/tests/barstest/chart.cpp @@ -1052,7 +1052,7 @@ void GraphModifier::useLogAxis() { static int counter = -1; static QLogValue3DAxisFormatter *logFormatter = new QLogValue3DAxisFormatter; - + static float minRange = 1.0f; counter++; switch (counter) { @@ -1060,13 +1060,13 @@ void GraphModifier::useLogAxis() qDebug() << "Case" << counter << ": Default log axis"; logFormatter = new QLogValue3DAxisFormatter; m_graph->valueAxis()->setFormatter(logFormatter); - m_graph->valueAxis()->setRange(1.0f, 1200.0f); + m_graph->valueAxis()->setRange(minRange, 1200.0f); m_graph->valueAxis()->setLabelFormat(QStringLiteral("%.3f")); break; } case 1: { qDebug() << "Case" << counter << ": Hide max label"; - logFormatter->setShowMaxLabel(false); + logFormatter->setShowEdgeLabels(false); break; } case 2: { @@ -1124,6 +1124,7 @@ void GraphModifier::useLogAxis() } default: qDebug() << "Resetting logaxis test"; + minRange++; counter = -1; break; } |