New signal, in Scene_item, that will be emitted just before an item is

destroyed by the scene.
This commit is contained in:
Laurent Rineau 2009-04-27 13:40:59 +00:00
parent 50a9d76db0
commit edcd3846c3
2 changed files with 10 additions and 0 deletions

View File

@ -4,6 +4,11 @@ const QColor Scene_item::defaultColor = QColor(100, 100, 255);
Scene_item::~Scene_item() {}
void Scene_item::itemAboutToBeDestroyed(Scene_item* item) {
if(this == item)
emit aboutToBeDestroyed();
}
// Rendering mode as a human readable string
QString Scene_item::renderingModeName() const
{

View File

@ -76,6 +76,11 @@ public slots:
rendering_mode = m;
}
virtual void itemAboutToBeDestroyed(Scene_item*);
signals:
void aboutToBeDestroyed();
protected:
// The four basic properties
QString name_;