IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

QHXYModelMapper Class

The QHXYModelMapper class is a horizontal model mapper for line, spline, and scatter series.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

QHXYModelMapper Class

  • Header: QHXYModelMapper

  • Inherited By:

  • Instantiated By: qml-qtcharts-hxymodelmapper.xml

  • Inherits: QXYModelMapper

Detailed Description

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 has X and Y rows for the coordinates and holds the data points for the XYSeries as columns. A TableModel is a natural choice for the model.

Both model and series properties can be used to manipulate the data. The model mapper keeps the series and the data model in sync.

See Also

Property Documentation

 

columnCount : int

This property holds the number of columns of the model that are mapped as the data for series.

The minimum and default value is -1 (the number is limited by the number of columns in the model).

Access functions:

  • int columnCount() const

  • void setColumnCount(int columnCount)

Notifier signal:

firstColumn : int

This property holds the column of the model that contains the data for the first point of the series.

The minimum and default value is 0.

Access functions:

  • int firstColumn() const

  • void setFirstColumn(int firstColumn)

Notifier signal:

model : QAbstractItemModel*

This property holds the model that is used by the mapper.

Access functions:

  • *model() const

  • void setModel( *model)

Notifier signal:

series : QXYSeries*

This property holds 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).

Access functions:

  • *series() const

  • void setSeries( *series)

Notifier signal:

xRow : int

This property holds the row of the model that contains the x-coordinates of the data points.

The default value is -1 (invalid mapping).

Access functions:

  • int xRow() const

  • void setXRow(int xRow)

Notifier signal:

yRow : int

This property holds the row of the model that contains the y-coordinates of the data points.

The default value is -1 (invalid mapping).

Access functions:

  • int yRow() const

  • void setYRow(int yRow)

Notifier signal:

Member Function Documentation

 

[explicit] QHXYModelMapper::QHXYModelMapper(QObject *parent = nullptr)

Constructs a mapper object that is a child of parent.

void QHXYModelMapper::columnCountChanged()

This signal is emitted when the number of columns changes.

Notifier signal for property columnCount.

void QHXYModelMapper::firstColumnChanged()

This signal is emitted when the first column changes.

Notifier signal for property firstColumn.

void QHXYModelMapper::modelReplaced()

This signal is emitted when the model that the mapper is connected to changes.

Notifier signal for property model.

void QHXYModelMapper::seriesReplaced()

This signal is emitted when the series that the mapper is connected to changes.

Notifier signal for property series.

void QHXYModelMapper::xRowChanged()

This signal is emitted when the row that contains the x-coordinates of data points changes.

Notifier signal for property xRow.

void QHXYModelMapper::yRowChanged()

This signal is emitted when the row that contains the y-coordinates of data points changes.

Notifier signal for property yRow.

Vous avez aimé ce tutoriel ? Alors partagez-le en cliquant sur les boutons suivants : Viadeo Twitter Facebook Share on Google+