QwtPlotDict organizes plot items in increasing z-order. If autoDelete() is enabled, all attached items will be deleted in the destructor of the dictionary.
Definition at line 42 of file qwt_plot_dict.h.
Public Member Functions | |
QwtPlotDict () | |
~QwtPlotDict () | |
void | setAutoDelete (bool) |
bool | autoDelete () const |
const QwtPlotItemList & | itemList () const |
void | detachItems (int rtti=QwtPlotItem::Rtti_PlotItem, bool autoDelete=true) |
Friends | |
class | QwtPlotItem |
QwtPlotDict::QwtPlotDict | ( | ) | [explicit] |
Constructor
Auto deletion is enabled.
Definition at line 95 of file qwt_plot_dict.cpp.
QwtPlotDict::~QwtPlotDict | ( | ) |
Destructor
If autoDelete is on, all attached items will be deleted
Definition at line 107 of file qwt_plot_dict.cpp.
References detachItems().
void QwtPlotDict::setAutoDelete | ( | bool | autoDelete | ) |
En/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.
Definition at line 121 of file qwt_plot_dict.cpp.
bool QwtPlotDict::autoDelete | ( | ) | const |
Definition at line 130 of file qwt_plot_dict.cpp.
Referenced by QwtPlot::~QwtPlot().
const QwtPlotItemList & QwtPlotDict::itemList | ( | ) | const |
A QwtPlotItemList 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.
Definition at line 187 of file qwt_plot_dict.cpp.
Referenced by QwtPlotPrintFilter::apply(), QwtPlot::drawItems(), QwtPlot::insertLegend(), QwtPlotPrintFilter::reset(), and QwtPlot::updateAxes().
void QwtPlotDict::detachItems | ( | int | rtti = QwtPlotItem::Rtti_PlotItem , |
|
bool | autoDelete = true | |||
) |
Detach items from the dictionary
rtti | In case of QwtPlotItem::Rtti_PlotItem detach all items otherwise only those items of the type rtti. | |
autoDelete | If true, delete all detached items |
Definition at line 162 of file qwt_plot_dict.cpp.
References QwtPlotItem::attach(), and QwtPlotItem::rtti().
Referenced by QwtPlot::clear(), QwtPlot::~QwtPlot(), and ~QwtPlotDict().