|
QWT API (English) 7.3.0
Qt Widget Library for Technical Applications - English API Documentation
|
A dictionary for plot items. More...
#include <qwt_plot_dict.h>
Classes | |
| class | PrivateData |
Public Member Functions | |
| 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 Member Functions | |
| 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.
|
explicit |
Constructor.
Auto deletion is enabled.
Destructor
If autoDelete() is on, all attached items will be deleted.
| bool QwtPlotDict::autoDelete | ( | ) | const |
Check if auto deletion is enabled.
| void QwtPlotDict::detachItems | ( | int | rtti = QwtPlotItem::Rtti_PlotItem, |
| bool | autoDelete = true |
||
| ) |
Detach items from the dictionary.
| [in] | rtti | In case of QwtPlotItem::Rtti_PlotItem detach all items, otherwise only those items of the type rtti. |
| [in] | autoDelete | If true, delete all detached items |
|
protected |
Insert an item into the dictionary.
Insert a plot item.
| item | PlotItem |
| 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.
| QwtPlotItemList QwtPlotDict::itemList | ( | int | rtti | ) | const |
Get the list of all attached plot items of a specific type.
| [in] | rtti | See QwtPlotItem::RttiValues |
|
protected |
Remove an item from the dictionary.
Remove a plot item.
| item | PlotItem |
| 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] | autoDelete | True to enable auto deletion |