Yuhang Zhao
2023-12-05 9b1599d82e86d2d0463b60fe6fa61f94be50f983
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
33
34
#ifndef WINDOWITEMDELEGATE_H
#define WINDOWITEMDELEGATE_H
 
#include <QtCore/QObject>
#include <QtCore/QPoint>
#include <QtGui/QWindow>
 
#include <QWKCore/corewindowagent.h>
 
namespace QWK {
 
    class QWK_CORE_EXPORT WindowItemDelegate {
    public:
        WindowItemDelegate();
        virtual ~WindowItemDelegate();
 
    public:
        virtual QWindow *window(QObject *obj) const = 0;
 
        // Property query
        virtual bool isEnabled(QObject *obj) const = 0;
        virtual bool isVisible(QObject *obj) const = 0;
        virtual QRect mapGeometryToScene(const QObject *obj) const = 0;
 
        // Callbacks
        virtual bool resetQtGrabbedControl() const;
 
    private:
        Q_DISABLE_COPY_MOVE(WindowItemDelegate)
    };
 
}
 
#endif // WINDOWITEMDELEGATE_H