From 73ec35fa12a4b150670ea93d3021ca8e658063e1 Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Thu, 6 Apr 2017 16:53:37 +0200 Subject: Doc: Edit custom item, label, and volume docs for grammar and style MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I2b5a546c5035cbf304db57d3e18c998421969392 Reviewed-by: Tomi Korpipää --- src/datavisualization/data/qcustom3ditem.cpp | 76 ++++++++------ src/datavisualization/data/qcustom3dlabel.cpp | 49 ++++----- src/datavisualization/data/qcustom3dvolume.cpp | 134 ++++++++++++++----------- 3 files changed, 145 insertions(+), 114 deletions(-) (limited to 'src/datavisualization') diff --git a/src/datavisualization/data/qcustom3ditem.cpp b/src/datavisualization/data/qcustom3ditem.cpp index 740d79e7..11df7750 100644 --- a/src/datavisualization/data/qcustom3ditem.cpp +++ b/src/datavisualization/data/qcustom3ditem.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2016 The Qt Company Ltd. +** Copyright (C) 2017 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Data Visualization module of the Qt Toolkit. @@ -34,11 +34,11 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION /*! * \class QCustom3DItem * \inmodule QtDataVisualization - * \brief The QCustom3DItem class is for creating custom items to be added to a graph. + * \brief The QCustom3DItem class adds a custom item to a graph. * \since QtDataVisualization 1.1 * - * This class is for creating custom items to be added to a graph. The item has a custom mesh, - * position, scaling, rotation, and an optional texture. + * A custom item has a custom mesh, position, scaling, rotation, and an optional + * texture. * * \sa QAbstract3DGraph::addCustomItem() */ @@ -49,15 +49,15 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION * \since QtDataVisualization 1.1 * \ingroup datavisualization_qml * \instantiates QCustom3DItem - * \brief The Custom3DItem type is for creating custom items to be added to a graph. + * \brief Adds a custom item to a graph. * - * This type is for creating custom items to be added to a graph. The item has a custom mesh, - * position, scaling, rotation, and an optional texture. + * A custom item has a custom mesh, position, scaling, rotation, and an optional + * texture. */ /*! \qmlproperty string Custom3DItem::meshFile * - * The item mesh file name. The item in the file must be in Wavefront obj format and include + * The item mesh file name. The item in the file must be in Wavefront OBJ format and include * vertices, normals, and UVs. It also needs to be in triangles. */ @@ -66,15 +66,18 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION * The texture file name for the item. If left unset, a solid gray texture will be * used. * - * \note To conserve memory the QImage loaded from the file is cleared after a texture is created. + * \note To conserve memory, the QImage loaded from the file is cleared after a + * texture is created. */ /*! \qmlproperty vector3d Custom3DItem::position * - * The item position as a vector3d. Defaults to \c {vector3d(0.0, 0.0, 0.0)}. + * The item position as a \l vector3d type. Defaults to + * \c {vector3d(0.0, 0.0, 0.0)}. * - * Item position is either in data coordinates or in absolute coordinates, depending on the - * positionAbsolute property. When using absolute coordinates, values between \c{-1.0...1.0} are + * Item position is specified either in data coordinates or in absolute + * coordinates, depending on the value of the positionAbsolute property. When + * using absolute coordinates, values between \c{-1.0...1.0} are * within axis ranges. * * \note Items positioned outside any axis range are not rendered if positionAbsolute is \c{false}, @@ -95,12 +98,14 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION /*! \qmlproperty vector3d Custom3DItem::scaling * - * The item scaling as a vector3d. Defaults to \c {vector3d(0.1, 0.1, 0.1)}. + * The item scaling as a \l vector3d type. Defaults to + * \c {vector3d(0.1, 0.1, 0.1)}. * - * Item scaling is either in data values or in absolute values, depending on the - * scalingAbsolute property. The default vector interpreted as absolute values sets the item to + * Item scaling is specified either in data values or in absolute values, + * depending on the value of the scalingAbsolute property. The default vector + * interpreted as absolute values sets the item to * 10% of the height of the graph, provided the item mesh is normalized and the graph aspect ratios - * haven't been changed from the defaults. + * have not been changed from the defaults. * * \sa scalingAbsolute */ @@ -111,7 +116,7 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION * Defines whether item scaling is to be handled in data values or in absolute * values. Defaults to \c{true}. Items with absolute scaling will be rendered at the same * size, regardless of axis ranges. Items with data scaling will change their apparent size - * according to the axis ranges. If positionAbsolute value is \c{true}, this property is ignored + * according to the axis ranges. If positionAbsolute is \c{true}, this property is ignored * and scaling is interpreted as an absolute value. If the item has rotation, the data scaling * is calculated on the unrotated item. Similarly, for Custom3DVolume items, the range clipping * is calculated on the unrotated item. @@ -119,7 +124,7 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION * \note Only absolute scaling is supported for Custom3DLabel items or for custom items used in * \l{AbstractGraph3D::polar}{polar} graphs. * - * \note The custom item's mesh must be normalized to range \c{[-1 ,1]}, or the data + * \note The custom item's mesh must be normalized to the range \c{[-1 ,1]}, or the data * scaling will not be accurate. * * \sa scaling, positionAbsolute @@ -127,7 +132,8 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION /*! \qmlproperty quaternion Custom3DItem::rotation * - * The item rotation as a quaternion. Defaults to \c {quaternion(0.0, 0.0, 0.0, 0.0)}. + * The item rotation as a \l quaternion. Defaults to + * \c {quaternion(0.0, 0.0, 0.0, 0.0)}. */ /*! \qmlproperty bool Custom3DItem::visible @@ -145,13 +151,14 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION /*! * \qmlmethod void Custom3DItem::setRotationAxisAndAngle(vector3d axis, real angle) * - * A convenience function to construct rotation quaternion from \a axis and \a angle. + * A convenience function to construct the rotation quaternion from \a axis and + * \a angle. * * \sa rotation */ /*! - * Constructs QCustom3DItem with given \a parent. + * Constructs a custom 3D item with the specified \a parent. */ QCustom3DItem::QCustom3DItem(QObject *parent) : QObject(parent), @@ -171,7 +178,7 @@ QCustom3DItem::QCustom3DItem(QCustom3DItemPrivate *d, QObject *parent) : } /*! - * Constructs QCustom3DItem with given \a meshFile, \a position, \a scaling, + * Constructs a custom 3D item with the specified \a meshFile, \a position, \a scaling, * \a rotation, \a texture image, and optional \a parent. */ QCustom3DItem::QCustom3DItem(const QString &meshFile, const QVector3D &position, @@ -184,7 +191,7 @@ QCustom3DItem::QCustom3DItem(const QString &meshFile, const QVector3D &position, } /*! - * Destroys QCustom3DItem. + * Deletes the custom 3D item. */ QCustom3DItem::~QCustom3DItem() { @@ -194,7 +201,7 @@ QCustom3DItem::~QCustom3DItem() * * \brief The item mesh file name. * - * The item in the file must be in Wavefront obj format and include + * The item in the file must be in Wavefront OBJ format and include * vertices, normals, and UVs. It also needs to be in triangles. */ void QCustom3DItem::setMeshFile(const QString &meshFile) @@ -218,7 +225,8 @@ QString QCustom3DItem::meshFile() const * * Defaults to \c {QVector3D(0.0, 0.0, 0.0)}. * - * Item position is either in data coordinates or in absolute coordinates, depending on + * Item position is specified either in data coordinates or in absolute + * coordinates, depending on the * positionAbsolute property. When using absolute coordinates, values between \c{-1.0...1.0} are * within axis ranges. * @@ -277,7 +285,7 @@ bool QCustom3DItem::isPositionAbsolute() const * Item scaling is either in data values or in absolute values, depending on the * scalingAbsolute property. The default vector interpreted as absolute values sets the item to * 10% of the height of the graph, provided the item mesh is normalized and the graph aspect ratios - * haven't been changed from the defaults. + * have not been changed from the defaults. * * \sa scalingAbsolute */ @@ -306,7 +314,7 @@ QVector3D QCustom3DItem::scaling() const * * Items with absolute scaling will be rendered at the same * size, regardless of axis ranges. Items with data scaling will change their apparent size - * according to the axis ranges. If positionAbsolute value is \c{true}, this property is ignored + * according to the axis ranges. If positionAbsolute is \c{true}, this property is ignored * and scaling is interpreted as an absolute value. If the item has rotation, the data scaling * is calculated on the unrotated item. Similarly, for QCustom3DVolume items, the range clipping * is calculated on the unrotated item. @@ -314,7 +322,7 @@ QVector3D QCustom3DItem::scaling() const * \note Only absolute scaling is supported for QCustom3DLabel items or for custom items used in * \l{QAbstract3DGraph::polar}{polar} graphs. * - * \note The custom item's mesh must be normalized to range \c{[-1 ,1]}, or the data + * \note The custom item's mesh must be normalized to the range \c{[-1 ,1]}, or the data * scaling will not be accurate. * * \sa scaling, positionAbsolute @@ -402,7 +410,8 @@ bool QCustom3DItem::isShadowCasting() const } /*! - * A convenience function to construct rotation quaternion from \a axis and \a angle. + * A convenience function to construct the rotation quaternion from \a axis and + * \a angle. * * \sa rotation */ @@ -412,9 +421,11 @@ void QCustom3DItem::setRotationAxisAndAngle(const QVector3D &axis, float angle) } /*! - * Sets the \a textureImage as a QImage for the item. Texture defaults to solid gray. + * Sets the value of \a textureImage as a QImage for the item. The texture + * defaults to solid gray. * - * \note To conserve memory the given QImage is cleared after a texture is created. + * \note To conserve memory, the given QImage is cleared after a texture is + * created. */ void QCustom3DItem::setTextureImage(const QImage &textureImage) { @@ -443,7 +454,8 @@ void QCustom3DItem::setTextureImage(const QImage &textureImage) * If both this property and the texture image are unset, a solid * gray texture will be used. * - * \note To conserve memory the QImage loaded from the file is cleared after a texture is created. + * \note To conserve memory, the QImage loaded from the file is cleared after a + * texture is created. */ void QCustom3DItem::setTextureFile(const QString &textureFile) { diff --git a/src/datavisualization/data/qcustom3dlabel.cpp b/src/datavisualization/data/qcustom3dlabel.cpp index 27d02993..5cc0a0e4 100644 --- a/src/datavisualization/data/qcustom3dlabel.cpp +++ b/src/datavisualization/data/qcustom3dlabel.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2016 The Qt Company Ltd. +** Copyright (C) 2017 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Data Visualization module of the Qt Toolkit. @@ -35,16 +35,16 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION /*! * \class QCustom3DLabel * \inmodule QtDataVisualization - * \brief The QCustom3DLabel class is for creating custom labels to be added to a graph. + * \brief The QCustom3DLabel class adds a custom label to a graph. * \since QtDataVisualization 1.1 * - * This class is for creating custom labels to be added to a graph. You can set text, font, - * position, scaling, rotation, and colors. You can also toggle borders and background for the - * label. Colors, borders and background are used from active theme unless any of them is set - * explicitly. + * The text, font, position, scaling, rotation, and colors of a custom label can + * be set. In addition, the visibility of the borders and background of the + * label can be toggled. Colors, borders, and background are determined by the + * active theme unless set explicitly. * - * \note In scaling, z has no effect. Setting the same x and y retains the original - * font dimensions. + * \note In scaling, the z-coordinate has no effect. Setting the same x- and + * y-coordinates retains the original font dimensions. * * \sa QAbstract3DGraph::addCustomItem() */ @@ -56,15 +56,15 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION * \ingroup datavisualization_qml * \instantiates QCustom3DLabel * \inherits Custom3DItem - * \brief The Custom3DLabel type is for creating custom labels to be added to a graph. + * \brief Adds a custom label to a graph. * - * This type is for creating custom labels to be added to a graph. You can set text, font, - * position, scaling, rotation, and colors. You can also toggle borders and background for the - * label. Colors, borders and background are used from active theme unless any of them is set - * explicitly. + * The text, font, position, scaling, rotation, and colors of a custom label can + * be set. In addition, the visibility of the borders and background of the + * label can be toggled. Colors, borders, and background are determined by the + * active theme unless set explicitly. * - * \note In scaling, z has no effect. Setting the same x and y retains the original - * font dimensions. + * \note In scaling, the z-coordinate has no effect. Setting the same x- and + * y-coordinates retains the original font dimensions. */ /*! \qmlproperty string Custom3DLabel::text @@ -75,7 +75,7 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION /*! \qmlproperty font Custom3DLabel::font * * The font to be used for the label. Defaults to \c{Font {family: "Arial"; pointSize: 20}}. - * Special formatting (for example outlined) is not supported. + * Special formatting (for example, outlined) is not supported. */ /*! \qmlproperty color Custom3DLabel::textColor @@ -106,11 +106,11 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION /*! \qmlproperty bool Custom3DLabel::facingCamera * * Defines whether the label will always face the camera. Defaults to \c{false}. - * If set to \c{true}, rotation() has no effect. + * If set to \c{true}, \l {QCustom3DItem::}{rotation} has no effect. */ /*! - * Constructs QCustom3DLabel with given \a parent. + * Constructs a custom 3D label with the given \a parent. */ QCustom3DLabel::QCustom3DLabel(QObject *parent) : QCustom3DItem(new QCustom3DLabelPrivate(this), parent) @@ -118,10 +118,11 @@ QCustom3DLabel::QCustom3DLabel(QObject *parent) : } /*! - * Constructs QCustom3DLabel with given \a text, \a font, \a position, \a scaling, + * Constructs a custom 3D label with the given \a text, \a font, \a position, \a scaling, * \a rotation, and optional \a parent. * - * \note Setting the same x and y for \a scaling retains the original font dimensions. + * \note Setting the same x- and y-coordinates for \a scaling retains the + * original font dimensions. */ QCustom3DLabel::QCustom3DLabel(const QString &text, const QFont &font, const QVector3D &position, const QVector3D &scaling, @@ -132,7 +133,7 @@ QCustom3DLabel::QCustom3DLabel(const QString &text, const QFont &font, } /*! - * Destroys QCustom3DLabel. + * Deletes the custom 3D label. */ QCustom3DLabel::~QCustom3DLabel() { @@ -164,7 +165,7 @@ QString QCustom3DLabel::text() const * \brief The font to be used for the label. * * Defaults to \c{QFont("Arial", 20)}. Special formatting - * (for example outlined) is not supported. + * (for example, outlined) is not supported. */ void QCustom3DLabel::setFont(const QFont &font) { @@ -183,9 +184,9 @@ QFont QCustom3DLabel::font() const /*! \property QCustom3DLabel::textColor * - * \brief Color for the label text. + * \brief The color for the label text. * - * Also affects label border, if enabled. Defaults to \c{Qt::white}. + * Also affects the label border, if enabled. Defaults to \c{Qt::white}. * * \sa borderEnabled */ diff --git a/src/datavisualization/data/qcustom3dvolume.cpp b/src/datavisualization/data/qcustom3dvolume.cpp index 1e7bdb82..d54f34d1 100644 --- a/src/datavisualization/data/qcustom3dvolume.cpp +++ b/src/datavisualization/data/qcustom3dvolume.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2016 The Qt Company Ltd. +** Copyright (C) 2017 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Data Visualization module of the Qt Toolkit. @@ -35,10 +35,10 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION /*! * \class QCustom3DVolume * \inmodule QtDataVisualization - * \brief The QCustom3DVolume class is for creating volume rendered objects to be added to a graph. + * \brief The QCustom3DVolume class adds a volume rendered object to a graph. * \since QtDataVisualization 1.2 * - * This class is for creating volume rendered objects to be added to a graph. A volume rendered + * A volume rendered * object is a box with a 3D texture. Three slice planes are supported for the volume, one along * each main axis of the volume. * @@ -48,7 +48,7 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION * smaller view or limiting the zoom level of the graph are easy ways to improve performance. * Similarly, the volume texture dimensions have a large impact on performance. * If the frame rate is more important than pixel-perfect rendering of the volume contents, consider - * turning the high definition shader off by setting useHighDefShader property to \c{false}. + * turning the high definition shader off by setting the useHighDefShader property to \c{false}. * * \note Volumetric objects are only supported with orthographic projection. * @@ -64,9 +64,9 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION * \ingroup datavisualization_qml * \instantiates QCustom3DVolume * \inherits Custom3DItem - * \brief The Custom3DVolume type is for creating volume rendered objects to be added to a graph. + * \brief Adds a volume rendered object to a graph. * - * This class is for creating volume rendered objects to be added to a graph. A volume rendered + * A volume rendered * object is a box with a 3D texture. Three slice planes are supported for the volume, one along * each main axis of the volume. * @@ -76,11 +76,11 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION * smaller view or limiting the zoom level of the graph are easy ways to improve performance. * Similarly, the volume texture dimensions have a large impact on performance. * If the frame rate is more important than pixel-perfect rendering of the volume contents, consider - * turning the high definition shader off by setting useHighDefShader property to \c{false}. + * turning the high definition shader off by setting the useHighDefShader property to \c{false}. * * \note Filling in the volume data would not typically be efficient or practical from pure QML, * so properties directly related to that are not fully supported from QML. - * Make a hybrid QML/C++ application if you want to use volume objects with a QML UI. + * Create a hybrid QML/C++ application if you want to use volume objects with a Qt Quick UI. * * \note Volumetric objects are only supported with orthographic projection. * @@ -94,7 +94,7 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION * The width of the 3D texture defining the volume content in pixels. Defaults to \c{0}. * * \note Changing this property from QML is not supported, as the texture data cannot be resized - * to match. + * accordingly. */ /*! \qmlproperty int Custom3DVolume::textureHeight @@ -102,7 +102,7 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION * The height of the 3D texture defining the volume content in pixels. Defaults to \c{0}. * * \note Changing this property from QML is not supported, as the texture data cannot be resized - * to match. + * accordingly. */ /*! \qmlproperty int Custom3DVolume::textureDepth @@ -110,12 +110,12 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION * The depth of the 3D texture defining the volume content in pixels. Defaults to \c{0}. * * \note Changing this property from QML is not supported, as the texture data cannot be resized - * to match. + * accordingly. */ /*! \qmlproperty int Custom3DVolume::sliceIndexX * - * The X dimension index into the texture data indicating which vertical slice to show. + * The x-dimension index into the texture data indicating which vertical slice to show. * Setting any dimension to negative indicates no slice or slice frame for that dimension is drawn. * If all dimensions are negative, no slices or slice frames are drawn and the volume is drawn * normally. @@ -126,7 +126,7 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION /*! \qmlproperty int Custom3DVolume::sliceIndexY * - * The Y dimension index into the texture data indicating which horizontal slice to show. + * The y-dimension index into the texture data indicating which horizontal slice to show. * Setting any dimension to negative indicates no slice or slice frame for that dimension is drawn. * If all dimensions are negative, no slices or slice frames are drawn and the volume is drawn * normally. @@ -137,7 +137,7 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION /*! \qmlproperty int Custom3DVolume::sliceIndexZ * - * The Z dimension index into the texture data indicating which vertical slice to show. + * The z-dimension index into the texture data indicating which vertical slice to show. * Setting any dimension to negative indicates no slice or slice frame for that dimension is drawn. * If all dimensions are negative, no slices or slice frames are drawn and the volume is drawn * normally. @@ -179,11 +179,12 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION * The high definition shader guarantees that every visible texel of the volume texture is sampled * when the volume is rendered. * The low definition shader renders only a rough approximation of the volume contents, - * but at much higher frame rate. The low definition shader doesn't guarantee every texel of the + * but at a much higher frame rate. The low definition shader does not guarantee every texel of the * volume texture is sampled, so there may be flickering if the volume contains distinct thin * features. * - * \note This value doesn't affect the level of detail when rendering the slices of the volume. + * \note This value does not affect the level of detail when rendering the + * slices of the volume. * * Defaults to \c{true}. */ @@ -262,7 +263,7 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION */ /*! - * Constructs QCustom3DVolume with given \a parent. + * Constructs a custom 3D volume with the given \a parent. */ QCustom3DVolume::QCustom3DVolume(QObject *parent) : QCustom3DItem(new QCustom3DVolumePrivate(this), parent) @@ -270,7 +271,7 @@ QCustom3DVolume::QCustom3DVolume(QObject *parent) : } /*! - * Constructs QCustom3DVolume with given \a position, \a scaling, \a rotation, + * Constructs a custom 3D volume with the given \a position, \a scaling, \a rotation, * \a textureWidth, \a textureHeight, \a textureDepth, \a textureData, \a textureFormat, * \a colorTable, and optional \a parent. * @@ -289,7 +290,7 @@ QCustom3DVolume::QCustom3DVolume(const QVector3D &position, const QVector3D &sca /*! - * Destroys QCustom3DVolume. + * Deletes the custom 3D volume. */ QCustom3DVolume::~QCustom3DVolume() { @@ -301,7 +302,8 @@ QCustom3DVolume::~QCustom3DVolume() * * Defaults to \c{0}. * - * \note The textureData may need to be resized or recreated if this value is changed. + * \note The textureData value may need to be resized or recreated if this value + * is changed. * Defaults to \c{0}. * * \sa textureData, textureHeight, textureDepth, setTextureFormat(), textureDataWidth() @@ -331,7 +333,8 @@ int QCustom3DVolume::textureWidth() const * * Defaults to \c{0}. * - * \note The textureData may need to be resized or recreated if this value is changed. + * \note The textureData value may need to be resized or recreated if this value + * is changed. * Defaults to \c{0}. * * \sa textureData, textureWidth, textureDepth, setTextureFormat() @@ -362,7 +365,8 @@ int QCustom3DVolume::textureHeight() const * * Defaults to \c{0}. * - * \note The textureData may need to be resized or recreated if this value is changed. + * \note The textureData value may need to be resized or recreated if this value + * is changed. * Defaults to \c{0}. * * \sa textureData, textureWidth, textureHeight, setTextureFormat() @@ -401,7 +405,8 @@ void QCustom3DVolume::setTextureDimensions(int width, int height, int depth) /*! * Returns the actual texture data width. When the texture format is QImage::Format_Indexed8, - * this is textureWidth aligned to 32bit boundary. Otherwise this is four times textureWidth. + * this value equals textureWidth aligned to a 32-bit boundary. Otherwise, this + * value equals four times textureWidth. */ int QCustom3DVolume::textureDataWidth() const { @@ -417,7 +422,8 @@ int QCustom3DVolume::textureDataWidth() const /*! \property QCustom3DVolume::sliceIndexX * - * \brief The X dimension index into the texture data indicating which vertical slice to show. + * \brief The x-dimension index into the texture data indicating which vertical + * slice to show. * * Setting any dimension to negative indicates no slice or slice frame for that dimension is drawn. * If all dimensions are negative, no slices or slice frames are drawn and the volume is drawn @@ -444,7 +450,8 @@ int QCustom3DVolume::sliceIndexX() const /*! \property QCustom3DVolume::sliceIndexY * - * \brief The Y dimension index into the texture data indicating which horizontal slice to show. + * \brief The y-dimension index into the texture data indicating which + * horizontal slice to show. * * Setting any dimension to negative indicates no slice or slice frame for that dimension is drawn. * If all dimensions are negative, no slices or slice frames are drawn and the volume is drawn @@ -471,7 +478,8 @@ int QCustom3DVolume::sliceIndexY() const /*! \property QCustom3DVolume::sliceIndexZ * - * \brief The Z dimension index into the texture data indicating which vertical slice to show. + * \brief The z-dimension index into the texture data indicating which vertical + * slice to show. * * Setting any dimension to negative indicates no slice or slice frame for that dimension is drawn. * If all dimensions are negative, no slices or slice frames are drawn and the volume is drawn @@ -541,20 +549,22 @@ QVector QCustom3DVolume::colorTable() const * (\c{textureDataWidth * textureHeight * textureDepth * texture format color depth in bytes}). * * A 3D texture is defined by a stack of 2D subtextures. Each subtexture must be of identical size - * (\c{textureDataWidth * textureHeight}), and the depth of the stack is defined by textureDepth - * property. Each 2D texture data is identical to a QImage data with the same format, so + * (\c{textureDataWidth * textureHeight}), and the depth of the stack is defined + * by the textureDepth property. The data in each 2D texture is identical to a + * QImage data with the same format, so * QImage::bits() can be used to supply the data for each subtexture. * - * Ownership of the new array transfers to QCustom3DVolume instance. + * Ownership of the new array transfers to the QCustom3DVolume instance. * If another array is set, the previous array is deleted. * If the same array is set again, it is assumed that the array contents have been changed and the * graph rendering is triggered. * - * \note Each X-line of the data needs to be 32bit aligned. If the textureFormat is - * QImage::Format_Indexed8 and textureWidth is not divisible by four, padding bytes need - * to be added to each X-line of the data. You can get the padded byte count with - * textureDataWidth() function. The padding bytes should indicate an fully transparent color - * to avoid rendering artifacts. + * \note Each x-dimension line of the data needs to be 32-bit aligned. + * If textureFormat is QImage::Format_Indexed8 and the textureWidth value is not + * divisible by four, padding bytes might need to be added to each x-dimension + * line of the \a data. The textureDataWidth() function returns the padded byte + * count. The padding bytes should indicate a fully transparent color to avoid + * rendering artifacts. * * Defaults to \c{0}. * @@ -577,8 +587,9 @@ void QCustom3DVolume::setTextureData(QVector *data) * Creates a new texture data array from an array of \a images and sets it as * textureData for this volume object. The texture dimensions are also set according to image * and array dimensions. All of the images in the array must be the same size. If the images are not - * all in QImage::Format_Indexed8 format, all texture data will be converted into - * QImage::Format_ARGB32 format. If the images are in QImage::Format_Indexed8 format, the colorTable + * all in the QImage::Format_Indexed8 format, all texture data will be converted into the + * QImage::Format_ARGB32 format. If the images are in the + * QImage::Format_Indexed8 format, the colorTable value * for the entire volume will be taken from the first image. * * Returns a pointer to the newly created array. @@ -660,17 +671,19 @@ QVector *QCustom3DVolume::textureData() const * Sets a single 2D subtexture of the 3D texture along the specified * \a axis of the volume. * The \a index parameter specifies the subtexture to set. - * The texture \a data must be in the format specified by textureFormat property and have size of + * The texture \a data must be in the format specified by the textureFormat + * property and have the size of * the cross-section of the volume texture along the specified axis multiplied by * the texture format color depth in bytes. - * The \a data is expected to be ordered similarly to the data in images produced by renderSlice() - * method along the same axis. + * The \a data is expected to be ordered similarly to the data in images + * produced by the renderSlice() method along the same axis. * - * \note Each X-line of the data needs to be 32bit aligned when targeting Y-axis or Z-axis. - * If the textureFormat is QImage::Format_Indexed8 and textureWidth is not divisible by four, - * padding bytes need to be added to each X-line of the \a data in cases it is not already - * properly aligned. The padding bytes should indicate an fully transparent color to avoid - * rendering artifacts. + * \note Each x-dimension line of the data needs to be 32-bit aligned when + * targeting the y-axis or z-axis. If textureFormat is QImage::Format_Indexed8 + * and the textureWidth value is not divisible by four, padding bytes might need + * to be added to each x-dimension line of the \a data to properly align it. The + * padding bytes should indicate a fully transparent color to avoid rendering + * artifacts. * * \sa textureData, renderSlice() */ @@ -740,17 +753,18 @@ void QCustom3DVolume::setSubTextureData(Qt::Axis axis, int index, const uchar *d * Sets a single 2D subtexture of the 3D texture along the specified * \a axis of the volume. * The \a index parameter specifies the subtexture to set. - * The source \a image must be in the format specified by the textureFormat property if the - * textureFormat is indexed. If the textureFormat is QImage::Format_ARGB32, the image is converted + * The source \a image must be in the format specified by the textureFormat property if + * textureFormat is indexed. If textureFormat is QImage::Format_ARGB32, the image is converted * to that format. The image must have the size of the cross-section of the volume texture along * the specified axis. The orientation of the image should correspond to the orientation of * the slice image produced by renderSlice() method along the same axis. * - * \note Each X-line of the data needs to be 32bit aligned when targeting Y-axis or Z-axis. - * If the textureFormat is QImage::Format_Indexed8 and textureWidth is not divisible by four, - * padding bytes need to be added to each X-line of the \a image in cases it is not already - * properly aligned. The padding bytes should indicate an fully transparent color to avoid - * rendering artifacts. It is not guaranteed QImage will do this automatically. + * \note Each x-dimension line of the data needs to be 32-bit aligned when + * targeting the y-axis or z-axis. If textureFormat is QImage::Format_Indexed8 + * and the textureWidth value is not divisible by four, padding bytes might need + * to be added to each x-dimension line of the image to properly align it. The + * padding bytes should indicate a fully transparent color to avoid rendering + * artifacts. It is not guaranteed that QImage will do this automatically. * * \sa textureData, renderSlice() */ @@ -792,7 +806,8 @@ void QCustom3DVolume::setSubTextureData(Qt::Axis axis, int index, const QImage & // doesn't allow QImage::format to be a property type. Qt 5.2.1 at least has this problem. /*! - * Sets the format of the textureData to \a format. Only two formats are supported currently: + * Sets the format of the textureData property to \a format. Only two formats + * are supported currently: * QImage::Format_Indexed8 and QImage::Format_ARGB32. If an indexed format is specified, colorTable * must also be set. * Defaults to QImage::Format_ARGB32. @@ -814,7 +829,7 @@ void QCustom3DVolume::setTextureFormat(QImage::Format format) } /*! - * Returns the format of the textureData. + * Returns the format of the textureData property value. * * \sa setTextureFormat() */ @@ -826,7 +841,7 @@ QImage::Format QCustom3DVolume::textureFormat() const /*! * \fn void QCustom3DVolume::textureFormatChanged(QImage::Format format) * - * This signal is emitted when the textureData \a format changes. + * This signal is emitted when the \a format of the textureData value changes. * * \sa setTextureFormat() */ @@ -902,11 +917,13 @@ bool QCustom3DVolume::preserveOpacity() const * The high definition shader guarantees that every visible texel of the volume texture is sampled * when the volume is rendered. * The low definition shader renders only a rough approximation of the volume contents, - * but at much higher frame rate. The low definition shader doesn't guarantee every texel of the + * but at a much higher frame rate. The low definition shader does not guarantee + * that every texel of the * volume texture is sampled, so there may be flickering if the volume contains distinct thin * features. * - * \note This value doesn't affect the level of detail when rendering the slices of the volume. + * \note This value does not affect the level of detail when rendering the + * slices of the volume. * * Defaults to \c{true}. * @@ -1106,10 +1123,11 @@ QVector3D QCustom3DVolume::sliceFrameThicknesses() const } /*! - * Renders the slice specified by \a index along \a axis into an image. + * Renders the slice specified by \a index along the axis specified by \a axis + * into an image. * The texture format of this object is used. * - * Returns the rendered image of the slice, or a null image if invalid index is + * Returns the rendered image of the slice, or a null image if an invalid index is * specified. * * \sa setTextureFormat() -- cgit v1.2.3