Public Member Functions | |
| void | insert (const QwtLegendItemManager *, QWidget *) |
| void | remove (const QwtLegendItemManager *) |
| void | remove (QWidget *) |
| void | clear () |
| uint | count () const |
| const QWidget * | find (const QwtLegendItemManager *) const |
| QWidget * | find (const QwtLegendItemManager *) |
| const QwtLegendItemManager * | find (const QWidget *) const |
| QwtLegendItemManager * | find (const QWidget *) |
| const QMap< QWidget *, const QwtLegendItemManager * > & | widgetMap () const |
| QMap< QWidget *, const QwtLegendItemManager * > & | widgetMap () |
Definition at line 26 of file qwt_legend.cpp.
| void QwtLegend::PrivateData::LegendMap::clear | ( | ) |
Definition at line 174 of file qwt_legend.cpp.
References int().
{
/*
We can't delete the widgets in the following loop, because
we would get ChildRemoved events, changing d_itemMap, while
we are iterating.
*/
#if QT_VERSION < 0x040000
QValueList<QWidget *> widgets;
QMap<const QwtLegendItemManager *, QWidget *>::const_iterator it;
for ( it = d_itemMap.begin(); it != d_itemMap.end(); ++it )
widgets.append(it.data());
#else
QList<QWidget *> widgets;
QMap<const QwtLegendItemManager *, QWidget *>::const_iterator it;
for ( it = d_itemMap.begin(); it != d_itemMap.end(); ++it )
widgets.append(it.value());
#endif
d_itemMap.clear();
d_widgetMap.clear();
for ( int i = 0; i < (int)widgets.size(); i++ )
delete widgets[i];
}
| uint QwtLegend::PrivateData::LegendMap::count | ( | ) | const |
Definition at line 204 of file qwt_legend.cpp.
{
return d_itemMap.count();
}
| const QwtLegendItemManager * QwtLegend::PrivateData::LegendMap::find | ( | const QWidget * | widget ) | const [inline] |
Definition at line 225 of file qwt_legend.cpp.
{
if ( !d_widgetMap.contains((QWidget *)widget) )
return NULL;
return d_widgetMap[(QWidget *)widget];
}
| QwtLegendItemManager * QwtLegend::PrivateData::LegendMap::find | ( | const QWidget * | widget ) | [inline] |
Definition at line 234 of file qwt_legend.cpp.
{
if ( !d_widgetMap.contains((QWidget *)widget) )
return NULL;
return (QwtLegendItemManager *)d_widgetMap[(QWidget *)widget];
}
| const QWidget * QwtLegend::PrivateData::LegendMap::find | ( | const QwtLegendItemManager * | item ) | const [inline] |
Definition at line 209 of file qwt_legend.cpp.
{
if ( !d_itemMap.contains((QwtLegendItemManager *)item) )
return NULL;
return d_itemMap[(QwtLegendItemManager *)item];
}
| QWidget * QwtLegend::PrivateData::LegendMap::find | ( | const QwtLegendItemManager * | item ) | [inline] |
Definition at line 217 of file qwt_legend.cpp.
{
if ( !d_itemMap.contains((QwtLegendItemManager *)item) )
return NULL;
return d_itemMap[(QwtLegendItemManager *)item];
}
| void QwtLegend::PrivateData::LegendMap::insert | ( | const QwtLegendItemManager * | item, |
| QWidget * | widget | ||
| ) |
Definition at line 153 of file qwt_legend.cpp.
{
d_itemMap.insert(item, widget);
d_widgetMap.insert(widget, item);
}
| void QwtLegend::PrivateData::LegendMap::remove | ( | const QwtLegendItemManager * | item ) |
Definition at line 160 of file qwt_legend.cpp.
{
QWidget *widget = d_itemMap[item];
d_itemMap.remove(item);
d_widgetMap.remove(widget);
}
| void QwtLegend::PrivateData::LegendMap::remove | ( | QWidget * | widget ) |
Definition at line 167 of file qwt_legend.cpp.
{
const QwtLegendItemManager *item = d_widgetMap[widget];
d_itemMap.remove(item);
d_widgetMap.remove(widget);
}
| const QMap< QWidget *, const QwtLegendItemManager * > & QwtLegend::PrivateData::LegendMap::widgetMap | ( | ) | const [inline] |
Definition at line 244 of file qwt_legend.cpp.
{
return d_widgetMap;
}
| QMap< QWidget *, const QwtLegendItemManager * > & QwtLegend::PrivateData::LegendMap::widgetMap | ( | ) | [inline] |
Definition at line 250 of file qwt_legend.cpp.
{
return d_widgetMap;
}
1.7.2