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

QVPieModelMapper Class

The QVPieModelMapper is a vertical model mapper for pie series.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

QVPieModelMapper Class

  • Header: QVPieModelMapper

  • Inherited By:

  • Instantiated By: qml-qtcharts-vpiemodelmapper.xml

  • Inherits: QPieModelMapper

Detailed Description

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 data model and QPieSeries, so that each row in the data model defines a pie slice and each column maps to the label or the value of the pie slice.

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

Property Documentation

 

firstRow : int

This property holds the row of the model that contains the first slice value.

The minimum and default value is 0.

Access functions:

  • int firstRow() const

  • void setFirstRow(int firstRow)

Notifier signal:

labelsColumn : int

This property holds the column of the model that is kept in sync with the labels of the pie's slices.

The default value is -1 (invalid mapping).

Access functions:

Notifier signal:

model : QAbstractItemModel*

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

Access functions:

  • *model() const

  • void setModel( *model)

Notifier signal:

rowCount : int

This property holds the number of rows of the model that are mapped as the data for a pie series.

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

Access functions:

  • int rowCount() const

  • void setRowCount(int rowCount)

Notifier signal:

series : QPieSeries*

This property holds the pie 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:

valuesColumn : int

This property holds the column of the model that is kept in sync with the values of the pie's slices.

The default value is -1 (invalid mapping).

Access functions:

Notifier signal:

Member Function Documentation

 

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

Constructs a mapper object that is a child of parent.

void QVPieModelMapper::firstRowChanged()

This signal is emitted when the first row changes.

Notifier signal for property firstRow.

int QVPieModelMapper::labelsColumn() const

Returns the column of the model that is kept in sync with the labels of the pie's slices.

Getter function for property labelsColumn.

See Also

See also setLabelsColumn()

void QVPieModelMapper::labelsColumnChanged()

This signal is emitted when the labels column changes.

Notifier signal for property labelsColumn.

void QVPieModelMapper::modelReplaced()

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

Notifier signal for property model.

void QVPieModelMapper::rowCountChanged()

This signal is emitted when the number of rows changes.

Notifier signal for property rowCount.

void QVPieModelMapper::seriesReplaced()

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

Notifier signal for property series.

void QVPieModelMapper::setLabelsColumn(int labelsColumn)

Sets the model column that is kept in sync with the pies slices' labels to labelsColumn.

Setter function for property labelsColumn.

See Also

See also labelsColumn()

void QVPieModelMapper::setValuesColumn(int valuesColumn)

Sets the model column that is kept in sync with the pie slices' values to valuesColumn.

Setter function for property valuesColumn.

See Also

See also valuesColumn()

int QVPieModelMapper::valuesColumn() const

Returns the column of the model that is kept in sync with the values of the pie's slices.

Getter function for property valuesColumn.

See Also

See also setValuesColumn()

void QVPieModelMapper::valuesColumnChanged()

This signal is emitted when the values column changes.

Notifier signal for property valuesColumn.

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