/*! Detach items from the dictionary \param rtti In case of QwtPolarItem::Rtti_PlotItem detach all items otherwise only those items of the type rtti. \param autoDelete If true, delete all detached items */ void QwtPolarItemDict::detachItems( int rtti, bool autoDelete ) { PrivateData::ItemList list = d_data->itemList; QwtPolarItemIterator it = list.begin(); while ( it != list.end() ) { QwtPolarItem *item = *it; ++it; // increment before removing item from the list if ( rtti == QwtPolarItem::Rtti_PolarItem || item->rtti() == rtti ) { item->attach( NULL ); if ( autoDelete ) delete item; } } }