Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qwaylandxdgshellintegration_p.h
Go to the documentation of this file.
1// Copyright (C) 2018 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4#ifndef QWAYLANDXDGSHELLINTEGRATION_H
5#define QWAYLANDXDGSHELLINTEGRATION_H
6
7#include <QtWaylandCompositor/private/qwaylandquickshellsurfaceitem_p.h>
8#include <QtWaylandCompositor/QWaylandQuickShellSurfaceItem>
9#include <QtWaylandCompositor/QWaylandXdgToplevel>
10
12
13//
14// W A R N I N G
15// -------------
16//
17// This file is not part of the Qt API. It exists purely as an
18// implementation detail. This header file may change from version to
19// version without notice, or even be removed.
20//
21// We mean it.
22//
23
25
26namespace QtWayland {
27
29{
31public:
33
34protected:
35 bool eventFilter(QObject *object, QEvent *event) override;
36
37private Q_SLOTS:
38 void handleStartMove(QWaylandSeat *seat);
39 void handleStartResize(QWaylandSeat *seat, Qt::Edges edges);
40 void handleSetMaximized();
41 void handleUnsetMaximized();
42 void handleMaximizedChanged();
43 void handleSetFullscreen();
44 void handleUnsetFullscreen();
45 void handleFullscreenChanged();
46 void handleActivatedChanged();
47 void handleSurfaceSizeChanged();
48 void handleToplevelDestroyed();
49 void handleMaximizedSizeChanged();
50 void handleFullscreenSizeChanged();
51
52private:
53 QWaylandQuickShellSurfaceItem *m_item = nullptr;
54 QWaylandXdgSurface *m_xdgSurface = nullptr;
55 QWaylandXdgToplevel *m_toplevel = nullptr;
56
57 enum class GrabberState {
58 Default,
59 Resize,
60 Move
61 };
62 GrabberState grabberState;
63
64 struct {
65 QWaylandSeat *seat = nullptr;
68 } moveState;
69
70 struct {
71 QWaylandSeat *seat = nullptr;
72 Qt::Edges resizeEdges;
77 bool initialized;
78 } resizeState;
79
80 struct {
83 } windowedGeometry;
84
85 struct {
87 QMetaObject::Connection sizeChangedConnection; // Depending on whether maximized or fullscreen,
88 // will be hooked to geometry-changed or available-
89 // geometry-changed.
90 } nonwindowedState;
91
92 bool filterPointerMoveEvent(const QPointF &scenePosition);
93 bool filterMouseMoveEvent(QMouseEvent *event);
94 bool filterPointerReleaseEvent();
95 bool filterTouchUpdateEvent(QTouchEvent *event);
96};
97
99{
101public:
103
104private Q_SLOTS:
105 void handleGeometryChanged();
106
107private:
108 QWaylandQuickShellSurfaceItem *m_item = nullptr;
109 QWaylandXdgSurface *m_xdgSurface = nullptr;
110 QWaylandXdgPopup *m_popup = nullptr;
111};
112
113}
114
116
117#endif // QWAYLANDXDGSHELLINTEGRATION_H
\inmodule QtCore
Definition qcoreevent.h:45
\inmodule QtCore Represents a handle to a signal-slot (or signal-functor) connection.
\inmodule QtGui
Definition qevent.h:196
\inmodule QtCore
Definition qobject.h:103
\inmodule QtCore\reentrant
Definition qpoint.h:217
\inmodule QtCore
Definition qsize.h:208
\inmodule QtCore
Definition qsize.h:25
The QTouchEvent class contains parameters that describe a touch event.
Definition qevent.h:917
\qmltype WaylandOutput \instantiates QWaylandOutput \inqmlmodule QtWayland.Compositor
\qmltype ShellSurfaceItem \instantiates QWaylandQuickShellSurfaceItem \inherits WaylandQuickItem \inq...
\qmltype WaylandSeat \instantiates QWaylandSeat \inqmlmodule QtWayland.Compositor
\qmltype XdgPopup \instantiates QWaylandXdgPopup \inqmlmodule QtWayland.Compositor....
\qmltype XdgSurface \instantiates QWaylandXdgSurface \inqmlmodule QtWayland.Compositor....
\qmltype XdgToplevel \instantiates QWaylandXdgToplevel \inqmlmodule QtWayland.Compositor....
XdgPopupIntegration(QWaylandQuickShellSurfaceItem *item)
bool eventFilter(QObject *object, QEvent *event) override
Filters events if this object has been installed as an event filter for the watched object.
XdgToplevelIntegration(QWaylandQuickShellSurfaceItem *item)
Combined button and popup list for selecting options.
struct _cl_event * event
@ Default
#define Q_OBJECT
#define Q_SLOTS
QGraphicsItem * item