The QVBarModelMapper class is a vertical model mapper for bar series. 更多...
| 頭: | #include <QVBarModelMapper> |
| 實例化: | VBarModelMapper |
| 繼承: | QObject |
|
| QVBarModelMapper (QObject * parent = Q_NULLPTR) | |
| int | firstBarSetColumn () const |
| int | firstRow () const |
| int | lastBarSetColumn () const |
| QAbstractItemModel * | model () const |
| int | rowCount () const |
| QAbstractBarSeries * | series () const |
| void | setFirstBarSetColumn (int firstBarSetColumn ) |
| void | setFirstRow (int firstRow ) |
| void | setLastBarSetColumn (int lastBarSetColumn ) |
| void | setModel (QAbstractItemModel * model ) |
| void | setRowCount (int rowCount ) |
| void | setSeries (QAbstractBarSeries * series ) |
| void | firstBarSetColumnChanged () |
| void | firstRowChanged () |
| void | lastBarSetColumnChanged () |
| void | modelReplaced () |
| void | rowCountChanged () |
| void | seriesReplaced () |
The QVBarModelMapper class is a vertical model mapper for bar series.
模型映射器允許使用的數據模型派生自 QAbstractItemModel class as a data source for a chart. A vertical model mapper is used to create a connection between a data model and QAbstractBarSeries , so that each column in the data model defines a bar set and each row maps to a category in a bar series.
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.
更多信息,見 BarModelMapper 範例 .
另請參閱 QHBarModelMapper .
This property holds the column of the model that is used as the data source for the first bar set.
默認值為 -1 (無效映射)。
訪問函數:
| int | firstBarSetColumn () const |
| void | setFirstBarSetColumn (int firstBarSetColumn ) |
通知程序信號:
| void | firstBarSetColumnChanged () |
This property holds the row of the model that contains the first values of the bar sets in the bar series.
最小且默認值為 0。
訪問函數:
| int | firstRow () const |
| void | setFirstRow (int firstRow ) |
通知程序信號:
| void | firstRowChanged () |
This property holds the column of the model that is used as the data source for the last bar set.
默認值為 -1 (無效映射)。
訪問函數:
| int | lastBarSetColumn () const |
| void | setLastBarSetColumn (int lastBarSetColumn ) |
通知程序信號:
| void | lastBarSetColumnChanged () |
This property holds the data model that is used by the mapper.
訪問函數:
| 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 the bar series.
The minimum and default value is -1 (number limited to the number of rows in the model).
訪問函數:
| int | rowCount () const |
| void | setRowCount (int rowCount ) |
通知程序信號:
| void | rowCountChanged () |
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).
訪問函數:
| QAbstractBarSeries * | series () const |
| void | setSeries (QAbstractBarSeries * series ) |
通知程序信號:
| void | seriesReplaced () |
構造映射器對象為子級化 parent .
[signal]
void
QVBarModelMapper::
firstBarSetColumnChanged
()
This signal is emitted when the first bar set column changes.
注意: 通知程序信號對於特性 firstBarSetColumn .
[signal]
void
QVBarModelMapper::
firstRowChanged
()
This signal is emitted when the first row changes.
注意: 通知程序信號對於特性 firstRow .
[signal]
void
QVBarModelMapper::
lastBarSetColumnChanged
()
This signal is emitted when the last bar set column changes.
注意: 通知程序信號對於特性 lastBarSetColumn .
[signal]
void
QVBarModelMapper::
modelReplaced
()
This signal is emitted when the model that the mapper is connected to changes.
注意: 通知程序信號對於特性 model .
[signal]
void
QVBarModelMapper::
rowCountChanged
()
This signal is emitted when the number of rows changes.
注意: 通知程序信號對於特性 rowCount .
[signal]
void
QVBarModelMapper::
seriesReplaced
()
This signal is emitted when the bar series that the mapper is connected to changes.
注意: 通知程序信號對於特性 series .