From 050cd642c1de34d8a93f73363015cbd3858c5f9c Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Fri, 20 Sep 2013 09:18:51 +0300 Subject: Fix docs about data window MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I6b7721332fadf39515cad55640ddb99f92312dd8 Reviewed-by: Tomi Korpipää --- src/datavisualization/axis/q3dcategoryaxis.cpp | 2 +- src/datavisualization/data/qsurfacedataproxy.cpp | 3 ++- .../doc/snippets/doc_src_q3dbars_construction.cpp | 3 ++- src/datavisualization/engine/q3dbars.cpp | 7 ++++--- 4 files changed, 9 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/datavisualization/axis/q3dcategoryaxis.cpp b/src/datavisualization/axis/q3dcategoryaxis.cpp index 3f032534..fec2442c 100644 --- a/src/datavisualization/axis/q3dcategoryaxis.cpp +++ b/src/datavisualization/axis/q3dcategoryaxis.cpp @@ -30,7 +30,7 @@ QT_DATAVISUALIZATION_BEGIN_NAMESPACE * \since 1.0.0 * * Q3DCategoryAxis provides an axis that can be given labels. The axis is divided into equal-sized - * categories based on \l {Q3DBars::setDataWindow()}{data window} size. + * categories based on the data window size defined by setting the axis range. * * Grid lines are drawn between categories, if visible. Labels are drawn to positions of categories * if provided. diff --git a/src/datavisualization/data/qsurfacedataproxy.cpp b/src/datavisualization/data/qsurfacedataproxy.cpp index b3f50659..8471bb7e 100644 --- a/src/datavisualization/data/qsurfacedataproxy.cpp +++ b/src/datavisualization/data/qsurfacedataproxy.cpp @@ -147,7 +147,8 @@ void QSurfaceDataProxy::resetArray(QSurfaceDataArray *newArray) * to further modify data after QSurfaceDataProxy assumes ownership of it, as such modifications will * not trigger proper signals. * Passing null array clears all data. - * Row and column ranges are set to values defined by the rest of the parameters. + * Row and column ranges are set to values defined by the rest of the parameters: \a minValueRows, + * \a maxValueRows, \a minValueColumns, and \a maxValueColumns. */ void QSurfaceDataProxy::resetArray(QSurfaceDataArray *newArray, qreal minValueRows, qreal maxValueRows, qreal minValueColumns, diff --git a/src/datavisualization/doc/snippets/doc_src_q3dbars_construction.cpp b/src/datavisualization/doc/snippets/doc_src_q3dbars_construction.cpp index 7e5e63e7..17abfd46 100644 --- a/src/datavisualization/doc/snippets/doc_src_q3dbars_construction.cpp +++ b/src/datavisualization/doc/snippets/doc_src_q3dbars_construction.cpp @@ -27,7 +27,8 @@ int main(int argc, char **argv) //! [0] Q3DBars *bars = new Q3DBars(); - bars->setDataWindow(5, 5); + bars->rowAxis()->setRange(0, 4); + bars->columnAxis()->setRange(0, 4); //! [0] //! [1] QBarDataRow data; diff --git a/src/datavisualization/engine/q3dbars.cpp b/src/datavisualization/engine/q3dbars.cpp index d2f8e396..15f8cc32 100644 --- a/src/datavisualization/engine/q3dbars.cpp +++ b/src/datavisualization/engine/q3dbars.cpp @@ -54,9 +54,10 @@ QT_DATAVISUALIZATION_BEGIN_NAMESPACE * * \section1 How to construct a minimal Q3DBars chart * - * After constructing Q3DBars, you should set data window using setDataWindow(). It is not - * mandatory, as data window has default value of 10 x 10. For the example, let's set the data - * window to 5 rows and 5 columns: + * After constructing Q3DBars, you can set the data window by changing the range on the row and + * column axes. It is not mandatory, as data window will default to showing all of the data in + * the data proxy. If the amount of data is large, it is usually preferable to show just a + * portion of it. For the example, let's set the data window to show first five rows and columns: * * \snippet doc_src_q3dbars_construction.cpp 0 * -- cgit v1.2.3