The QHBarModelMapper class is a horizontal model mapper for bar series. 更多...
头: | #include <QHBarModelMapper> |
实例化: | HBarModelMapper |
继承: | QObject |
|
|
QHBarModelMapper (QObject * parent = nullptr) | |
int | columnCount () const |
int | firstBarSetRow () const |
int | firstColumn () const |
int | lastBarSetRow () const |
QAbstractItemModel * | model () const |
QAbstractBarSeries * | series () const |
void | setColumnCount (int columnCount ) |
void | setFirstBarSetRow (int firstBarSetRow ) |
void | setFirstColumn (int firstColumn ) |
void | setLastBarSetRow (int lastBarSetRow ) |
void | setModel (QAbstractItemModel * model ) |
void | setSeries (QAbstractBarSeries * series ) |
void | columnCountChanged () |
void | firstBarSetRowChanged () |
void | firstColumnChanged () |
void | lastBarSetRowChanged () |
void | modelReplaced () |
void | seriesReplaced () |
模型映射器允许使用的数据模型派生自 QAbstractItemModel class as a data source for a chart. A horizontal model mapper is used to create a connection between a data model and QAbstractBarSeries , so that each row in the data model defines a bar set and each column 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.
另请参阅 QVBarModelMapper .
This property holds the number of columns 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 columns in the model).
访问函数:
int | columnCount () const |
void | setColumnCount (int columnCount ) |
通知程序信号:
void | columnCountChanged () |
This property holds the row of the model that is used as the data source for the first bar set.
默认值为 -1 (无效映射)。
访问函数:
int | firstBarSetRow () const |
void | setFirstBarSetRow (int firstBarSetRow ) |
通知程序信号:
void | firstBarSetRowChanged () |
This property holds the column of the model that contains the first values of the bar sets in the bar series.
最小且默认值为 0。
访问函数:
int | firstColumn () const |
void | setFirstColumn (int firstColumn ) |
通知程序信号:
void | firstColumnChanged () |
This property holds the row of the model that is used as the data source for the last bar set.
默认值为 -1 (无效映射)。
访问函数:
int | lastBarSetRow () const |
void | setLastBarSetRow (int lastBarSetRow ) |
通知程序信号:
void | lastBarSetRowChanged () |
定义映射器使用的模型。
访问函数:
QAbstractItemModel * | model () const |
void | setModel (QAbstractItemModel * model ) |
通知程序信号:
void | modelReplaced () |
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 () |
[explicit]
QHBarModelMapper::
QHBarModelMapper
(
QObject
*
parent
= nullptr)
构造映射器对象为子级化 parent .
[signal]
void
QHBarModelMapper::
columnCountChanged
()
This signal is emitted when the number of columns changes.
注意: 通知程序信号对于特性 columnCount .
[signal]
void
QHBarModelMapper::
firstBarSetRowChanged
()
This signal is emitted when the first bar set row changes.
注意: 通知程序信号对于特性 firstBarSetRow .
[signal]
void
QHBarModelMapper::
firstColumnChanged
()
This signal is emitted when the first column changes.
注意: 通知程序信号对于特性 firstColumn .
[signal]
void
QHBarModelMapper::
lastBarSetRowChanged
()
This signal is emitted when the last bar set row changes.
注意: 通知程序信号对于特性 lastBarSetRow .
[signal]
void
QHBarModelMapper::
modelReplaced
()
This signal is emitted when the model that the mapper is connected to changes.
注意: 通知程序信号对于特性 model .
[signal]
void
QHBarModelMapper::
seriesReplaced
()
This signal is emitted when the series that the mapper is connected to changes.
注意: 通知程序信号对于特性 series .