diff options
author | Tomi Korpipää <tomi.korpipaa@digia.com> | 2013-09-12 07:58:26 +0300 |
---|---|---|
committer | Tomi Korpipää <tomi.korpipaa@digia.com> | 2013-09-12 08:26:00 +0300 |
commit | 2dc1b3809943e3d294e2363a2b0d185607b8854f (patch) | |
tree | d077d9ee51d9df83adc38b65fab3fc3da6462dcc /src | |
parent | d93f5f3b64fdb52cc150232f6b6d80ffdb57db78 (diff) |
QML documentation
Task-number: QTRD-2133
Change-Id: I2568b3cd6e83ee933536d7fec2e48f9f121b213e
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Diffstat (limited to 'src')
25 files changed, 974 insertions, 47 deletions
diff --git a/src/datavisualization/axis/q3dabstractaxis.cpp b/src/datavisualization/axis/q3dabstractaxis.cpp index 67f4f5fc..ce3b582f 100644 --- a/src/datavisualization/axis/q3dabstractaxis.cpp +++ b/src/datavisualization/axis/q3dabstractaxis.cpp @@ -33,6 +33,33 @@ QT_DATAVISUALIZATION_BEGIN_NAMESPACE */ /*! + * \qmltype AbstractAxis3D + * \instantiates Q3DAbstractAxis + * + * You should not need to use this type directly. + */ + +/*! + * \qmlproperty string AbstractAxis3D::title + * Defines the title for the axis. + */ + +/*! + * \qmlproperty list AbstractAxis3D::labels + * Defines the labels for the axis. + */ + +/*! + * \qmlproperty AbstractAxis3D.AxisOrientation AbstractAxis3D::orientation + * Defines the orientation of the axis. + */ + +/*! + * \qmlproperty AbstractAxis3D.AxisType AbstractAxis3D::type + * Defines the type of the axis. + */ + +/*! * \enum Q3DAbstractAxis::AxisOrientation * * The orientation of the axis object. diff --git a/src/datavisualization/axis/q3dcategoryaxis.cpp b/src/datavisualization/axis/q3dcategoryaxis.cpp index 90a7ff45..57c545c8 100644 --- a/src/datavisualization/axis/q3dcategoryaxis.cpp +++ b/src/datavisualization/axis/q3dcategoryaxis.cpp @@ -37,6 +37,21 @@ QT_DATAVISUALIZATION_BEGIN_NAMESPACE */ /*! + * \qmltype CategoryAxis3D + * \instantiates Q3DCategoryAxis + * \inherits AbstractAxis3D + * + * This type provides an axis that can be given labels. + */ + +/*! + * \qmlproperty list CategoryAxis3D::categoryLabels + * Defines labels for axis applied to categories. If there are fewer labels than categories, the + * remaining ones do not have a label. If category labels are not explicitly defined, labels are + * generated from the data row and column labels. + */ + +/*! * Constructs Q3DCategoryAxis with \a parent. */ Q3DCategoryAxis::Q3DCategoryAxis(QObject *parent) : diff --git a/src/datavisualization/axis/q3dvalueaxis.cpp b/src/datavisualization/axis/q3dvalueaxis.cpp index a17fef69..fb430428 100644 --- a/src/datavisualization/axis/q3dvalueaxis.cpp +++ b/src/datavisualization/axis/q3dvalueaxis.cpp @@ -37,6 +37,61 @@ QT_DATAVISUALIZATION_BEGIN_NAMESPACE */ /*! + * \qmltype ValueAxis3D + * \instantiates Q3DValueAxis + * \inherits AbstractAxis3D + * + * This type provides an axis that can be given a range of values and segment and subsegment + * counts to divide the range into. + */ + +/*! + * \qmlproperty real ValueAxis3D::min + * + * Defines the minimum value on the axis. + * When setting this property the max is adjusted if necessary, to ensure that the range remains + * valid. + */ + +/*! + * \qmlproperty real ValueAxis3D::max + * + * Defines the maximum value on the axis. + * When setting this property the min is adjusted if necessary, to ensure that the range remains + * valid. + */ + +/*! + * \qmlproperty int ValueAxis3D::segmentCount + * + * Defines the number of segments on the axis. This indicates how many labels are drawn. The number + * of grid lines to be drawn is calculated with formula: \c {segments * subsegments + 1}. + * The preset default is \c 5, and it can not be below \c 1. + */ + +/*! + * \qmlproperty int ValueAxis3D::subSegmentCount + * + * Defines the number of subsegments inside each segment on the axis. Grid lines are drawn between + * each subsegment, in addition to each segment. + * The preset default is \c 1, and it can not be below \c 1. + */ + +/*! + * \qmlproperty bool ValueAxis3D::autoAdjustRange + * + * Determines if the axis is to automatically calculate the range instead of setting range or + * adjusting min or max property. + */ + +/*! + * \qmlproperty string ValueAxis3D::labelFormat + * + * Defines the label format to be used for the labels on this axis. Supported specifiers are: + * \c {d, i, o, x, X, f, F, e, E, g, G, c}. See QString::sprintf() for additional details. + */ + +/*! * Constructs Q3DValueAxis with the given \a parent. */ Q3DValueAxis::Q3DValueAxis(QObject *parent) : @@ -133,7 +188,7 @@ int Q3DValueAxis::segmentCount() const * The preset default is \c 1, and it can not be below \c 1. * * \sa setSegmentCount() - **/ + */ void Q3DValueAxis::setSubSegmentCount(int count) { if (count <= 0) { diff --git a/src/datavisualization/data/qabstractdataproxy.cpp b/src/datavisualization/data/qabstractdataproxy.cpp index 19eac436..9267e93e 100644 --- a/src/datavisualization/data/qabstractdataproxy.cpp +++ b/src/datavisualization/data/qabstractdataproxy.cpp @@ -32,6 +32,24 @@ QT_DATAVISUALIZATION_BEGIN_NAMESPACE */ /*! + * \qmltype AbstractDataProxy + * \instantiates QAbstractDataProxy + */ + +/*! + * \qmlproperty AbstractDataProxy.DataType AbstractDataProxy::type + * The type of the proxy. + */ + +/*! + * \qmlproperty string AbstractDataProxy::itemLabelFormat + * + * Label format for data items in this proxy. This format is used for single item labels, + * e.g. when an item is selected. How the format is interpreted depends on proxy type. See + * each proxy class documentation for more information. + */ + +/*! * \enum QAbstractDataProxy::DataType * * Data type of the proxy. @@ -64,6 +82,8 @@ QAbstractDataProxy::~QAbstractDataProxy() /*! * \property QAbstractDataProxy::type + * + * The type of the proxy. */ QAbstractDataProxy::DataType QAbstractDataProxy::type() const { diff --git a/src/datavisualization/data/qbardataproxy.cpp b/src/datavisualization/data/qbardataproxy.cpp index 418bb747..79821aca 100644 --- a/src/datavisualization/data/qbardataproxy.cpp +++ b/src/datavisualization/data/qbardataproxy.cpp @@ -71,6 +71,33 @@ QT_DATAVISUALIZATION_BEGIN_NAMESPACE */ /*! + * \qmltype BarDataProxy + * \instantiates QBarDataProxy + * \inherits AbstractDataProxy + * + * This type handles adding, inserting, changing and removing rows of data with Qt Quick 2. + */ + +/*! + * \qmlproperty int BarDataProxy::rowCount + * Row count in the array. + */ + +/*! + * \qmlproperty list BarDataProxy::rowLabels + * + * Optional row labels for the array. Indexes in this array match row indexes in data array. + * If the list is shorter than row count, all rows will not get labels. + */ + +/*! + * \qmlproperty list BarDataProxy::columnLabels + * + * Optional column labels for the array. Indexes in this array match column indexes in rows. + * If the list is shorter than the longest row, all columns will not get labels. + */ + +/*! * Constructs QBarDataProxy with the given \a parent. */ QBarDataProxy::QBarDataProxy(QObject *parent) : @@ -304,7 +331,6 @@ int QBarDataProxy::rowCount() const * Optional row labels for the array. Indexes in this array match row indexes in data array. * If the list is shorter than row count, all rows will not get labels. */ - QStringList QBarDataProxy::rowLabels() const { return dptrc()->m_rowLabels; diff --git a/src/datavisualization/data/qitemmodelbardatamapping.cpp b/src/datavisualization/data/qitemmodelbardatamapping.cpp index 4577a614..2c47bda4 100644 --- a/src/datavisualization/data/qitemmodelbardatamapping.cpp +++ b/src/datavisualization/data/qitemmodelbardatamapping.cpp @@ -47,6 +47,45 @@ QT_DATAVISUALIZATION_BEGIN_NAMESPACE */ /*! + * \qmltype BarDataMapping + * \instantiates QItemModelBarDataMapping + * + * This type is used to map roles of AbstractItemModel to rows, columns, and values of Bars3D. For + * more complete description, see QItemModelBarDataMapping. + * + * Usage example: + * + * \snippet doc_src_qmldatavisualization.cpp 4 + * + * \sa ItemModelBarDataProxy + */ + +/*! + * \qmlproperty string BarDataMapping::rowRole + * The row role of the mapping. + */ + +/*! + * \qmlproperty string BarDataMapping::columnRole + * The column role of the mapping. + */ + +/*! + * \qmlproperty string BarDataMapping::valueRole + * The value role of the mapping. + */ + +/*! + * \qmlproperty list BarDataMapping::rowCategories + * The row categories of the mapping. + */ + +/*! + * \qmlproperty list BarDataMapping::columnCategories + * The column categories of the mapping. + */ + +/*! * Constructs QItemModelBarDataMapping with the given \a parent. */ QItemModelBarDataMapping::QItemModelBarDataMapping(QObject *parent) diff --git a/src/datavisualization/data/qitemmodelbardataproxy.cpp b/src/datavisualization/data/qitemmodelbardataproxy.cpp index 49905be5..7c989aef 100644 --- a/src/datavisualization/data/qitemmodelbardataproxy.cpp +++ b/src/datavisualization/data/qitemmodelbardataproxy.cpp @@ -36,6 +36,31 @@ QT_DATAVISUALIZATION_BEGIN_NAMESPACE */ /*! + * \qmltype ItemModelBarDataProxy + * \instantiates QItemModelBarDataProxy + * \inherits BarDataProxy + * + * This type allows you to use AbstractItemModel derived models as a data source for Bars3D. + * + * Usage example: + * + * \snippet doc_src_qmldatavisualization.cpp 7 + * + * \sa BarDataProxy, BarDataMapping + */ + +/*! + * \qmlproperty list ItemModelBarDataProxy::itemModel + * The item model. + */ + +/*! + * \qmlproperty list ItemModelBarDataProxy::activeMapping + * The active mapping. Modifying a mapping that is set to the proxy will trigger data set + * re-resolving. + */ + +/*! * Constructs QItemModelBarDataProxy. */ QItemModelBarDataProxy::QItemModelBarDataProxy() : diff --git a/src/datavisualization/data/qitemmodelscatterdatamapping.cpp b/src/datavisualization/data/qitemmodelscatterdatamapping.cpp index 1243c19e..4b2be700 100644 --- a/src/datavisualization/data/qitemmodelscatterdatamapping.cpp +++ b/src/datavisualization/data/qitemmodelscatterdatamapping.cpp @@ -43,6 +43,35 @@ QT_DATAVISUALIZATION_BEGIN_NAMESPACE */ /*! + * \qmltype ScatterDataMapping + * \instantiates QItemModelScatterDataMapping + * + * This type is used to map roles of AbstractItemModel to the XYZ-values of Scatter3D points. For + * more complete description, see QItemModelScatterDataMapping. + * + * Usage example: + * + * \snippet doc_src_qmldatavisualization.cpp 5 + * + * \sa ItemModelScatterDataProxy + */ + +/*! + * \qmlproperty string ScatterDataMapping::xPosRole + * The X position role of the mapping. + */ + +/*! + * \qmlproperty string ScatterDataMapping::yPosRole + * The Y position role of the mapping. + */ + +/*! + * \qmlproperty string ScatterDataMapping::zPosRole + * The Z position role of the mapping. + */ + +/*! * Constructs QItemModelScatterDataMapping with the given \a parent. */ QItemModelScatterDataMapping::QItemModelScatterDataMapping(QObject *parent) diff --git a/src/datavisualization/data/qitemmodelscatterdataproxy.cpp b/src/datavisualization/data/qitemmodelscatterdataproxy.cpp index d647e5bc..df94483a 100644 --- a/src/datavisualization/data/qitemmodelscatterdataproxy.cpp +++ b/src/datavisualization/data/qitemmodelscatterdataproxy.cpp @@ -33,6 +33,31 @@ QT_DATAVISUALIZATION_BEGIN_NAMESPACE */ /*! + * \qmltype ItemModelScatterDataProxy + * \instantiates QItemModelScatterDataProxy + * \inherits ScatterDataProxy + * + * This type allows you to use AbstractItemModel derived models as a data source for Scatter3D. + * + * Usage example: + * + * \snippet doc_src_qmldatavisualization.cpp 8 + * + * \sa ScatterDataProxy, ScatterDataMapping + */ + +/*! + * \qmlproperty list ItemModelScatterDataProxy::itemModel + * The item model. + */ + +/*! + * \qmlproperty list ItemModelScatterDataProxy::activeMapping + * The active mapping. Modifying a mapping that is set to the proxy will trigger data set + * re-resolving. + */ + +/*! * Constructs QItemModelScatterDataProxy. */ QItemModelScatterDataProxy::QItemModelScatterDataProxy() : diff --git a/src/datavisualization/data/qitemmodelsurfacedatamapping.cpp b/src/datavisualization/data/qitemmodelsurfacedatamapping.cpp index 4b90f320..79f310ea 100644 --- a/src/datavisualization/data/qitemmodelsurfacedatamapping.cpp +++ b/src/datavisualization/data/qitemmodelsurfacedatamapping.cpp @@ -32,6 +32,45 @@ QT_DATAVISUALIZATION_BEGIN_NAMESPACE */ /*! + * \qmltype SurfaceDataMapping + * \instantiates QItemModelSurfaceDataMapping + * + * This type is used to map roles of AbstractItemModel to rows, columns, and values of Surface3D. + * For more complete description, see QItemModelSurfaceDataMapping. + * + * Usage example: + * + * \snippet doc_src_qmldatavisualization.cpp 6 + * + * \sa ItemModelSurfaceDataProxy + */ + +/*! + * \qmlproperty string SurfaceDataMapping::rowRole + * The row role of the mapping. + */ + +/*! + * \qmlproperty string SurfaceDataMapping::columnRole + * The column role of the mapping. + */ + +/*! + * \qmlproperty string SurfaceDataMapping::valueRole + * The value role of the mapping. + */ + +/*! + * \qmlproperty list SurfaceDataMapping::rowCategories + * The row categories of the mapping. + */ + +/*! + * \qmlproperty list SurfaceDataMapping::columnCategories + * The column categories of the mapping. + */ + +/*! * Constructs QItemModelSurfaceDataMapping with the given \a parent. */ QItemModelSurfaceDataMapping::QItemModelSurfaceDataMapping(QObject *parent) diff --git a/src/datavisualization/data/qitemmodelsurfacedataproxy.cpp b/src/datavisualization/data/qitemmodelsurfacedataproxy.cpp index 4e85542b..77eb571a 100644 --- a/src/datavisualization/data/qitemmodelsurfacedataproxy.cpp +++ b/src/datavisualization/data/qitemmodelsurfacedataproxy.cpp @@ -35,6 +35,31 @@ QT_DATAVISUALIZATION_BEGIN_NAMESPACE */ /*! + * \qmltype ItemModelSurfaceDataProxy + * \instantiates QItemModelSurfaceDataProxy + * \inherits SurfaceDataProxy + * + * This type allows you to use AbstractItemModel derived models as a data source for Surface3D. + * + * Usage example: + * + * \snippet doc_src_qmldatavisualization.cpp 9 + * + * \sa SurfaceDataProxy, SurfaceDataMapping + */ + +/*! + * \qmlproperty list ItemModelSurfaceDataProxy::itemModel + * The item model. + */ + +/*! + * \qmlproperty list ItemModelSurfaceDataProxy::activeMapping + * The active mapping. Modifying a mapping that is set to the proxy will trigger data set + * re-resolving. + */ + +/*! * Constructs QItemModelSurfaceDataProxy. */ QItemModelSurfaceDataProxy::QItemModelSurfaceDataProxy() : diff --git a/src/datavisualization/data/qscatterdataproxy.cpp b/src/datavisualization/data/qscatterdataproxy.cpp index 27fa3aca..f020ac12 100644 --- a/src/datavisualization/data/qscatterdataproxy.cpp +++ b/src/datavisualization/data/qscatterdataproxy.cpp @@ -55,6 +55,19 @@ QT_DATAVISUALIZATION_BEGIN_NAMESPACE */ /*! + * \qmltype ScatterDataProxy + * \instantiates QScatterDataProxy + * \inherits AbstractDataProxy + * + * This type handles adding, inserting, changing and removing data items. + */ + +/*! + * \qmlproperty int ScatterDataProxy::itemCount + * Item count in the array. + */ + +/*! * Constructs QScatterDataProxy with the given \a parent. */ QScatterDataProxy::QScatterDataProxy(QObject *parent) : diff --git a/src/datavisualization/data/qsurfacedataproxy.cpp b/src/datavisualization/data/qsurfacedataproxy.cpp index 2bf8af8b..a1c4b534 100644 --- a/src/datavisualization/data/qsurfacedataproxy.cpp +++ b/src/datavisualization/data/qsurfacedataproxy.cpp @@ -32,6 +32,19 @@ QT_DATAVISUALIZATION_BEGIN_NAMESPACE */ /*! + * \qmltype SurfaceDataProxy + * \instantiates QSurfaceDataProxy + * \inherits AbstractDataProxy + * + * DOCUMENTATION GOES HERE TOO + */ + +/*! + * \qmlproperty int SurfaceDataProxy::itemCount + * Item count in the array. + */ + +/*! * Constructs QSurfaceDataProxy with the given \a parent. */ QSurfaceDataProxy::QSurfaceDataProxy(QObject *parent) : diff --git a/src/datavisualization/doc/snippets/doc_src_qmldatavisualization.cpp b/src/datavisualization/doc/snippets/doc_src_qmldatavisualization.cpp new file mode 100644 index 00000000..12496168 --- /dev/null +++ b/src/datavisualization/doc/snippets/doc_src_qmldatavisualization.cpp @@ -0,0 +1,123 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use contact form at http://qt.digia.com +** +** This file is part of the QtDataVisualization module. +** +** Licensees holding valid Qt Enterprise licenses may use this file in +** accordance with the Qt Enterprise License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** contact form at http://qt.digia.com +** +****************************************************************************/ + +//! [0] +import com.digia.QtDataVisualization 1.0 +//! [0] + +//! [1] +Bars3D { + rows: 4 + columns: 4 + dataProxy: barProxy // an ItemModelBarDataProxy + barSpacing: Qt.size(0.5, 0.5) + barSpacingRelative: false + itemLabelFormat: "@valueTitle for @colLabel, @rowLabel: @valueLabel" +} +//! [1] + +//! [2] +Scatter3D { + dataProxy: scatterProxy // an ItemModelScatterDataProxy + itemLabelFormat: "X:@xLabel Y:@yLabel Z:@zLabel" + axisX.segmentCount: 2 + axisX.subSegmentCount: 2 + axisX.labelFormat: "%.2f" + axisZ.segmentCount: 2 + axisZ.subSegmentCount: 2 + axisZ.labelFormat: "%.2f" + axisY.segmentCount: 3 + axisY.subSegmentCount: 2 + axisY.labelFormat: "%.2f" +} +//! [2] + +//! [3] +Surface3D { + dataProxy: surfaceProxy // an ItemModelSurfaceDataProxy + axisX.min: 0.0 + axisX.max: 10.0 + axisZ.min: 0.0 + axisZ.max: 10.0 + axisY.min: 0.0 + axisY.max: 5.0 + axisX.segmentCount: 5 + axisX.subSegmentCount: 2 + axisX.labelFormat: "%i" + axisZ.segmentCount: 5 + axisZ.subSegmentCount: 2 + axisZ.labelFormat: "%i" + axisY.segmentCount: 5 + axisY.labelFormat: "%.1f" +} +//! [3] + +//! [4] +BarDataMapping { + id: barMapping + rowRole: "year" + columnRole: "city" + valueRole: "expenses" + rowCategories: ["2010", "2011", "2012", "2013"] + columnCategories: ["Oulu", "Rauma", "Helsinki", "Tampere"] +} +//! [4] + +//! [5] +ScatterDataMapping { + id: scatterMapping + xPosRole: "xPos" + yPosRole: "yPos" + zPosRole: "zPos" +} +//! [5] + +//! [6] +SurfaceDataMapping { + id: surfaceMapping + rowRole: "latitude" + columnRole: "longitude" + valueRole: "population" + rowCategories: ["64.5", "64.6", "64.7", "64.8", "64.9", "65.0", "65.1", "65.2", "65.3", "65.4"] + columnCategories: ["24.5", "24.75", "25.0", "25.25", "25.5", "25.75", "26.0", "26.25", "26.5", "26.75"] +} +//! [6] + +//! [7] +ItemModelBarDataProxy { + id: barProxy + activeMapping: barMapping // a BarDataMapping + itemModel: dataModel // a ListModel +} +//! [7] + +//! [8] +ItemModelScatterDataProxy { + id: scatterProxy + activeMapping: scatterMapping // a ScatterDataMapping + itemModel: dataModel // a ListModel +} +//! [8] + +//! [9] +ItemModelSurfaceDataProxy { + id: surfaceProxy + activeMapping: surfaceMapping // a SurfaceDataMapping + itemModel: dataModel // a ListModel +} +//! [9] diff --git a/src/datavisualization/doc/src/qtdatavisualization-index.qdoc b/src/datavisualization/doc/src/qtdatavisualization-index.qdoc index d3afaf3b..843df153 100644 --- a/src/datavisualization/doc/src/qtdatavisualization-index.qdoc +++ b/src/datavisualization/doc/src/qtdatavisualization-index.qdoc @@ -52,6 +52,7 @@ \li \l{Barchart Example} \li \l{Qt Quick 2 Barchart Example} \li \l{Qt Quick 2 Scatter Example} + \li \l{Qt Quick 2 Surface Example} \li \l{Rainfall Example} \li \l{Scatter Chart Example} \li \l{Audiolevels Example} diff --git a/src/datavisualization/engine/q3dbars.cpp b/src/datavisualization/engine/q3dbars.cpp index ee741aed..8e281339 100644 --- a/src/datavisualization/engine/q3dbars.cpp +++ b/src/datavisualization/engine/q3dbars.cpp @@ -89,6 +89,153 @@ QT_DATAVISUALIZATION_BEGIN_NAMESPACE */ /*! + * \qmltype Bars3D + * \instantiates Q3DBars + * + * This type enables developers to render bar graphs in 3D with Qt Quick 2. + * + * You will need to import data visualization module to use this type: + * + * \snippet doc_src_qmldatavisualization.cpp 0 + * + * After that you can use Bars3D in your qml files: + * + * \snippet doc_src_qmldatavisualization.cpp 1 + * + * See \l{Qt Quick 2 Barchart Example} for more thorough usage example. + * + * \sa ItemModelBarDataProxy, Scatter3D, Surface3D, {Qt Data Visualization C++ Classes} + */ + +/*! + * \qmlproperty BarDataProxy Bars3D::dataProxy + * The active data proxy. + * + * If a proxy is not given, a temporary default proxy is created and activated. + * This temporary proxy is destroyed if another proxy is explicitly set active via this property. + */ + +/*! + * \qmlproperty CategoryAxis3D Bars3D::rowAxis + * A user-defined row axis. + * + * If an axis is not given, a temporary default axis with no labels is created. + * This temporary axis is destroyed if another axis is explicitly set to same orientation. + */ + +/*! + * \qmlproperty ValueAxis3D Bars3D::valueAxis + * A user-defined value axis. + * + * If an axis is not given, a temporary default axis with no labels and automatically adjusting + * range is created. + * This temporary axis is destroyed if another axis is explicitly set to same orientation. + */ + +/*! + * \qmlproperty CategoryAxis3D Bars3D::columnAxis + * A user-defined column axis. + * + * If an axis is not given, a temporary default axis with no labels is created. + * This temporary axis is destroyed if another axis is explicitly set to same orientation. + */ + +/*! + * \qmlproperty Bars3D.SelectionMode Bars3D::selectionMode + * Bar selection mode. + */ + +/*! + * \qmlproperty Bars3D.LabelTransparency Bars3D::labelTransparency + * Label transparency. + */ + +/*! + * \qmlproperty Bars3D.ShadowQuality Bars3D::shadowQuality + * Shadow quality. + */ + +/*! + * \qmlproperty Bars3D.MeshStyle Bars3D::barType + * Bar object type. + */ + +/*! + * \qmlproperty Bars3D.CameraPreset Bars3D::cameraPreset + * Camera preset. + */ + +/*! + * \qmlproperty Bars3D.ColorTheme Bars3D::theme + * Theme of the graph. Theme affects bar colors, label colors, text color, background color, window + * color and grid color. Lighting is also adjusted by themes. + */ + +/*! + * \qmlproperty real Bars3D::barThickness + * Bar thickness ratio between X and Z dimensions. 1.0 means bars are as wide as they are deep, 0.5 + * makes them twice as deep as they are wide. + */ + +/*! + * \qmlproperty size Bars3D::barSpacing + * Bar spacing in X and Z dimensions. + */ + +/*! + * \qmlproperty bool Bars3D::barSpacingRelative + * Relative or absolute bar spacing. + */ + +/*! + * \qmlproperty bool Bars3D::barSmoothingEnabled + * Bar smoothing. If false, bar shading is flat. + */ + +/*! + * \qmlproperty string Bars3D::meshFileName + * Override bar type with a mesh object. + * \note Object needs to be in Wavefront obj format and include vertices, normals and UVs. + * It also needs to be in triangles. + */ + +/*! + * \qmlproperty font Bars3D::font + * Font used for labels. + */ + +/*! + * \qmlproperty bool Bars3D::gridVisible + * Grid visibility. If false, grid lines are not drawn. + */ + +/*! + * \qmlproperty bool Bars3D::backgroundVisible + * Background visibility. If false, background is not drawn. + */ + +/*! + * \qmlproperty int Bars3D::rows + * Row count of data window. + */ + +/*! + * \qmlproperty int Bars3D::columns + * Column count of data window. + */ + +/*! + * \qmlproperty string Bars3D::itemLabelFormat + * Label format of single item labels, e.g. a selected bar. + */ + +/*! + * \qmlproperty point Bars3D::selectedBarPos + * Position of the selected bar, if any. Only one bar can be selected at a time. + * To clear selection, specify an illegal position, e.g. Qt.point(-1.0, -1.0). + */ + +/*! * Constructs a new 3D bar window. */ Q3DBars::Q3DBars() diff --git a/src/datavisualization/engine/q3dscatter.cpp b/src/datavisualization/engine/q3dscatter.cpp index e9f467f6..f034b816 100644 --- a/src/datavisualization/engine/q3dscatter.cpp +++ b/src/datavisualization/engine/q3dscatter.cpp @@ -81,6 +81,123 @@ QT_DATAVISUALIZATION_BEGIN_NAMESPACE */ /*! + * \qmltype Scatter3D + * \instantiates Q3DScatter + * + * This type enables developers to render scatter graphs in 3D with Qt Quick 2. + * + * You will need to import data visualization module to use this type: + * + * \snippet doc_src_qmldatavisualization.cpp 0 + * + * After that you can use Scatter3D in your qml files: + * + * \snippet doc_src_qmldatavisualization.cpp 2 + * + * See \l{Qt Quick 2 Scatter Example} for more thorough usage example. + * + * \sa ItemModelScatterDataProxy, Bars3D, Surface3D, {Qt Data Visualization C++ Classes} + */ + +/*! + * \qmlproperty ScatterDataProxy Scatter3D::dataProxy + * The active data proxy. + * + * If a proxy is not given, a temporary default proxy is created and activated. + * This temporary proxy is destroyed if another proxy is explicitly set active via this property. + */ + +/*! + * \qmlproperty ValueAxis3D Scatter3D::axisX + * A user-defined X axis. + * + * If an axis is not given, a temporary default axis with no labels and automatically adjusting + * range is created. + * This temporary axis is destroyed if another axis is explicitly set to same orientation. + */ + +/*! + * \qmlproperty ValueAxis3D Scatter3D::axisY + * A user-defined Y axis. + * + * If an axis is not given, a temporary default axis with no labels and automatically adjusting + * range is created. + * This temporary axis is destroyed if another axis is explicitly set to same orientation. + */ + +/*! + * \qmlproperty ValueAxis3D Scatter3D::axisZ + * A user-defined Z axis. + * + * If an axis is not given, a temporary default axis with no labels and automatically adjusting + * range is created. + * This temporary axis is destroyed if another axis is explicitly set to same orientation. + */ + +/*! + * \qmlproperty Scatter3D.SelectionMode Scatter3D::selectionMode + * Dot selection mode. + */ + +/*! + * \qmlproperty Scatter3D.LabelTransparency Scatter3D::labelTransparency + * Label transparency. + */ + +/*! + * \qmlproperty Scatter3D.ShadowQuality Scatter3D::shadowQuality + * Shadow quality. + */ + +/*! + * \qmlproperty Scatter3D.MeshStyle Scatter3D::objectType + * Dot object type. + */ + +/*! + * \qmlproperty Scatter3D.CameraPreset Scatter3D::cameraPreset + * Camera preset. + */ + +/*! + * \qmlproperty Scatter3D.ColorTheme Scatter3D::theme + * Theme of the graph. Theme affects bar colors, label colors, text color, background color, window + * color and grid color. Lighting is also adjusted by themes. + */ + +/*! + * \qmlproperty bool Scatter3D::objectSmoothingEnabled + * Dot smoothing. If false, dot shading is flat. + */ + +/*! + * \qmlproperty string Scatter3D::meshFileName + * Override object type with a mesh object. + * \note Object needs to be in Wavefront obj format and include vertices, normals and UVs. + * It also needs to be in triangles. + */ + +/*! + * \qmlproperty font Scatter3D::font + * Font used for labels. + */ + +/*! + * \qmlproperty bool Scatter3D::gridVisible + * Grid visibility. If false, grid lines are not drawn. + */ + +/*! + * \qmlproperty bool Scatter3D::backgroundVisible + * Background visibility. If false, background is not drawn. + */ + +/*! + * \qmlproperty string Scatter3D::itemLabelFormat + * Label format of single item labels, e.g. a selected bar. + */ + +/*! * Constructs a new 3D scatter window. */ Q3DScatter::Q3DScatter() diff --git a/src/datavisualization/engine/q3dsurface.cpp b/src/datavisualization/engine/q3dsurface.cpp index 647d761a..41d025b3 100644 --- a/src/datavisualization/engine/q3dsurface.cpp +++ b/src/datavisualization/engine/q3dsurface.cpp @@ -36,6 +36,119 @@ QT_DATAVISUALIZATION_BEGIN_NAMESPACE * \sa Q3DBars, Q3DScatter, {Qt Data Visualization C++ Classes} */ +/*! + * \qmltype Surface3D + * \instantiates Q3DSurface + * + * This type enables developers to render surface plots in 3D with Qt Quick 2. + * + * You will need to import data visualization module to use this type: + * + * \snippet doc_src_qmldatavisualization.cpp 0 + * + * After that you can use Surface3D in your qml files: + * + * \snippet doc_src_qmldatavisualization.cpp 3 + * + * See \l{Qt Quick 2 Surface Example} for more thorough usage example. + * + * \sa ItemModelSurfaceDataProxy, Bars3D, Scatter3D, {Qt Data Visualization C++ Classes} + */ + +/*! + * \qmlproperty SurfaceDataProxy Surface3D::dataProxy + * The active data proxy. + * + * If a proxy is not given, a temporary default proxy is created and activated. + * This temporary proxy is destroyed if another proxy is explicitly set active via this property. + */ + +/*! + * \qmlproperty ValueAxis3D Surface3D::axisX + * A user-defined X axis. + * + * If an axis is not given, a temporary default axis with no labels and automatically adjusting + * range is created. + * This temporary axis is destroyed if another axis is explicitly set to same orientation. + */ + +/*! + * \qmlproperty ValueAxis3D Surface3D::axisY + * A user-defined Y axis. + * + * If an axis is not given, a temporary default axis with no labels and automatically adjusting + * range is created. + * This temporary axis is destroyed if another axis is explicitly set to same orientation. + */ + +/*! + * \qmlproperty ValueAxis3D Surface3D::axisZ + * A user-defined Z axis. + * + * If an axis is not given, a temporary default axis with no labels and automatically adjusting + * range is created. + * This temporary axis is destroyed if another axis is explicitly set to same orientation. + */ + +/*! + * \qmlproperty Surface3D.SelectionMode Surface3D::selectionMode + * Bar selection mode. + */ + +/*! + * \qmlproperty Surface3D.LabelTransparency Surface3D::labelTransparency + * Label transparency. + */ + +/*! + * \qmlproperty Surface3D.ShadowQuality Surface3D::shadowQuality + * Shadow quality. + */ + +/*! + * \qmlproperty Surface3D.CameraPreset Surface3D::cameraPreset + * Camera preset. + */ + +/*! + * \qmlproperty Surface3D.ColorTheme Surface3D::theme + * Theme of the graph. Theme affects bar colors, label colors, text color, background color, window + * color and grid color. Lighting is also adjusted by themes. + */ + +/*! + * \qmlproperty font Surface3D::font + * Font used for labels. + */ + +/*! + * \qmlproperty bool Surface3D::gridVisible + * Axis grid visibility. If false, grid lines are not drawn. + */ + +/*! + * \qmlproperty bool Surface3D::backgroundVisible + * Background visibility. If false, background is not drawn. + */ + +/*! + * \qmlproperty bool Surface3D::smoothSurfaceEnabled + * Smoothing of surface. If false, shading of the surface is flat. + */ + +/*! + * \qmlproperty bool Surface3D::surfaceGridEnabled + * Surface grid visibility. If false, no surface grid is drawn. + */ + +/*! + * \qmlproperty string Surface3D::itemLabelFormat + * Label format of single item labels, e.g. a selected bar. + */ + +/*! + * Constructs a new 3D surface window. + */ Q3DSurface::Q3DSurface() : d_ptr(new Q3DSurfacePrivate(this, geometry())) { @@ -44,10 +157,16 @@ Q3DSurface::Q3DSurface() &Q3DWindow::renderLater); } +/*! + * Destroys the 3D surface window. + */ Q3DSurface::~Q3DSurface() { } +/*! + * \internal + */ void Q3DSurface::render() { d_ptr->m_shared->synchDataToRenderer(); @@ -55,36 +174,58 @@ void Q3DSurface::render() } #if defined(Q_OS_ANDROID) +/*! + * \internal + */ void Q3DSurface::mouseDoubleClickEvent(QMouseEvent *event) { Q_UNUSED(event) } + +/*! + * \internal + */ void Q3DSurface::touchEvent(QTouchEvent *event) { Q_UNUSED(event) } #endif +/*! + * \internal + */ void Q3DSurface::mousePressEvent(QMouseEvent *event) { d_ptr->m_shared->mousePressEvent(event, event->pos()); } +/*! + * \internal + */ void Q3DSurface::mouseReleaseEvent(QMouseEvent *event) { d_ptr->m_shared->mouseReleaseEvent(event, event->pos()); } +/*! + * \internal + */ void Q3DSurface::mouseMoveEvent(QMouseEvent *event) { d_ptr->m_shared->mouseMoveEvent(event, event->pos()); } +/*! + * \internal + */ void Q3DSurface::wheelEvent(QWheelEvent *event) { Q_UNUSED(event) } +/*! + * \internal + */ void Q3DSurface::resizeEvent(QResizeEvent *event) { Q_UNUSED(event); @@ -95,9 +236,7 @@ void Q3DSurface::resizeEvent(QResizeEvent *event) /*! * \property Q3DSurface::gridVisible * - * \a visible Flag to enable or disable grid. \c true by default. - * - * Sets grid drawing on or off. + * Sets grid visibility to \a visible. It is preset to \c true by default. */ void Q3DSurface::setGridVisible(bool visible) { @@ -112,9 +251,7 @@ bool Q3DSurface::isGridVisible() const /*! * \property Q3DSurface::backgroundVisible * - * \a visible Flag to enable or disable background. \c true by default. - * - * Sets backround rendering on or off. + * Sets background visibility to \a visible. It is preset to \c true by default. */ void Q3DSurface::setBackgroundVisible(bool visible) { @@ -126,41 +263,60 @@ bool Q3DSurface::isBackgroundVisible() const return d_ptr->m_shared->backgroundEnabled(); } -void Q3DSurface::setSmoothSurface(bool enable) +/*! + * \property Q3DSurface::smoothSurfaceEnabled + * + * Sets surface smoothing to \a enabled. It is preset to \c false by default. + */ +void Q3DSurface::setSmoothSurfaceEnabled(bool enabled) { - d_ptr->m_shared->setSmoothSurface(enable); + d_ptr->m_shared->setSmoothSurface(enabled); } -bool Q3DSurface::smoothSurface() const +bool Q3DSurface::isSmoothSurfaceEnabled() const { return d_ptr->m_shared->smoothSurface(); } -void Q3DSurface::setSurfaceGrid(bool enable) +/*! + * \property Q3DSurface::surfaceGridEnabled + * + * Sets surface grid to \a enabled. It is preset to \c true by default. + */ +void Q3DSurface::setSurfaceGridEnabled(bool enabled) { - d_ptr->m_shared->setSurfaceGrid(enable); + d_ptr->m_shared->setSurfaceGrid(enabled); } -bool Q3DSurface::surfaceGrid() const +bool Q3DSurface::isSurfaceGridEnabled() const { return d_ptr->m_shared->surfaceGrid(); } +/*! + * Sets window \a width. + */ void Q3DSurface::setWidth(const int width) { d_ptr->m_shared->setWidth(width); QWindow::setWidth(width); } +/*! + * Sets window \a height. + */ void Q3DSurface::setHeight(const int height) { d_ptr->m_shared->setHeight(height); QWindow::setHeight(height); } -/*! +/* TODO: REMOVE */ +/*! + * \internal + */ void Q3DSurface::setSegmentCount(int segmentCount, qreal step, qreal minimum) { d_ptr->m_shared->setSegmentCount(GLint(segmentCount), GLfloat(step), GLfloat(minimum)); @@ -275,6 +431,15 @@ QList<Q3DValueAxis *> Q3DSurface::axes() const return retList; } +/*! + * Sets the active data \a proxy. Implicitly calls addDataProxy() to transfer ownership of + * the \a proxy to this graph. + * + * If the \a proxy is null, a temporary default proxy is created and activated. + * This temporary proxy is destroyed if another \a proxy is explicitly set active via this method. + * + * \sa addDataProxy(), releaseDataProxy() + */ void Q3DSurface::setActiveDataProxy(QSurfaceDataProxy *proxy) { d_ptr->m_shared->setActiveDataProxy(proxy); @@ -288,16 +453,36 @@ QSurfaceDataProxy *Q3DSurface::activeDataProxy() const return static_cast<QSurfaceDataProxy *>(d_ptr->m_shared->activeDataProxy()); } +/*! + * Adds data \a proxy to the graph. The proxies added via addDataProxy are not yet taken to use, + * addDataProxy is simply used to give the ownership of the data \a proxy to the graph. + * The \a proxy must not be null or added to another graph. + * + * \sa releaseDataProxy(), setActiveDataProxy() + */ void Q3DSurface::addDataProxy(QSurfaceDataProxy *proxy) { d_ptr->m_shared->addDataProxy(proxy); } +/*! + * Releases the ownership of the data \a proxy back to the caller, if it is added to this graph. + * If the released \a proxy is in use, a new empty default proxy is created and taken to use. + * + * If the default \a proxy is released and added back later, it behaves as any other proxy would. + * + * \sa addDataProxy(), setActiveDataProxy() + */ void Q3DSurface::releaseDataProxy(QSurfaceDataProxy *proxy) { d_ptr->m_shared->releaseDataProxy(proxy); } +/*! + * \return list of all added data proxies. + * + * \sa addDataProxy() + */ QList<QSurfaceDataProxy *> Q3DSurface::dataProxies() const { QList<QSurfaceDataProxy *> retList; @@ -309,6 +494,9 @@ QList<QSurfaceDataProxy *> Q3DSurface::dataProxies() const } +/*! + * Sets gradient color to \a color at \a pos. + */ void Q3DSurface::setGradientColorAt(qreal pos, const QColor &color) { d_ptr->m_shared->setGradientColorAt(pos, color); diff --git a/src/datavisualization/engine/q3dsurface.h b/src/datavisualization/engine/q3dsurface.h index 5a458b67..79d03e36 100644 --- a/src/datavisualization/engine/q3dsurface.h +++ b/src/datavisualization/engine/q3dsurface.h @@ -33,8 +33,8 @@ class QT_DATAVISUALIZATION_EXPORT Q3DSurface : public Q3DWindow Q_OBJECT Q_PROPERTY(bool gridVisible READ isGridVisible WRITE setGridVisible) Q_PROPERTY(bool backgroundVisible READ isBackgroundVisible WRITE setBackgroundVisible) - Q_PROPERTY(bool smoothSurface READ smoothSurface WRITE setSmoothSurface) - Q_PROPERTY(bool surfaceGrid READ surfaceGrid WRITE setSurfaceGrid) + Q_PROPERTY(bool smoothSurfaceEnabled READ isSmoothSurfaceEnabled WRITE setSmoothSurfaceEnabled) + Q_PROPERTY(bool surfaceGridEnabled READ isSurfaceGridEnabled WRITE setSurfaceGridEnabled) public: explicit Q3DSurface(); @@ -49,12 +49,12 @@ public: bool isBackgroundVisible() const; // Enable or disable the smoothes of the surface - void setSmoothSurface(bool enable); - bool smoothSurface() const; + void setSmoothSurfaceEnabled(bool enabled); + bool isSmoothSurfaceEnabled() const; // Enable or disable the grid on the surface - void setSurfaceGrid(bool enable); - bool surfaceGrid() const; + void setSurfaceGridEnabled(bool enabled); + bool isSurfaceGridEnabled() const; void setGradientColorAt(qreal pos, const QColor &color); diff --git a/src/datavisualizationqml2/declarativebars.cpp b/src/datavisualizationqml2/declarativebars.cpp index 29d138e2..3da8e416 100644 --- a/src/datavisualizationqml2/declarativebars.cpp +++ b/src/datavisualizationqml2/declarativebars.cpp @@ -183,16 +183,16 @@ QDataVis::MeshStyle DeclarativeBars::barType() return QDataVis::Dots; } -void DeclarativeBars::setBarSmooth(bool smooth) +void DeclarativeBars::setBarSmoothingEnabled(bool enabled) { QString objFile = m_shared->meshFileName(); if (objFile.endsWith(smoothString)) { - if (smooth) + if (enabled) return; // Already smooth; do nothing else // Rip Smooth off the end objFile.resize(objFile.indexOf(smoothString)); } else { - if (!smooth) // Already flat; do nothing + if (!enabled) // Already flat; do nothing return; else // Append Smooth to the end objFile.append(smoothString); @@ -200,7 +200,7 @@ void DeclarativeBars::setBarSmooth(bool smooth) m_shared->setMeshFileName(objFile); } -bool DeclarativeBars::barSmooth() +bool DeclarativeBars::isBarSmoothingEnabled() { QString objFile = m_shared->meshFileName(); return objFile.endsWith(smoothString); diff --git a/src/datavisualizationqml2/declarativebars_p.h b/src/datavisualizationqml2/declarativebars_p.h index 79ad7884..f86efe79 100644 --- a/src/datavisualizationqml2/declarativebars_p.h +++ b/src/datavisualizationqml2/declarativebars_p.h @@ -59,7 +59,7 @@ class DeclarativeBars : public QQuickItem Q_PROPERTY(qreal barThickness READ barThickness WRITE setBarThickness) Q_PROPERTY(QSizeF barSpacing READ barSpacing WRITE setBarSpacing) Q_PROPERTY(bool barSpacingRelative READ isBarSpacingRelative WRITE setBarSpacingRelative) - Q_PROPERTY(bool barSmooth READ barSmooth WRITE setBarSmooth) + Q_PROPERTY(bool barSmoothingEnabled READ isBarSmoothingEnabled WRITE setBarSmoothingEnabled) Q_PROPERTY(QString meshFileName READ meshFileName WRITE setMeshFileName) Q_PROPERTY(QFont font READ font WRITE setFont) Q_PROPERTY(bool gridVisible READ isGridVisible WRITE setGridVisible) @@ -120,8 +120,8 @@ public: QDataVis::MeshStyle barType(); // Bar smoothing - void setBarSmooth(bool smooth); - bool barSmooth(); + void setBarSmoothingEnabled(bool enabled); + bool isBarSmoothingEnabled(); // override object type with own mesh void setMeshFileName(const QString &objFileName); diff --git a/src/datavisualizationqml2/declarativescatter.cpp b/src/datavisualizationqml2/declarativescatter.cpp index dc9ac209..64bd324f 100644 --- a/src/datavisualizationqml2/declarativescatter.cpp +++ b/src/datavisualizationqml2/declarativescatter.cpp @@ -146,16 +146,16 @@ QDataVis::MeshStyle DeclarativeScatter::objectType() return QDataVis::Dots; } -void DeclarativeScatter::setObjectSmooth(bool smooth) +void DeclarativeScatter::setObjectSmoothingEnabled(bool enabled) { QString objFile = m_shared->meshFileName(); if (objFile.endsWith(smoothString)) { - if (smooth) + if (enabled) return; // Already smooth; do nothing else // Rip Smooth off the end objFile.resize(objFile.indexOf(smoothString)); } else { - if (!smooth) // Already flat; do nothing + if (!enabled) // Already flat; do nothing return; else // Append Smooth to the end objFile.append(smoothString); @@ -163,7 +163,7 @@ void DeclarativeScatter::setObjectSmooth(bool smooth) m_shared->setMeshFileName(objFile); } -bool DeclarativeScatter::objectSmooth() +bool DeclarativeScatter::isObjectSmoothingEnabled() { QString objFile = m_shared->meshFileName(); return objFile.endsWith(smoothString); diff --git a/src/datavisualizationqml2/declarativescatter_p.h b/src/datavisualizationqml2/declarativescatter_p.h index ad6ccb2a..80137507 100644 --- a/src/datavisualizationqml2/declarativescatter_p.h +++ b/src/datavisualizationqml2/declarativescatter_p.h @@ -54,7 +54,7 @@ class DeclarativeScatter : public QQuickItem Q_PROPERTY(QtDataVisualization::QDataVis::MeshStyle objectType READ objectType WRITE setObjectType) Q_PROPERTY(QtDataVisualization::QDataVis::CameraPreset cameraPreset READ cameraPreset WRITE setCameraPreset) Q_PROPERTY(QtDataVisualization::QDataVis::ColorTheme theme READ theme WRITE setTheme) - Q_PROPERTY(bool objectSmooth READ objectSmooth WRITE setObjectSmooth) + Q_PROPERTY(bool objectSmoothingEnabled READ isObjectSmoothingEnabled WRITE setObjectSmoothingEnabled) Q_PROPERTY(QString meshFileName READ meshFileName WRITE setMeshFileName) Q_PROPERTY(QFont font READ font WRITE setFont) Q_PROPERTY(bool gridVisible READ isGridVisible WRITE setGridVisible) @@ -95,8 +95,8 @@ public: QDataVis::MeshStyle objectType(); // Object smoothing - void setObjectSmooth(bool smooth); - bool objectSmooth(); + void setObjectSmoothingEnabled(bool enabled); + bool isObjectSmoothingEnabled(); // override object type with own mesh void setMeshFileName(const QString &objFileName); diff --git a/src/datavisualizationqml2/declarativesurface.cpp b/src/datavisualizationqml2/declarativesurface.cpp index 7597bef0..c3c5dd09 100644 --- a/src/datavisualizationqml2/declarativesurface.cpp +++ b/src/datavisualizationqml2/declarativesurface.cpp @@ -190,22 +190,22 @@ bool DeclarativeSurface::isBackgroundVisible() return m_shared->backgroundEnabled(); } -void DeclarativeSurface::setSmoothSurface(bool enable) +void DeclarativeSurface::setSmoothSurfaceEnabled(bool enabled) { - m_shared->setSmoothSurface(enable); + m_shared->setSmoothSurface(enabled); } -bool DeclarativeSurface::smoothSurface() const +bool DeclarativeSurface::isSmoothSurfaceEnabled() const { return m_shared->smoothSurface(); } -void DeclarativeSurface::setSurfaceGrid(bool enable) +void DeclarativeSurface::setSurfaceGridEnabled(bool enabled) { - m_shared->setSurfaceGrid(enable); + m_shared->setSurfaceGrid(enabled); } -bool DeclarativeSurface::surfaceGrid() const +bool DeclarativeSurface::isSurfaceGridEnabled() const { return m_shared->surfaceGrid(); } diff --git a/src/datavisualizationqml2/declarativesurface_p.h b/src/datavisualizationqml2/declarativesurface_p.h index c6aae7c0..180e1cc4 100644 --- a/src/datavisualizationqml2/declarativesurface_p.h +++ b/src/datavisualizationqml2/declarativesurface_p.h @@ -57,8 +57,8 @@ class DeclarativeSurface : public QQuickItem Q_PROPERTY(QFont font READ font WRITE setFont) Q_PROPERTY(bool gridVisible READ isGridVisible WRITE setGridVisible) Q_PROPERTY(bool backgroundVisible READ isBackgroundVisible WRITE setBackgroundVisible) - Q_PROPERTY(bool smoothSurface READ smoothSurface WRITE setSmoothSurface) - Q_PROPERTY(bool surfaceGrid READ surfaceGrid WRITE setSurfaceGrid) + Q_PROPERTY(bool smoothSurfaceEnabled READ isSmoothSurfaceEnabled WRITE setSmoothSurfaceEnabled) + Q_PROPERTY(bool surfaceGridEnabled READ isSurfaceGridEnabled WRITE setSurfaceGridEnabled) Q_PROPERTY(QString itemLabelFormat READ itemLabelFormat WRITE setItemLabelFormat) Q_ENUMS(QtDataVisualization::QDataVis::SelectionMode) Q_ENUMS(QtDataVisualization::QDataVis::ShadowQuality) @@ -112,12 +112,12 @@ public: bool isBackgroundVisible(); // Enable or disable the smoothes of the surface - void setSmoothSurface(bool enable); - bool smoothSurface() const; + void setSmoothSurfaceEnabled(bool enabled); + bool isSmoothSurfaceEnabled() const; // Enable or disable the grid on the surface - void setSurfaceGrid(bool enable); - bool surfaceGrid() const; + void setSurfaceGridEnabled(bool enabled); + bool isSurfaceGridEnabled() const; // Adjust shadow quality void setShadowQuality(QDataVis::ShadowQuality quality); |