QxGraph_Prs destructor: delete all existing graphic items.
*/
QxGraph_Canvas::~QxGraph_Canvas()
{
- QObjectList* aNodeList = queryList("QObject");
+ /*QObjectList* aNodeList = queryList("QObject");
QObjectListIt aIt(*aNodeList);
QObject* anObj;
while ( (anObj = aIt.current()) != 0 ) {
aNodeList->removeRef(anObj);
delete anObj;
}
- delete aNodeList;
+ delete aNodeList;*/
+
+ myPrsList.setAutoDelete(true);
+ myPrsList.clear();
}
/*!
*/
QxGraph_Prs::~QxGraph_Prs()
{
-
+ for ( DMode2ItemList::iterator it1 = myDisplayMap.begin();
+ it1 != myDisplayMap.end();
+ it1++ )
+ {
+ for ( std::list<QCanvasItem*>::iterator it2 = (*it1).second.begin();
+ it2 != (*it1).second.end();
+ it2++ )
+ {
+ QCanvasItem* anItem = *it2;
+ if ( anItem ) delete anItem;
+ }
+ }
+
+ myDisplayMap.clear();
}
/*!
*/
void QxGraph_Prs::show()
{
- if ( isToUpdate() )
+ if ( isToUpdate() )
update();
for ( std::list<QCanvasItem*>::iterator it = myDisplayMap[myDMode].begin();