PySide6.QtGraphs.QPieModelMapper

class QPieModelMapper

The QPieModelMapper is a model mapper for pie series. More

Inheritance diagram of PySide6.QtGraphs.QPieModelMapper

Added in version 6.8.

Synopsis

Properties

  • countᅟ - Number of columns or rows of the model that are mapped as the data for a pie series

  • firstᅟ - Column or row of the model that contains the first slice value

  • labelsSectionᅟ - Column or row of the model that is kept in sync with the labels of the pie’s slices

  • modelᅟ - That is used by the mapper

  • orientationᅟ - Tells the modelmapper how to map data from a model. If Qt::Vertical is used, each of the model’s rows defines a pie slice, and the model’s columns define the label or the value of the pie slice. When the orientation is set to Qt::Horizontal, each of the model’s columns defines a pie slice, and the model’s rows define the label or the value of the pie slice

  • seriesᅟ - Pie series that is used by the mapper

  • valuesSectionᅟ - Column or row of the model that is kept in sync with the values of the pie’s slices

Methods

Slots

Signals

Note

This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE

Detailed Description

Model mappers enable using a data model derived from the QAbstractItemModel class as a data source for a graph. A model mapper is used to create a connection between a data model and QPieSeries .

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.

Note

Properties can be used directly when from __feature__ import true_property is used or via accessor functions otherwise.

property countᅟ: int

This property holds The number of columns or 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).

See also

orientation

Access functions:
property firstᅟ: int

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

The minimum and default value is 0.

See also

orientation

Access functions:
property labelsSectionᅟ: int

This property holds The column or row of the model that is kept in sync with the labels of the pie’s slices..

The default value is -1 (invalid mapping).

See also

orientation

Access functions:
property modelᅟ: QAbstractItemModel

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

Access functions:
property orientationᅟ: Qt.Orientation

This property holds Tells the modelmapper how to map data from a model. If Qt::Vertical is used, each of the model’s rows defines a pie slice, and the model’s columns define the label or the value of the pie slice. When the orientation is set to Qt::Horizontal, each of the model’s columns defines a pie slice, and the model’s rows define the label or the value of the pie slice..

The default value is Qt::Vertical

Access functions:
property 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:
property valuesSectionᅟ: int

This property holds The column or row of the model that is kept in sync with the values of the pie’s slices..

The default value is -1 (invalid mapping).

See also

orientation

Access functions:
__init__([parent=None])
Parameters:

parentQObject

count()
Return type:

int

See also

setCount()

Getter of property countᅟ .

countChanged()

Notification signal of property countᅟ .

first()
Return type:

int

See also

setFirst()

Getter of property firstᅟ .

firstChanged()

Notification signal of property firstᅟ .

labelsSection()
Return type:

int

Getter of property labelsSectionᅟ .

labelsSectionChanged()

Notification signal of property labelsSectionᅟ .

model()
Return type:

QAbstractItemModel

See also

setModel()

Getter of property modelᅟ .

modelChanged()

Notification signal of property modelᅟ .

onSliceLabelChanged()
onSliceValueChanged()
orientation()
Return type:

Orientation

See also

setOrientation()

Getter of property orientationᅟ .

orientationChanged()

Notification signal of property orientationᅟ .

series()
Return type:

QPieSeries

See also

setSeries()

Getter of property seriesᅟ .

seriesChanged()

Notification signal of property seriesᅟ .

setCount(count)
Parameters:

count – int

See also

count()

Setter of property countᅟ .

setFirst(first)
Parameters:

first – int

See also

first()

Setter of property firstᅟ .

setLabelsSection(labelsSection)
Parameters:

labelsSection – int

See also

labelsSection()

Setter of property labelsSectionᅟ .

setModel(model)
Parameters:

modelQAbstractItemModel

See also

model()

Setter of property modelᅟ .

setOrientation(orientation)
Parameters:

orientationOrientation

See also

orientation()

Setter of property orientationᅟ .

setSeries(series)
Parameters:

seriesQPieSeries

See also

series()

Setter of property seriesᅟ .

setValuesSection(valuesSection)
Parameters:

valuesSection – int

See also

valuesSection()

Setter of property valuesSectionᅟ .

valuesSection()
Return type:

int

Getter of property valuesSectionᅟ .

valuesSectionChanged()

Notification signal of property valuesSectionᅟ .