12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- #ifndef DROPSHADOWMGR_H
- #define DROPSHADOWMGR_H
- #include <QObject>
- #include "idropshadowable.h"
- class DropShadowMgr : public QObject
- {
- Q_OBJECT
- public:
- static DropShadowMgr* Instance(){return sm_pInstance;}
- ~DropShadowMgr() override {sm_pInstance = nullptr;}
- public:
-
- static QList<BoxShadow> sm_cacheShadows;
- private:
- DropShadowMgr(QObject *parent = nullptr):QObject(parent){}
-
- DropShadowMgr(DropShadowMgr const&) = delete;
- DropShadowMgr& operator=(DropShadowMgr const&) = delete;
-
- private:
- static DropShadowMgr* sm_pInstance;
- public:
- virtual bool eventFilter(QObject *watched, QEvent *event) override;
-
- private:
- class DropShadowMgrGarbo
- {
- public:
- ~DropShadowMgrGarbo()
- {
- if(DropShadowMgr::sm_pInstance != nullptr)
- delete DropShadowMgr::sm_pInstance;
- }
- };
- static DropShadowMgrGarbo garbo;
-
- };
- #endif
|