diff options
Diffstat (limited to 'libpyside/destroylistener.h')
-rw-r--r-- | libpyside/destroylistener.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/libpyside/destroylistener.h b/libpyside/destroylistener.h new file mode 100644 index 000000000..54dda2c2e --- /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 + |