aboutsummaryrefslogtreecommitdiffstats
path: root/libpyside/destroylistener.h
blob: 54dda2c2ede288316fcdedcb000b10624fd2aa83 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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