QVXYModelMapper 類是一個用於直綫、樣條綫及散點係列的垂直模型映射器。 更多...
| 頭: | #include <QVXYModelMapper> |
| 實例化: | VXYModelMapper |
| 繼承: | QXYModelMapper |
| QVXYModelMapper (QObject * parent = nullptr) | |
| int | firstRow () const |
| QAbstractItemModel * | model () const |
| int | rowCount () const |
| QXYSeries * | series () const |
| void | setFirstRow (int firstRow ) |
| void | setModel (QAbstractItemModel * model ) |
| void | setRowCount (int rowCount ) |
| void | setSeries (QXYSeries * series ) |
| void | setXColumn (int xColumn ) |
| void | setYColumn (int yColumn ) |
| int | xColumn () const |
| int | yColumn () const |
| void | firstRowChanged () |
| void | modelReplaced () |
| void | rowCountChanged () |
| void | seriesReplaced () |
| void | xColumnChanged () |
| void | yColumnChanged () |
模型映射器允許使用的數據模型派生自 QAbstractItemModel class as a data source for a chart. A vertical model mapper is used to create a connection between a line, spline, or scatter series and the data model that has X and Y columns for the coordinates and holds the data points for the XYSeries as rows. 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.
另請參閱 QHXYModelMapper , QXYSeries ,和 模型數據範例 .
This property holds the row of the model that contains the data for the first point of the series.
最小且默認值為 0。
訪問函數:
| int | firstRow () const |
| void | setFirstRow (int firstRow ) |
通知程序信號:
| void | firstRowChanged () |
此特性保持映射器使用的模型。
訪問函數:
| QAbstractItemModel * | model () const |
| void | setModel (QAbstractItemModel * model ) |
通知程序信號:
| void | modelReplaced () |
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).
訪問函數:
| int | rowCount () const |
| void | setRowCount (int rowCount ) |
通知程序信號:
| void | rowCountChanged () |
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).
訪問函數:
| QXYSeries * | series () const |
| void | setSeries (QXYSeries * series ) |
通知程序信號:
| void | seriesReplaced () |
This property holds the column of the model that contains the x-coordinates of data points.
默認值為 -1 (無效映射)。
訪問函數:
| int | xColumn () const |
| void | setXColumn (int xColumn ) |
通知程序信號:
| void | xColumnChanged () |
This property holds the column of the model that contains the y-coordinates of data points.
默認值為 -1 (無效映射)。
訪問函數:
| int | yColumn () const |
| void | setYColumn (int yColumn ) |
通知程序信號:
| void | yColumnChanged () |
構造映射器對象為子級化 parent .
[signal]
void
QVXYModelMapper::
firstRowChanged
()
This signal is emitted when the first row changes.
注意: 通知程序信號對於特性 firstRow .
[signal]
void
QVXYModelMapper::
modelReplaced
()
This signal is emitted when the model that the mapper is connected to changes.
注意: 通知程序信號對於特性 model .
[signal]
void
QVXYModelMapper::
rowCountChanged
()
This signal is emitted when the number of rows changes.
注意: 通知程序信號對於特性 rowCount .
[signal]
void
QVXYModelMapper::
seriesReplaced
()
This signal is emitted when the series that the mapper is connected to changes.
注意: 通知程序信號對於特性 series .
[signal]
void
QVXYModelMapper::
xColumnChanged
()
This signal is emitted when the column that contains the x-coordinates of data points changes.
注意: 通知程序信號對於特性 xColumn .
[signal]
void
QVXYModelMapper::
yColumnChanged
()
This signal is emitted when the column that contains the y-coordinates of data points changes.
注意: 通知程序信號對於特性 yColumn .