Yuhang Zhao
2023-12-06 c9261fbd7019264e8543507e3afaec63d55595a2
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 COREWINDOWAGENT_H
#define COREWINDOWAGENT_H
 
#include <QtCore/QObject>
 
#include <QWKCore/qwkcoreglobal.h>
 
namespace QWK {
 
    class CoreWindowAgentPrivate;
 
    class QWK_CORE_EXPORT CoreWindowAgent : public QObject {
        Q_OBJECT
        Q_DECLARE_PRIVATE(CoreWindowAgent)
    public:
        ~CoreWindowAgent() override;
 
        enum SystemButton {
            Unknown,
            WindowIcon,
            Help,
            Minimize,
            Maximize,
            Close,
            NumSystemButton,
        };
        Q_ENUM(SystemButton)
 
    public Q_SLOTS:
        void showSystemMenu(const QPoint &pos);
        void startSystemMove(const QPoint &pos);
        void startSystemResize(Qt::Edges edges, const QPoint &pos);
        void centralize();
        void raise();
 
    protected:
        explicit CoreWindowAgent(CoreWindowAgentPrivate &d, QObject *parent = nullptr);
 
        const std::unique_ptr<CoreWindowAgentPrivate> d_ptr;
    };
 
}
 
#endif // COREWINDOWAGENT_H