17 QML_NAMED_ELEMENT(QtShellChrome)
18 QML_ADDED_IN_VERSION(1, 0)
19 Q_DECLARE_PRIVATE(QWaylandQtShellChrome)
20 Q_PROPERTY(
bool hasDecorations READ hasDecorations NOTIFY windowMetaInfoChanged)
21 Q_PROPERTY(uint windowState READ currentWindowState NOTIFY currentWindowStateChanged)
22 Q_PROPERTY(uint windowFlags READ currentWindowFlags NOTIFY currentWindowFlagsChanged)
23 Q_PROPERTY(QWaylandQuickShellSurfaceItem *shellSurfaceItem READ shellSurfaceItem WRITE setShellSurfaceItem NOTIFY shellSurfaceItemChanged)
24 Q_PROPERTY(QRect maximizedRect READ maximizedRect WRITE setMaximizedRect NOTIFY maximizedRectChanged)
26 Q_PROPERTY(
int frameMarginLeft READ frameMarginLeft WRITE setFrameMarginLeft NOTIFY frameMarginChanged)
27 Q_PROPERTY(
int frameMarginRight READ frameMarginRight WRITE setFrameMarginRight NOTIFY frameMarginChanged)
28 Q_PROPERTY(
int frameMarginTop READ frameMarginTop WRITE setFrameMarginTop NOTIFY frameMarginChanged)
29 Q_PROPERTY(
int frameMarginBottom READ frameMarginBottom WRITE setFrameMarginBottom NOTIFY frameMarginChanged)
31 Q_PROPERTY(QQuickItem *titleBar READ titleBar WRITE setTitleBar NOTIFY titleBarChanged);
32 Q_PROPERTY(QQuickItem *leftResizeHandle READ leftResizeHandle WRITE setLeftResizeHandle NOTIFY leftResizeHandleChanged);
33 Q_PROPERTY(QQuickItem *rightResizeHandle READ rightResizeHandle WRITE setRightResizeHandle NOTIFY rightResizeHandleChanged);
34 Q_PROPERTY(QQuickItem *topResizeHandle READ topResizeHandle WRITE setTopResizeHandle NOTIFY topResizeHandleChanged);
35 Q_PROPERTY(QQuickItem *bottomResizeHandle READ bottomResizeHandle WRITE setBottomResizeHandle NOTIFY bottomResizeHandleChanged);
36 Q_PROPERTY(QQuickItem *topLeftResizeHandle READ topLeftResizeHandle WRITE setTopLeftResizeHandle NOTIFY topLeftResizeHandleChanged);
37 Q_PROPERTY(QQuickItem *topRightResizeHandle READ topRightResizeHandle WRITE setTopRightResizeHandle NOTIFY topRightResizeHandleChanged);
38 Q_PROPERTY(QQuickItem *bottomLeftResizeHandle READ bottomLeftResizeHandle WRITE setBottomLeftResizeHandle NOTIFY bottomLeftResizeHandleChanged);
39 Q_PROPERTY(QQuickItem *bottomRightResizeHandle READ bottomRightResizeHandle WRITE setBottomRightResizeHandle NOTIFY bottomRightResizeHandleChanged);
41 QWaylandQtShellChrome(QQuickItem *parent =
nullptr);
42 ~QWaylandQtShellChrome() override;
44 bool hasTitleBar()
const;
45 bool hasDecorations()
const;
46 uint currentWindowState()
const;
47 uint currentWindowFlags()
const;
49 void setMaximizedRect(
const QRect &rect);
50 QRect maximizedRect()
const;
52 void setShellSurfaceItem(QWaylandQuickShellSurfaceItem *shellSurfaceItem);
53 QWaylandQuickShellSurfaceItem *shellSurfaceItem()
const;
55 void setTitleBar(QQuickItem *item);
56 QQuickItem *titleBar()
const;
58 void setLeftResizeHandle(QQuickItem *item);
59 QQuickItem *leftResizeHandle()
const;
61 void setRightResizeHandle(QQuickItem *item);
62 QQuickItem *rightResizeHandle()
const;
64 void setTopResizeHandle(QQuickItem *item);
65 QQuickItem *topResizeHandle()
const;
67 void setBottomResizeHandle(QQuickItem *item);
68 QQuickItem *bottomResizeHandle()
const;
70 void setTopLeftResizeHandle(QQuickItem *item);
71 QQuickItem *topLeftResizeHandle()
const;
73 void setBottomLeftResizeHandle(QQuickItem *item);
74 QQuickItem *bottomLeftResizeHandle()
const;
76 void setTopRightResizeHandle(QQuickItem *item);
77 QQuickItem *topRightResizeHandle()
const;
79 void setBottomRightResizeHandle(QQuickItem *item);
80 QQuickItem *bottomRightResizeHandle()
const;
82 int frameMarginLeft()
const;
83 void setFrameMarginLeft(
int left);
85 int frameMarginRight()
const;
86 void setFrameMarginRight(
int right);
88 int frameMarginTop()
const;
89 void setFrameMarginTop(
int top);
91 int frameMarginBottom()
const;
92 void setFrameMarginBottom(
int bottom);
95 void currentWindowStateChanged();
96 void currentWindowFlagsChanged();
97 void windowMetaInfoChanged();
98 void shellSurfaceItemChanged();
99 void maximizedRectChanged();
101 void titleBarChanged();
102 void leftResizeHandleChanged();
103 void rightResizeHandleChanged();
104 void topResizeHandleChanged();
105 void bottomResizeHandleChanged();
106 void topLeftResizeHandleChanged();
107 void bottomLeftResizeHandleChanged();
108 void topRightResizeHandleChanged();
109 void bottomRightResizeHandleChanged();
114 void clientDestroyed();
115 void frameMarginChanged();
120 void toggleMaximized();
121 void toggleMinimized();
122 void toggleFullScreen();
127 void activateOnGrab(QPointingDevice::GrabTransition transition);
128 void updateSurface();
129 void updateShellSurface();
130 void updateWindowFlags();
131 void updateWindowState();
132 void updateGeometry();
133 void updateDecorations();
134 void updateActiveState();
135 void updateAutomaticPosition();
141 void topLeftResize();
142 void topRightResize();
143 void bottomLeftResize();
144 void bottomRightResize();
148 QWaylandQtShellChrome(QWaylandQtShellChromePrivate &dd, QQuickItem *parent);
151 void setWindowState(uint nextState);
153 QRect maxContentRect()
const;