QWindowKit  1.5.1.0
Cross-platform window customization framework
Loading...
Searching...
No Matches
widgetitemdelegate_p.h
1// Copyright (C) 2023-present Stdware Collections (https://www.github.com/stdware)
2// Copyright (C) 2021-2023 wangwenx190 (Yuhang Zhao)
3// SPDX-License-Identifier: Apache-2.0
4
5#ifndef WIDGETITEMDELEGATE_P_H
6#define WIDGETITEMDELEGATE_P_H
7
8//
9// W A R N I N G !!!
10// -----------------
11//
12// This file is not part of the QWindowKit API. It is used purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or may even be removed.
15//
16
17#include <QtCore/QObject>
18#include <QtGui/QWindow>
19
20#include <QWKCore/private/windowitemdelegate_p.h>
21#include <QWKWidgets/qwkwidgetsglobal.h>
22
23namespace QWK {
24
25 class QWK_WIDGETS_EXPORT WidgetItemDelegate : public WindowItemDelegate {
26 public:
27 WidgetItemDelegate();
28 ~WidgetItemDelegate() override;
29
30 public:
31 QWindow *window(const QObject *obj) const override;
32 bool isEnabled(const QObject *obj) const override;
33 bool isVisible(const QObject *obj) const override;
34 QRect mapGeometryToScene(const QObject *obj) const override;
35
36 QWindow *hostWindow(const QObject *host) const override;
37 bool isWindowActive(const QObject *host) const override;
38 Qt::WindowStates getWindowState(const QObject *host) const override;
39 Qt::WindowFlags getWindowFlags(const QObject *host) const override;
40 QRect getGeometry(const QObject *host) const override;
41
42 void resetQtGrabbedControl(QObject *host) const override;
43 void setWindowState(QObject *host, Qt::WindowStates state) const override;
44 void setCursorShape(QObject *host, Qt::CursorShape shape) const override;
45 void restoreCursorShape(QObject *host) const override;
46 void setWindowFlags(QObject *host, Qt::WindowFlags flags) const override;
47 void setWindowVisible(QObject *host, bool visible) const override;
48 void setGeometry(QObject *host, const QRect &rect) override;
49 void bringWindowToTop(QObject *host) const override;
50
51 WinIdChangeEventFilter *
52 createWinIdEventFilter(QObject *host, AbstractWindowContext *context) const override;
53 };
54
55}
56
57#endif // WIDGETITEMDELEGATE_P_H
QWindowKit namespace.
Definition abstractwindowcontext.cpp:13