From 177f9d385c8cd062c4bad78cf6b794a96fa025ad Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Tue, 21 Jan 2014 08:55:03 +0200 Subject: Selection correction for scatter when data changes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Implements item 3) in QTRD-2645 Task-number: QTRD-264 Change-Id: Ibe758bbfb3b4a74b55589a410b402bbdf07ea64f Reviewed-by: Tomi Korpipää --- examples/itemmodel/main.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'examples/itemmodel/main.cpp') diff --git a/examples/itemmodel/main.cpp b/examples/itemmodel/main.cpp index 46824993..bdecd1a5 100644 --- a/examples/itemmodel/main.cpp +++ b/examples/itemmodel/main.cpp @@ -84,17 +84,18 @@ GraphDataGenerator::GraphDataGenerator(Q3DBars *bargraph, QTableWidget *tableWid #ifndef USE_STATIC_DATA // Set up sample space; make it as deep as it's wide - m_graph->setDataWindow(m_rowCount, m_columnCount); + m_graph->rowAxis()->setRange(0, m_rowCount); + m_graph->columnAxis()->setRange(0, m_columnCount); m_tableWidget->setColumnCount(m_columnCount); // Set selection mode to full m_graph->setSelectionMode(QAbstract3DGraph::SelectionItemRowAndColumn); // Hide axis labels by explicitly setting one empty string as label list - m_graph->rowAxis()->setCategoryLabels(QStringList(QString())); - m_graph->columnAxis()->setCategoryLabels(QStringList(QString())); + m_graph->rowAxis()->setLabels(QStringList(QString())); + m_graph->columnAxis()->setLabels(QStringList(QString())); - m_graph->activeDataProxy()->setItemLabelFormat(QStringLiteral("@valueLabel")); + m_graph->seriesList().at(0)->setItemLabelFormat(QStringLiteral("@valueLabel")); #else //! [6] -- cgit v1.2.3