QCandlestickModelMapper 类

用于烛台系列的抽象模型映射器类。 更多...

头: #include <QCandlestickModelMapper>
继承: QObject
继承者: QHCandlestickModelMapper and QVCandlestickModelMapper

特性

公共函数

QCandlestickModelMapper (QObject * parent = nullptr)
QAbstractItemModel * model () const
virtual Qt::Orientation orientation () const = 0
QCandlestickSeries * series () const
void setModel (QAbstractItemModel * model )
void setSeries (QCandlestickSeries * series )

信号

void modelReplaced ()
void seriesReplaced ()

保护函数

int close () const
int firstSetSection () const
int high () const
int lastSetSection () const
int low () const
int open () const
void setClose (int close )
void setFirstSetSection (int firstSetSection )
void setHigh (int high )
void setLastSetSection (int lastSetSection )
void setLow (int low )
void setOpen (int open )
void setTimestamp (int timestamp )
int timestamp () const

详细描述

模型映射器允许用于 QAbstractItemModel -derived model as a data source for a chart series, creating a connection between a QCandlestickSeries and the model object. A model mapper maintains an equal size across all QCandlestickSets .

注意: The model used must support adding and removing rows/columns and modifying the data of the cells.

特性文档编制

model : QAbstractItemModel *

定义映射器使用的模型。

访问函数:

QAbstractItemModel * model () const
void setModel (QAbstractItemModel * model )

通知程序信号:

void modelReplaced ()

series : QCandlestickSeries *

定义 QCandlestickSeries object that is used by the mapper.

注意: All data in the series is discarded when it is set to the mapper. When a new series is specified, the old series is disconnected (preserving its data).

访问函数:

QCandlestickSeries * series () const
void setSeries (QCandlestickSeries * series )

通知程序信号:

void seriesReplaced ()

成员函数文档编制

[explicit] QCandlestickModelMapper:: QCandlestickModelMapper ( QObject * parent = nullptr)

Constructs a model mapper object as a child of parent .

[protected] int QCandlestickModelMapper:: close () const

Returns the row/column of the model that contains the close values of the sets in the series. Default value is -1 (invalid mapping).

另请参阅 setClose ().

[protected] int QCandlestickModelMapper:: firstSetSection () const

Returns the section of the model that is used as the data source for the first candlestick set. Default value is -1 (invalid mapping).

另请参阅 setFirstSetSection ().

[protected] int QCandlestickModelMapper:: high () const

Returns the row/column of the model that contains the high values of the sets in the series. Default value is -1 (invalid mapping).

另请参阅 setHigh ().

[protected] int QCandlestickModelMapper:: lastSetSection () const

Returns the section of the model that is used as the data source for the last candlestick set. Default value is -1 (invalid mapping).

另请参阅 setLastSetSection ().

[protected] int QCandlestickModelMapper:: low () const

Returns the row/column of the model that contains the low values of the sets in the series. Default value is -1 (invalid mapping).

另请参阅 setLow ().

[signal] void QCandlestickModelMapper:: modelReplaced ()

Emitted when the model, to which the mapper is connected, has changed.

注意: 通知程序信号对于特性 model .

另请参阅 model .

[protected] int QCandlestickModelMapper:: open () const

Returns the row/column of the model that contains the open values of the sets in the series. Default value is -1 (invalid mapping).

另请参阅 setOpen ().

[pure virtual] Qt::Orientation QCandlestickModelMapper:: orientation () const

Returns the orientation that is used when QCandlestickModelMapper accesses the model. This determines whether the consecutive values of the set are read from rows ( Qt::Horizontal ) or from columns ( Qt::Vertical ).

[signal] void QCandlestickModelMapper:: seriesReplaced ()

Emitted when the series to which mapper is connected to has changed.

注意: 通知程序信号对于特性 series .

另请参阅 series .

[protected] void QCandlestickModelMapper:: setClose ( int close )

Sets the row/column of the model that contains the close values of the sets in the series. Default value is -1 (invalid mapping).

另请参阅 close ().

[protected] void QCandlestickModelMapper:: setFirstSetSection ( int firstSetSection )

Sets the section of the model that is used as the data source for the first candlestick set. Parameter firstSetSection specifies the section of the model. Default value is -1.

另请参阅 firstSetSection ().

[protected] void QCandlestickModelMapper:: setHigh ( int high )

Sets the row/column of the model that contains the high values of the sets in the series. Default value is -1 (invalid mapping).

另请参阅 high ().

[protected] void QCandlestickModelMapper:: setLastSetSection ( int lastSetSection )

Sets the section of the model that is used as the data source for the last candlestick set. Parameter lastSetSection specifies the section of the model. Default value is -1.

另请参阅 lastSetSection ().

[protected] void QCandlestickModelMapper:: setLow ( int low )

Sets the row/column of the model that contains the low values of the sets in the series. Default value is -1 (invalid mapping).

另请参阅 low ().

[protected] void QCandlestickModelMapper:: setOpen ( int open )

Sets the row/column of the model that contains the open values of the sets in the series. Default value is -1 (invalid mapping).

另请参阅 open ().

[protected] void QCandlestickModelMapper:: setTimestamp ( int timestamp )

Sets the row/column of the model that contains the timestamp values of the sets in the series. Default value is -1 (invalid mapping).

另请参阅 timestamp ().

[protected] int QCandlestickModelMapper:: timestamp () const

Returns the row/column of the model that contains the timestamp values of the sets in the series. Default value is -1 (invalid mapping).

另请参阅 setTimestamp ().