summaryrefslogtreecommitdiffstats
path: root/libpyside/destroylistener.h
diff options
context:
space:
mode:
Diffstat (limited to 'libpyside/destroylistener.h')
-rw-r--r--libpyside/destroylistener.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/libpyside/destroylistener.h b/libpyside/destroylistener.h
new file mode 100644
index 0000000..54dda2c
--- /dev/null
+++ b/libpyside/destroylistener.h
@@ -0,0 +1,32 @@
+#ifndef PYSIDE_DESTROY_LISTENER
+#define PYSIDE_DESTROY_LISTENER
+
+
+#include <QObject>
+#include "pysidemacros.h"
+
+namespace PySide
+{
+class DestroyListenerPrivate;
+class PYSIDE_API DestroyListener : public QObject
+{
+ Q_OBJECT
+ public:
+ static DestroyListener* instance();
+ static void destroy();
+ void listen(QObject* obj);
+
+ public slots:
+ void onObjectDestroyed(QObject* obj);
+
+ private:
+ static DestroyListener* m_instance;
+ DestroyListenerPrivate* m_d;
+ DestroyListener(QObject *parent);
+ ~DestroyListener();
+};
+
+}//namespace
+
+#endif
+