12345678910111213141516171819202122232425262728 |
- #include "dropshadowmgr.h"
- #include "idropshadowable.h"
- #include <QEvent>
- DropShadowMgr::DropShadowMgrGarbo DropShadowMgr::garbo;
- DropShadowMgr* DropShadowMgr::sm_pInstance = new DropShadowMgr(nullptr);
- QList<BoxShadow> DropShadowMgr::sm_cacheShadows;
- bool DropShadowMgr::eventFilter(QObject *watched, QEvent *event)
- {
- IDropShadowable *pDropShadowableObj = dynamic_cast<IDropShadowable*>(watched);
- if(pDropShadowableObj == nullptr)
- {
- return QObject::eventFilter(watched, event);
- }
- if(event->type() == QEvent::Paint)
- {
- pDropShadowableObj->PaintShadows();
- }
- return QObject::eventFilter(watched, event);
- }
|