PySide6.QtGraphs.QXYModelMapper¶
- class QXYModelMapper¶
The
QXYModelMapper
class is a model mapper for line, spline, and scatter series. More…Added in version 6.8.
Synopsis¶
Properties¶
countᅟ
- Number of rows of the model that are mapped as the data for seriesfirstᅟ
- Row of the model that contains the data for the first point of the seriesmodelᅟ
- That is used by the mapperorientationᅟ
- 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 categoriesseriesᅟ
- That is used by the mapperxSectionᅟ
- Section of the model that contains the x-coordinates of data pointsySectionᅟ
- The section of the model that contains the y-coordinates of data points
Methods¶
def
__init__()
def
count()
def
first()
def
model()
def
orientation()
def
series()
def
setCount()
def
setFirst()
def
setModel()
def
setOrientation()
def
setSeries()
def
setXSection()
def
setYSection()
def
xSection()
def
ySection()
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
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 line, spline, or scatter series. 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
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 rows 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 rows in the model).
See also
- Access functions:
Signal
countChanged()
- property firstᅟ: int¶
This property holds The row of the model that contains the data for the first point of the series..
The minimum and default value is 0.
See also
- Access functions:
Signal
firstChanged()
- property modelᅟ: QAbstractItemModel¶
This property holds The 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::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 toQt::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:
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:
Signal
seriesChanged()
- property xSectionᅟ: int¶
This property holds The section of the model that contains the x-coordinates of data points..
The default value is -1 (invalid mapping).
See also
- Access functions:
- property ySectionᅟ: int¶
This property holds the section of the model that contains the y-coordinates of data points..
The default value is -1 (invalid mapping).
See also
- Access functions:
- 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ᅟ
.- firstChanged()¶
Notification signal of property
firstᅟ
.- 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ᅟ
.- setModel(model)¶
- Parameters:
model –
QAbstractItemModel
See also
Setter of property
modelᅟ
.- setOrientation(orientation)¶
- Parameters:
orientation –
Orientation
See also
Setter of property
orientationᅟ
.Setter of property
seriesᅟ
.- setXSection(xSection)¶
- Parameters:
xSection – int
See also
Setter of property
xSectionᅟ
.- setYSection(ySection)¶
- Parameters:
ySection – int
See also
Setter of property
ySectionᅟ
.- xSection()¶
- Return type:
int
See also
Getter of property
xSectionᅟ
.- xSectionChanged()¶
Notification signal of property
xSectionᅟ
.- ySection()¶
- Return type:
int
See also
Getter of property
ySectionᅟ
.- ySectionChanged()¶
Notification signal of property
ySectionᅟ
.