Classes | Public Member Functions | Protected Member Functions | Private Attributes
QwtPlotDict Class Reference

A dictionary for plot items. More...

#include <qwt_plot_dict.h>

Inheritance diagram for QwtPlotDict:
Inheritance graph
[legend]

List of all members.

Classes

class  PrivateData

Public Member Functions

bool autoDelete () const
void detachItems (int rtti=QwtPlotItem::Rtti_PlotItem, bool autoDelete=true)
const QwtPlotItemListitemList () const
 A QwtPlotItemList of all attached plot items.
QwtPlotItemList itemList (int rtti) const
 QwtPlotDict ()
void setAutoDelete (bool)
virtual ~QwtPlotDict ()

Protected Member Functions

void insertItem (QwtPlotItem *)
void removeItem (QwtPlotItem *)

Private Attributes

PrivateDatad_data

Detailed Description

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.

See also:
QwtPlotItem::attach(), QwtPlotItem::detach(), QwtPlotItem::z()

Definition at line 34 of file qwt_plot_dict.h.


Constructor & Destructor Documentation

QwtPlotDict::QwtPlotDict ( ) [explicit]

Constructor

Auto deletion is enabled.

See also:
setAutoDelete(), QwtPlotItem::attach()

Definition at line 68 of file qwt_plot_dict.cpp.

Destructor

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

See also:
setAutoDelete(), autoDelete(), QwtPlotItem::attach()

Definition at line 80 of file qwt_plot_dict.cpp.


Member Function Documentation

bool QwtPlotDict::autoDelete ( ) const
Returns:
true if auto deletion is enabled
See also:
setAutoDelete(), insertItem()

Definition at line 103 of file qwt_plot_dict.cpp.

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

Detach items from the dictionary

Parameters:
rttiIn case of QwtPlotItem::Rtti_PlotItem detach all items otherwise only those items of the type rtti.
autoDeleteIf true, delete all detached items

Definition at line 137 of file qwt_plot_dict.cpp.

void QwtPlotDict::insertItem ( QwtPlotItem item) [protected]

Insert a plot item

Parameters:
itemPlotItem
See also:
removeItem()

Definition at line 114 of file qwt_plot_dict.cpp.

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.

Returns:
List of all attached plot items.

Definition at line 165 of file qwt_plot_dict.cpp.

Returns:
List of all attached plot items of a specific type.
Parameters:
rttiSee QwtPlotItem::RttiValues
See also:
QwtPlotItem::rtti()

Definition at line 175 of file qwt_plot_dict.cpp.

void QwtPlotDict::removeItem ( QwtPlotItem item) [protected]

Remove a plot item

Parameters:
itemPlotItem
See also:
insertItem()

Definition at line 125 of file qwt_plot_dict.cpp.

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.

See also:
autoDelete(), insertItem()

Definition at line 94 of file qwt_plot_dict.cpp.


Member Data Documentation

Reimplemented in QwtPlot.

Definition at line 54 of file qwt_plot_dict.h.


The documentation for this class was generated from the following files:


plotjuggler
Author(s): Davide Faconti
autogenerated on Fri Sep 1 2017 02:41:58