QWT API (中文) 7.3.0
Qt绘图库 - 中文API文档
载入中...
搜索中...
未找到
类 | Public 成员函数 | Protected 成员函数 | 所有成员列表
QwtPlotDict类 参考

A dictionary for plot items 更多...

#include <qwt_plot_dict.h>

类 QwtPlotDict 继承关系图:
QwtPlot

类

class  PrivateData
 

Public 成员函数

 QwtPlotDict ()
 Constructor
 
void setAutoDelete (bool)
 Enable/disable auto deletion
 
bool autoDelete () const
 Check if auto deletion is enabled
 
const QwtPlotItemList & itemList () const
 Get the list of all attached plot items
 
QwtPlotItemList itemList (int rtti) const
 Get the list of all attached plot items of a specific type
 
void detachItems (int rtti=QwtPlotItem::Rtti_PlotItem, bool autoDelete=true)
 Detach items from the dictionary
 

Protected 成员函数

void insertItem (QwtPlotItem *)
 Insert an item into the dictionary
 
void removeItem (QwtPlotItem *)
 Remove an item from the dictionary
 

详细描述

A dictionary for plot items

QwtPlotDict organizes plot items in increasing z-order. If autoDelete() is enabled, all attached items will be deleted in the destructor of the dictionary. QwtPlotDict can be used to get access to all QwtPlotItem items - or all items of a specific type - that are currently on the plot.

参见
QwtPlotItem::attach(), QwtPlotItem::detach(), QwtPlotItem::z()

构造及析构函数说明

◆ QwtPlotDict()

QwtPlotDict::QwtPlotDict ( )
explicit

Constructor

Auto deletion is enabled.

参见
setAutoDelete(), QwtPlotItem::attach()

Destructor

If autoDelete() is on, all attached items will be deleted.

参见
setAutoDelete(), autoDelete(), QwtPlotItem::attach()

成员函数说明

◆ autoDelete()

bool QwtPlotDict::autoDelete ( ) const

Check if auto deletion is enabled

返回
True if auto deletion is enabled
参见
setAutoDelete(), insertItem()

◆ detachItems()

void QwtPlotDict::detachItems ( int  rtti = QwtPlotItem::Rtti_PlotItem,
bool  autoDelete = true 
)

Detach items from the dictionary

参数
[in]rttiIn case of QwtPlotItem::Rtti_PlotItem detach all items, otherwise only those items of the type rtti.
[in]autoDeleteIf true, delete all detached items

◆ insertItem()

void QwtPlotDict::insertItem ( QwtPlotItem *  item)
protected

Insert an item into the dictionary

Insert a plot item

参数
itemPlotItem
参见
removeItem()

◆ itemList() [1/2]

const QwtPlotItemList & QwtPlotDict::itemList ( ) const

Get the list of all attached plot items

Use caution when iterating these lists, as removing/detaching an item will invalidate the iterator. Instead you can place pointers to objects to be removed in a removal list, and traverse that list later.

返回
List of all attached plot items

◆ itemList() [2/2]

QwtPlotItemList QwtPlotDict::itemList ( int  rtti) const

Get the list of all attached plot items of a specific type

参数
[in]rttiSee QwtPlotItem::RttiValues
返回
List of all attached plot items of a specific type
参见
QwtPlotItem::rtti()

◆ removeItem()

void QwtPlotDict::removeItem ( QwtPlotItem *  item)
protected

Remove an item from the dictionary

Remove a plot item

参数
itemPlotItem
参见
insertItem()

◆ setAutoDelete()

void QwtPlotDict::setAutoDelete ( bool  autoDelete)

Enable/disable auto deletion

If Auto deletion is on all attached plot items will be deleted in the destructor of QwtPlotDict. The default value is on.

参数
[in]autoDeleteTrue to enable auto deletion
参见
autoDelete(), insertItem()

该类的文档由以下文件生成: