diff options
Diffstat (limited to 'PySide/phonon/pyside_phonon.h')
-rw-r--r-- | PySide/phonon/pyside_phonon.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/PySide/phonon/pyside_phonon.h b/PySide/phonon/pyside_phonon.h new file mode 100644 index 000000000..c9d262828 --- /dev/null +++ b/PySide/phonon/pyside_phonon.h @@ -0,0 +1,39 @@ +#ifndef PYSIDE_PHONON +#define PYSIDE_PHONON + +#include <QObject> +#include <phonon/backendcapabilities.h> + +namespace Phonon +{ +namespace BackendCapabilities +{ + class NotifierWrapper : public QObject + { + public: + + inline static NotifierWrapper* notifier() { + Notifier* notifier = BackendCapabilities::notifier(); + + if (notifier != m_notifier) { + delete m_instance; + m_instance = new NotifierWrapper(notifier); + + } + + return m_instance; + } + + inline const QMetaObject* metaObject() const { return m_notifier->metaObject(); } + + private: + static NotifierWrapper* m_instance; + static Notifier* m_notifier; + + NotifierWrapper(Notifier* notifier) { m_notifier = notifier; } + NotifierWrapper() {} + }; +} +} + +#endif |