diff options
Diffstat (limited to 'src/charts/xychart/qvxymodelmapper.cpp')
-rw-r--r-- | src/charts/xychart/qvxymodelmapper.cpp | 100 |
1 files changed, 61 insertions, 39 deletions
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) |