PySide6.QtGraphs.QBarModelMapper¶
- class QBarModelMapper¶
- The - QBarModelMapperclass is a model mapper for bar series.- Details- 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 - QBarSeries.- Both model and bar series properties can be used to manipulate the data. The model mapper keeps the bar series and the data model in sync. - The model mapper ensures that all the bar sets in the bar series have equal sizes. Therefore, adding or removing a value from a bar set causes the same change to be made in all the bar sets in the bar series. - Added in version 6.8. - Synopsis¶- Properties¶- countᅟ- Number of rows or columns of the model that are mapped as the data for the bar series
- firstᅟ- Row or column of the model that contains the first values of the bar sets in the bar series
- firstBarSetSectionᅟ- Section of the model that is used as the data source for the first bar set
- lastBarSetSectionᅟ- Section of the model that is used as the data source for the last bar set
- modelᅟ- Data 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 columns defines a bar set, and the model’s rows define the categories. When the orientation is set to Qt::Horizontal, each of the model’s rows defines a bar set, and the model’s columns define categories
- seriesᅟ- Bar series that is used by the mapper
 - Methods¶- def - __init__()
- def - count()
- def - first()
- def - model()
- def - orientation()
- def - series()
- def - setCount()
- def - setFirst()
- def - setModel()
- def - setOrientation()
- def - setSeries()
 - Signals¶- def - countChanged()
- def - firstChanged()
- def - modelChanged()
- def - seriesChanged()
 - 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 - Note - Properties can be used directly when - from __feature__ import true_propertyis used or via accessor functions otherwise.- property countᅟ: int¶
 - This property holds The number of rows or columns of the model that are mapped as the data for the bar series.. - The default value is - -1which is also the minimum. The count is limited by the number of model’s rows/columns.- See also - Access functions:
- Signal - countChanged()
 
 - property firstᅟ: int¶
 - This property holds The row or column of the model that contains the first values of the bar sets in the bar series.. - The minimum and default value is 0. - See also - Access functions:
- Signal - firstChanged()
 
 - property firstBarSetSectionᅟ: int¶
 - This property holds The section of the model that is used as the data source for the first bar set.. - The default value is -1 (invalid mapping). - See also - Access functions:
 - property lastBarSetSectionᅟ: int¶
 - This property holds The section of the model that is used as the data source for the last bar set.. - The default value is -1 (invalid mapping). - See also - Access functions:
 - property modelᅟ: QAbstractItemModel¶
 - This property holds The data model that is used by the mapper.. - Access functions:
- Signal - modelChanged()
 
 - property orientationᅟ: Qt.Orientation¶
 - This property holds Tells the modelmapper how to map data from a model. If - Qt::Verticalis used, each of the model’s columns defines a bar set, and the model’s rows define the categories. When the orientation is set to- Qt::Horizontal, each of the model’s rows defines a bar set, and the model’s columns define categories..- The default value is - Qt::Vertical- Access functions:
 - property seriesᅟ: QBarSeries¶
 - This property holds The bar 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:
- Signal - seriesChanged()
 
 - count()¶
- Return type:
- int 
 - See also 
 - Getter of property - countᅟ.- countChanged()¶
 - Notification signal of property - countᅟ.- first()¶
- Return type:
- int 
 - See also 
 - Getter of property - firstᅟ.- firstBarSetSection()¶
- Return type:
- int 
 - See also 
 - Getter of property - firstBarSetSectionᅟ.- firstBarSetSectionChanged()¶
 - Notification signal of property - firstBarSetSectionᅟ.- firstChanged()¶
 - Notification signal of property - firstᅟ.- lastBarSetSection()¶
- Return type:
- int 
 - See also 
 - Getter of property - lastBarSetSectionᅟ.- lastBarSetSectionChanged()¶
 - Notification signal of property - lastBarSetSectionᅟ.- model()¶
- Return type:
 - See also 
 - Getter of property - modelᅟ.- modelChanged()¶
 - Notification signal of property - modelᅟ.- orientation()¶
- Return type:
 - See also 
 - Getter of property - orientationᅟ.- orientationChanged()¶
 - Notification signal of property - orientationᅟ.- series()¶
- Return type:
 - See also 
 - Getter of property - seriesᅟ.- seriesChanged()¶
 - Notification signal of property - seriesᅟ.- Setter of property - countᅟ.- Setter of property - firstᅟ.- setFirstBarSetSection(newFirstBarSetSection)¶
- Parameters:
- newFirstBarSetSection – int 
 - See also 
 - Setter of property - firstBarSetSectionᅟ.- setLastBarSetSection(newLastBarSetSection)¶
- Parameters:
- newLastBarSetSection – int 
 - See also 
 - Setter of property - lastBarSetSectionᅟ.- setModel(model)¶
- Parameters:
- model – - QAbstractItemModel
 - See also 
 - Setter of property - modelᅟ.- setOrientation(orientation)¶
- Parameters:
- orientation – - Orientation
 - See also 
 - Setter of property - orientationᅟ.- setSeries(series)¶
- Parameters:
- series – - QBarSeries
 - See also 
 - Setter of property - seriesᅟ.