16 QML_NAMED_ELEMENT(QtShellChrome)
17 QML_ADDED_IN_VERSION(1, 0)
18 Q_DECLARE_PRIVATE(QWaylandQtShellChrome)
19 Q_PROPERTY(
bool hasDecorations READ hasDecorations NOTIFY windowMetaInfoChanged)
20 Q_PROPERTY(uint windowState READ currentWindowState NOTIFY currentWindowStateChanged)
21 Q_PROPERTY(uint windowFlags READ currentWindowFlags NOTIFY currentWindowFlagsChanged)
22 Q_PROPERTY(QWaylandQuickShellSurfaceItem *shellSurfaceItem READ shellSurfaceItem WRITE setShellSurfaceItem NOTIFY shellSurfaceItemChanged)
23 Q_PROPERTY(QRect maximizedRect READ maximizedRect WRITE setMaximizedRect NOTIFY maximizedRectChanged)
25 Q_PROPERTY(
int frameMarginLeft READ frameMarginLeft WRITE setFrameMarginLeft NOTIFY frameMarginChanged)
26 Q_PROPERTY(
int frameMarginRight READ frameMarginRight WRITE setFrameMarginRight NOTIFY frameMarginChanged)
27 Q_PROPERTY(
int frameMarginTop READ frameMarginTop WRITE setFrameMarginTop NOTIFY frameMarginChanged)
28 Q_PROPERTY(
int frameMarginBottom READ frameMarginBottom WRITE setFrameMarginBottom NOTIFY frameMarginChanged)
30 Q_PROPERTY(QQuickItem *titleBar READ titleBar WRITE setTitleBar NOTIFY titleBarChanged);
31 Q_PROPERTY(QQuickItem *leftResizeHandle READ leftResizeHandle WRITE setLeftResizeHandle NOTIFY leftResizeHandleChanged);
32 Q_PROPERTY(QQuickItem *rightResizeHandle READ rightResizeHandle WRITE setRightResizeHandle NOTIFY rightResizeHandleChanged);
33 Q_PROPERTY(QQuickItem *topResizeHandle READ topResizeHandle WRITE setTopResizeHandle NOTIFY topResizeHandleChanged);
34 Q_PROPERTY(QQuickItem *bottomResizeHandle READ bottomResizeHandle WRITE setBottomResizeHandle NOTIFY bottomResizeHandleChanged);
35 Q_PROPERTY(QQuickItem *topLeftResizeHandle READ topLeftResizeHandle WRITE setTopLeftResizeHandle NOTIFY topLeftResizeHandleChanged);
36 Q_PROPERTY(QQuickItem *topRightResizeHandle READ topRightResizeHandle WRITE setTopRightResizeHandle NOTIFY topRightResizeHandleChanged);
37 Q_PROPERTY(QQuickItem *bottomLeftResizeHandle READ bottomLeftResizeHandle WRITE setBottomLeftResizeHandle NOTIFY bottomLeftResizeHandleChanged);
38 Q_PROPERTY(QQuickItem *bottomRightResizeHandle READ bottomRightResizeHandle WRITE setBottomRightResizeHandle NOTIFY bottomRightResizeHandleChanged);
40 QWaylandQtShellChrome(QQuickItem *parent =
nullptr);
41 ~QWaylandQtShellChrome() override;
43 bool hasTitleBar()
const;
44 bool hasDecorations()
const;
45 uint currentWindowState()
const;
46 uint currentWindowFlags()
const;
48 void setMaximizedRect(
const QRect &rect);
49 QRect maximizedRect()
const;
51 void setShellSurfaceItem(QWaylandQuickShellSurfaceItem *shellSurfaceItem);
52 QWaylandQuickShellSurfaceItem *shellSurfaceItem()
const;
54 void setTitleBar(QQuickItem *item);
55 QQuickItem *titleBar()
const;
57 void setLeftResizeHandle(QQuickItem *item);
58 QQuickItem *leftResizeHandle()
const;
60 void setRightResizeHandle(QQuickItem *item);
61 QQuickItem *rightResizeHandle()
const;
63 void setTopResizeHandle(QQuickItem *item);
64 QQuickItem *topResizeHandle()
const;
66 void setBottomResizeHandle(QQuickItem *item);
67 QQuickItem *bottomResizeHandle()
const;
69 void setTopLeftResizeHandle(QQuickItem *item);
70 QQuickItem *topLeftResizeHandle()
const;
72 void setBottomLeftResizeHandle(QQuickItem *item);
73 QQuickItem *bottomLeftResizeHandle()
const;
75 void setTopRightResizeHandle(QQuickItem *item);
76 QQuickItem *topRightResizeHandle()
const;
78 void setBottomRightResizeHandle(QQuickItem *item);
79 QQuickItem *bottomRightResizeHandle()
const;
81 int frameMarginLeft()
const;
82 void setFrameMarginLeft(
int left);
84 int frameMarginRight()
const;
85 void setFrameMarginRight(
int right);
87 int frameMarginTop()
const;
88 void setFrameMarginTop(
int top);
90 int frameMarginBottom()
const;
91 void setFrameMarginBottom(
int bottom);
94 void currentWindowStateChanged();
95 void currentWindowFlagsChanged();
96 void windowMetaInfoChanged();
97 void shellSurfaceItemChanged();
98 void maximizedRectChanged();
100 void titleBarChanged();
101 void leftResizeHandleChanged();
102 void rightResizeHandleChanged();
103 void topResizeHandleChanged();
104 void bottomResizeHandleChanged();
105 void topLeftResizeHandleChanged();
106 void bottomLeftResizeHandleChanged();
107 void topRightResizeHandleChanged();
108 void bottomRightResizeHandleChanged();
113 void clientDestroyed();
114 void frameMarginChanged();
119 void toggleMaximized();
120 void toggleMinimized();
121 void toggleFullScreen();
126 void activateOnGrab(QPointingDevice::GrabTransition transition);
127 void updateSurface();
128 void updateShellSurface();
129 void updateWindowFlags();
130 void updateWindowState();
131 void updateGeometry();
132 void updateDecorations();
133 void updateActiveState();
134 void updateAutomaticPosition();
140 void topLeftResize();
141 void topRightResize();
142 void bottomLeftResize();
143 void bottomRightResize();
147 QWaylandQtShellChrome(QWaylandQtShellChromePrivate &dd, QQuickItem *parent);
150 void setWindowState(uint nextState);
152 QRect maxContentRect()
const;