Sine Striker
2023-12-18 8b72eabae325c34d8eab1544203993015cc91741
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
35
36
37
38
39
40
41
42
43
44
#ifndef WINDOWITEMDELEGATE_P_H
#define WINDOWITEMDELEGATE_P_H
 
#include <QtCore/QObject>
#include <QtCore/QPoint>
#include <QtGui/QWindow>
 
#include <QWKCore/qwkglobal.h>
 
namespace QWK {
 
    class QWK_CORE_EXPORT WindowItemDelegate {
    public:
        WindowItemDelegate();
        virtual ~WindowItemDelegate();
 
    public:
        // Item property query
        virtual QWindow *window(const QObject *obj) const = 0;
        virtual bool isEnabled(const QObject *obj) const = 0;
        virtual bool isVisible(const QObject *obj) const = 0;
        virtual QRect mapGeometryToScene(const QObject *obj) const = 0;
 
        // Host property query
        virtual QWindow *hostWindow(const QObject *host) const = 0;
        virtual bool isHostSizeFixed(const QObject *host) const = 0;
        virtual bool isWindowActive(const QObject *host) const = 0;
        virtual Qt::WindowStates getWindowState(const QObject *host) const = 0;
        virtual Qt::WindowFlags getWindowFlags(const QObject *host) const = 0;
 
        // Callbacks
        virtual void resetQtGrabbedControl(QObject *host) const;
        virtual void setWindowState(QObject *host, Qt::WindowStates state) const = 0;
        virtual void setCursorShape(QObject *host, Qt::CursorShape shape) const = 0;
        virtual void restoreCursorShape(QObject *host) const = 0;
        virtual void setWindowFlags(QObject *host, Qt::WindowFlags flags) const = 0;
 
    private:
        Q_DISABLE_COPY(WindowItemDelegate)
    };
 
}
 
#endif // WINDOWITEMDELEGATE_P_H