diff options
author | Leena Miettinen <riitta-leena.miettinen@qt.io> | 2017-01-20 16:49:57 +0100 |
---|---|---|
committer | Leena Miettinen <riitta-leena.miettinen@qt.io> | 2017-01-23 10:10:10 +0000 |
commit | c16294d4817e379802f91bae21c8871234ea866b (patch) | |
tree | 01d2c67ff5e1789740f54f6f0d73fa2ad0f7a735 /src | |
parent | 3ee514949179272c9233754c362ef614970ea0a9 (diff) |
Doc: Edit XY-model mapper class and type docs
Change-Id: I25ba26222da3fdc3abcf4aca40b8f1a574c3c25f
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/charts/xychart/qhxymodelmapper.cpp | 103 | ||||
-rw-r--r-- | src/charts/xychart/qvxymodelmapper.cpp | 100 |
2 files changed, 125 insertions, 78 deletions
diff --git a/src/charts/xychart/qhxymodelmapper.cpp b/src/charts/xychart/qhxymodelmapper.cpp index e18f6e76..4863b69c 100644 --- a/src/charts/xychart/qhxymodelmapper.cpp +++ b/src/charts/xychart/qhxymodelmapper.cpp @@ -34,133 +34,158 @@ QT_CHARTS_BEGIN_NAMESPACE /*! \class QHXYModelMapper \inmodule Qt Charts - \brief Horizontal model mapper for QXYSeries. + \brief The QHXYModelMapper class is a horizontal model mapper for line, + spline, and scatter series. - Model mappers allow you to use QAbstractItemModel derived models as a data source for a chart series. - Horizontal model mapper is used to create a connection between QXYSeries and QAbstractItemModel derived model object. - It is possible to use both QAbstractItemModel and QXYSeries model API. QXYModelMapper makes sure that QXYSeries and the model are kept in sync. - Note: used model has to support adding/removing rows/columns and modifying the data of the cells. + Model mappers enable using a data model derived from the QAbstractItemModel + class as a data source for a chart. A horizontal model mapper is used to + create a connection between a line, spline, or scatter series and the data + model that holds the consecutive data point coordinates on rows. + + Both model and series properties can be used to manipulate the data. The + model mapper keeps the series and the data model in sync. + + \sa QVXYModelMapper, QXYSeries */ /*! \qmltype HXYModelMapper \instantiates QHXYModelMapper \inqmlmodule QtCharts - \brief Horizontal model mapper for QXYSeries + \brief A horizontal model mapper for XYSeries. + + Model mappers enable using a data model derived from the QAbstractItemModel + class as a data source for a chart. A horizontal model mapper is used to + create a connection between a line, spline, or scatter series and the data + model that holds the consecutive data point coordinates on rows. - HXYModelMapper allows you to use your own QAbstractItemModel derived model with data in rows as - a data source for XYSeries based series. It is possible to use both QAbstractItemModel and - XYSeries data API to manipulate data. HXYModelMapper keeps the series and the model in sync. + Both model and series properties can be used to manipulate the data. The + model mapper keeps the series and the data model in sync. + + \sa VXYModelMapper, XYSeries */ /*! \property QHXYModelMapper::series - \brief Defines the QXYSeries object that is used by the mapper. + \brief The series that is used by the mapper. All the data in the series is discarded when it is set to the mapper. - When new series is specified the old series is disconnected (it preserves its data) + When a new series is specified, the old series is disconnected (but it + preserves its data). */ /*! \qmlproperty XYSeries HXYModelMapper::series - Defines the XYSeries object that is used by the mapper. All the data in the series is discarded when it is set to - the mapper. When new series is specified the old series is disconnected (it preserves its data). + The series that is used by the mapper. All the data in the series is + discarded when it is set to the mapper. When a new series is specified, the + old series is disconnected (but it preserves its data). */ /*! \property QHXYModelMapper::model - \brief Defines the model that is used by the mapper. + \brief The model that is used by the mapper. */ /*! \qmlproperty SomeModel HXYModelMapper::model - The QAbstractItemModel based model that is used by the mapper. You need to implement the model - and expose it to QML. Note: the model has to support adding/removing rows/columns and modifying - the data of the cells. + The data model that is used by the mapper. You need to implement the model + and expose it to QML. + + \note The model has to support adding and removing rows or columns and + modifying the data in the cells. */ /*! \property QHXYModelMapper::xRow - \brief Defines which row of the model is kept in sync with the x values of the QXYSeries. + \brief The row of the model that contains the x-coordinates of the data + points. - Default value is: -1 (invalid mapping) + The default value is -1 (invalid mapping). */ /*! \qmlproperty int HXYModelMapper::xRow - Defines which row of the model is kept in sync with the x values of the series. Default value is -1 (invalid - mapping). + The row of the model that contains the x-coordinates of the data points. + The default value is -1 (invalid mapping). */ /*! \property QHXYModelMapper::yRow - \brief Defines which row of the model is kept in sync with the y values of the QXYSeries. + \brief The row of the model that contains the y-coordinates of the data + points. - Default value is: -1 (invalid mapping) + The default value is -1 (invalid mapping). */ /*! \qmlproperty int HXYModelMapper::yRow - Defines which row of the model is kept in sync with the y values of the series. Default value is -1 - (invalid mapping). + The row of the model that contains the y-coordinates of the data points. + + The default value is -1 (invalid mapping). */ /*! \property QHXYModelMapper::firstColumn - \brief Defines which column of the model contains the data for the first point of the series. + \brief The column of the model that contains the data for the first point of the series. - Minimal and default value is: 0 + The minimum and default value is 0. */ /*! \qmlproperty int HXYModelMapper::firstColumn - Defines which column of the model contains the data for the first point of the series. + The column of the model that contains the data for the first point of the series. The default value is 0. */ /*! \property QHXYModelMapper::columnCount - \brief Defines the number of columns of the model that are mapped as the data for series. + \brief The number of columns of the model that are mapped as the data for series. - Minimal and default value is: -1 (count limited by the number of columns in the model) + The minimum and default value is -1 (the number is limited by the number of + columns in the model). */ /*! \qmlproperty int HXYModelMapper::columnCount - Defines the number of columns of the model that are mapped as the data for series. The default value is - -1 (count limited by the number of columns in the model) + The number of columns of the model that are mapped as the data for series. + The default value is -1 (the number is limited by the number of columns in + the model). */ /*! \fn void QHXYModelMapper::seriesReplaced() - Emitted when the series to which mapper is connected to has changed. + This signal is emitted when the series that the mapper is connected to + changes. */ /*! \fn void QHXYModelMapper::modelReplaced() - Emitted when the model to which mapper is connected to has changed. + This signal is emitted when the model that the mapper is connected to + changes. */ /*! \fn void QHXYModelMapper::xRowChanged() - Emitted when the xRow has changed. + This signal is emitted when the row that contains the x-coordinates of data + points changes. */ /*! \fn void QHXYModelMapper::yRowChanged() - Emitted when the yRow has changed. + This signal is emitted when the row that contains the y-coordinates of data + points changes. */ /*! \fn void QHXYModelMapper::firstColumnChanged() - Emitted when the firstColumn has changed. + This signal is emitted when the first column changes. */ /*! \fn void QHXYModelMapper::columnCountChanged() - Emitted when the columnCount has changed. + This signal is emitted when the number of columns changes. */ /*! - Constructs a mapper object which is a child of \a parent. + Constructs a mapper object that is a child of \a parent. */ QHXYModelMapper::QHXYModelMapper(QObject *parent) : QXYModelMapper(parent) diff --git a/src/charts/xychart/qvxymodelmapper.cpp b/src/charts/xychart/qvxymodelmapper.cpp index 3b68d809..3633e6d8 100644 --- a/src/charts/xychart/qvxymodelmapper.cpp +++ b/src/charts/xychart/qvxymodelmapper.cpp @@ -34,133 +34,155 @@ QT_CHARTS_BEGIN_NAMESPACE /*! \class QVXYModelMapper \inmodule Qt Charts - \brief Vertical model mapper for QXYSeries. + \brief The QVXYModelMapper class is a vertical model mapper for line, + spline, and scatter series. - Model mappers allow you to use QAbstractItemModel derived models as a data source for a chart series. - Vertical model mapper is used to create a connection between QXYSeries and QAbstractItemModel derived model object. - It is possible to use both QAbstractItemModel and QXYSeries model API. QXYModelMapper makes sure that QXYSeries and the model are kept in sync. - Note: used model has to support adding/removing rows/columns and modifying the data of the cells. + Model mappers enable using a data model derived from the QAbstractItemModel + class as a data source for a chart. A vertical model mapper is used to + create a connection between a line, spline, or scatter series and the data + model that holds the consecutive data point coordinates in columns. + + Both model and series properties can be used to manipulate the data. The + model mapper keeps the series and the data model in sync. + + \sa QHXYModelMapper, QXYSeries */ /*! \qmltype VXYModelMapper \instantiates QVXYModelMapper \inqmlmodule QtCharts - \brief Vertical model mapper for QXYSeries. + \brief A vertical model mapper for XYSeries. + + Model mappers enable using a data model derived from the QAbstractItemModel + class as a data source for a chart. A vertical model mapper is used to + create a connection between a line, spline, or scatter series and the data + model that holds the consecutive data point coordinates in columns. - VXYModelMapper allows you to use your own QAbstractItemModel derived model with data in columns - as a data source for XYSeries based series. It is possible to use both QAbstractItemModel and - XYSeries data API to manipulate data. VXYModelMapper keeps the series and the model in sync. + Both model and series properties can be used to manipulate the data. The + model mapper keeps the series and the data model in sync. + + \sa HXYModelMapper, XYSeries */ /*! \property QVXYModelMapper::series - \brief Defines the QXYSeries object that is used by the mapper. + \brief The series that is used by the mapper. All the data in the series is discarded when it is set to the mapper. - When new series is specified the old series is disconnected (it preserves its data) + When a new series is specified, the old series is disconnected (but it + preserves its data). */ /*! \qmlproperty XYSeries VXYModelMapper::series - Defines the XYSeries object that is used by the mapper. All the data in the series is discarded when it is set to - the mapper. When new series is specified the old series is disconnected (it preserves its data). + The series that is used by the mapper. All the data in the series is + discarded when it is set to the mapper. When a new series is specified, the + old series is disconnected (but it preserves its data). */ /*! \property QVXYModelMapper::model - \brief Defines the model that is used by the mapper. + \brief The model that is used by the mapper. */ /*! \qmlproperty SomeModel VXYModelMapper::model - The QAbstractItemModel based model that is used by the mapper. You need to implement the model - and expose it to QML. Note: the model has to support adding/removing rows/columns and modifying - the data of the cells. + The data model that is used by the mapper. You need to implement the model + and expose it to QML. + + \note The model has to support adding and removing rows or columns and + modifying the data in the cells. */ /*! \property QVXYModelMapper::xColumn - \brief Defines which column of the model is kept in sync with the x values of QXYSeries. + \brief The column of the model that contains the x-coordinates of data + points. - Default value is: -1 (invalid mapping) + The default value is -1 (invalid mapping). */ /*! \qmlproperty int VXYModelMapper::xColumn - Defines which column of the model is kept in sync with the x values of the series. Default value is -1 (invalid - mapping). + The column of the model that contains the x-coordinates of data points. + The default value is -1 (invalid mapping). */ /*! \property QVXYModelMapper::yColumn - \brief Defines which column of the model is kept in sync with the y values of QXYSeries. + \brief The column of the model that contains the y-coordinates of data + points. - Default value is: -1 (invalid mapping) + The default value is -1 (invalid mapping). */ /*! \qmlproperty int VXYModelMapper::yColumn - Defines which column of the model is kept in sync with the y values of the series. Default value is -1 (invalid - mapping). + The column of the model that contains the y-coordinates of data points. + The default value is -1 (invalid mapping). */ /*! \property QVXYModelMapper::firstRow - \brief Defines which row of the model contains the data for the first point of the series. + \brief The row of the model that contains the data for the first point + of the series. - Minimal and default value is: 0 + The minimum and default value is 0. */ /*! \qmlproperty int VXYModelMapper::firstRow - Defines which row of the model contains the data for the first point of the series. + The row of the model that contains the data for the first point of the series. The default value is 0. */ /*! \property QVXYModelMapper::rowCount - \brief Defines the number of rows of the model that are mapped as the data for series. + \brief The number of rows of the model that are mapped as the data for series. - Minimal and default value is: -1 (count limited by the number of rows in the model) + The minimum and default value is -1 (the number is limited by the number of + rows in the model). */ /*! \qmlproperty int VXYModelMapper::rowCount - Defines the number of rows of the model that are mapped as the data for series. The default value is - -1 (count limited by the number of rows in the model). + The number of rows of the model that are mapped as the data for series. The default value is + -1 (the number is limited by the number of rows in the model). */ /*! \fn void QVXYModelMapper::seriesReplaced() - Emitted when the series to which mapper is connected to has changed. + This signal is emitted when the series that the mapper is connected to changes. */ /*! \fn void QVXYModelMapper::modelReplaced() - Emitted when the model to which mapper is connected to has changed. + This signal is emitted when the model that the mapper is connected to changes. */ /*! \fn void QVXYModelMapper::xColumnChanged() - Emitted when the xColumn has changed. + This signal is emitted when the column that contains the x-coordinates of + data points changes. */ /*! \fn void QVXYModelMapper::yColumnChanged() - Emitted when the yColumn has changed. + This signal is emitted when the column that contains the y-coordinates of + data points changes. */ /*! \fn void QVXYModelMapper::firstRowChanged() - Emitted when the firstRow has changed. + This signal is emitted when the first row changes. */ /*! \fn void QVXYModelMapper::rowCountChanged() - Emitted when the rowCount has changed. + This signal is emitted when the number of rows changes. */ /*! - Constructs a mapper object which is a child of \a parent. + Constructs a mapper object that is a child of \a parent. */ QVXYModelMapper::QVXYModelMapper(QObject *parent) : QXYModelMapper(parent) |