The QWaylandXdgToplevel class represents the toplevel window specific parts of an xdg surface. 更多...
| 頭: | #include <QWaylandXdgToplevel> |
| CMake: |
find_package(Qt6 REQUIRED COMPONENTS WaylandCompositor)
target_link_libraries(mytarget PRIVATE Qt6::WaylandCompositor) |
| qmake: | QT += waylandcompositor |
| 實例化: | XdgToplevel |
| 繼承: | QObject |
| enum | DecorationMode { ServerSideDecoration, ClientSideDecoration } |
|
|
| QWaylandXdgToplevel (QWaylandXdgSurface * xdgSurface , QWaylandResource & resource ) | |
| bool | activated () const |
| QString | appId () const |
| QWaylandXdgToplevel::DecorationMode | decorationMode () const |
| bool | fullscreen () const |
| QSize | maxSize () const |
| bool | maximized () const |
| QSize | minSize () const |
| QWaylandXdgToplevel * | parentToplevel () const |
| bool | resizing () const |
| void | sendClose () |
| uint | sendConfigure (const QSize & size , const QList<QWaylandXdgToplevel::State> & 狀態 ) |
| uint | sendFullscreen (const QSize & size ) |
| uint | sendMaximized (const QSize & size ) |
| uint | sendResizing (const QSize & maxSize ) |
| uint | sendUnmaximized (const QSize & size = QSize(0, 0)) |
| QSize | sizeForResize (const QSizeF & size , const QPointF & delta , Qt::Edges edges ) const |
| QString | title () const |
| QWaylandXdgSurface * | xdgSurface () const |
| void | activatedChanged () |
| void | appIdChanged () |
| void | decorationModeChanged () |
| void | fullscreenChanged () |
| void | maxSizeChanged () |
| void | maximizedChanged () |
| void | minSizeChanged () |
| void | parentToplevelChanged () |
| void | resizingChanged () |
| void | statesChanged () |
| void | titleChanged () |
| QWaylandXdgToplevel * | fromResource (::wl_resource * resource ) |
| QWaylandSurfaceRole * | role () |
此類屬於 QWaylandXdgShell extension and provides a way to extend the functionality of an QWaylandXdgSurface with features specific to desktop-style windows.
It corresponds to the Wayland interface
xdg_toplevel
.
This enum type is used to specify the window decoration mode for toplevel windows.
| 常量 | 值 | 描述 |
|---|---|---|
QWaylandXdgToplevel::ServerSideDecoration
|
2
|
The compositor should draw window decorations. |
QWaylandXdgToplevel::ClientSideDecoration
|
1
|
The client should draw window decorations. |
[read-only]
activated
: const
bool
This property holds whether toplevel is drawing itself as having input focus.
訪問函數:
| bool | activated () const |
通知程序信號:
| void | activatedChanged () |
[read-only]
appId
: const
QString
This property holds the app id of the QWaylandXdgToplevel .
訪問函數:
| QString | appId () const |
通知程序信號:
| void | appIdChanged () |
[read-only]
decorationMode
: const
DecorationMode
This property holds the current window decoration mode for this toplevel.
訪問函數:
| QWaylandXdgToplevel::DecorationMode | decorationMode () const |
通知程序信號:
| void | decorationModeChanged () |
另請參閱 QWaylandXdgDecorationManagerV1 .
[read-only]
fullscreen
: const
bool
This property holds whether the client has acknowledged that it should be fullscreen.
訪問函數:
| bool | fullscreen () const |
通知程序信號:
| void | fullscreenChanged () |
[read-only]
maxSize
: const
QSize
This property holds the maximum size of the QWaylandXdgToplevel .
The compositor is free to ignore this value and request a larger size.
訪問函數:
| QSize | maxSize () const |
通知程序信號:
| void | maxSizeChanged () |
[read-only]
maximized
: const
bool
This property holds whether the client has acknowledged that it should be maximized.
訪問函數:
| bool | maximized () const |
通知程序信號:
| void | maximizedChanged () |
[read-only]
minSize
: const
QSize
This property holds the minimum size of the QWaylandXdgToplevel .
The compositor is free to ignore this value and request a smaller size.
訪問函數:
| QSize | minSize () const |
通知程序信號:
| void | minSizeChanged () |
[read-only]
parentToplevel
:
QWaylandXdgToplevel
* const
此特性保持 XdgToplevel parent of this XdgToplevel .
訪問函數:
| QWaylandXdgToplevel * | parentToplevel () const |
通知程序信號:
| void | parentToplevelChanged () |
[read-only]
resizing
: const
bool
This property holds whether the client has acknowledged that it is being resized.
訪問函數:
| bool | resizing () const |
通知程序信號:
| void | resizingChanged () |
[read-only]
狀態
: const
QList
<
int
>
This property holds the last states the client acknowledged for this QWaylandToplevel.
通知程序信號:
| void | statesChanged () |
[read-only]
title
: const
QString
This property holds the title of the QWaylandXdgToplevel .
訪問函數:
| QString | title () const |
通知程序信號:
| void | titleChanged () |
[read-only]
xdgSurface
:
QWaylandXdgSurface
* const
此特性保持 QWaylandXdgSurface 為此 QWaylandXdgToplevel .
訪問函數:
| QWaylandXdgSurface * | xdgSurface () const |
[explicit]
QWaylandXdgToplevel::
QWaylandXdgToplevel
(
QWaylandXdgSurface
*
xdgSurface
,
QWaylandResource
&
resource
)
Constructs a QWaylandXdgToplevel for the given xdgSurface and resource .
[static]
QWaylandXdgToplevel
*QWaylandXdgToplevel::
fromResource
(
::wl_resource
*
resource
)
返迴 QWaylandXdgToplevel corresponding to the resource .
[static]
QWaylandSurfaceRole
*QWaylandXdgToplevel::
role
()
Returns the surface role for the QWaylandToplevel.
[invokable]
void
QWaylandXdgToplevel::
sendClose
()
Sends a close event to the client. The client may choose to ignore the event.
注意: 此函數可以被援引,通過元對象係統和從 QML。見 Q_INVOKABLE .
Sends a configure event to the client. Parameter size contains the pixel size of the surface. A size of zero means the client is free to decide the size. Known states are enumerated in QWaylandXdgToplevel::State.
[invokable]
uint
QWaylandXdgToplevel::
sendFullscreen
(const
QSize
&
size
)
Convenience for sending a configure event with the fullscreen state set, and maximized and resizing removed. The activated state is left in its current state.
size is the new size of the window.
注意: 此函數可以被援引,通過元對象係統和從 QML。見 Q_INVOKABLE .
另請參閱 sendUnmaximized .
[invokable]
uint
QWaylandXdgToplevel::
sendMaximized
(const
QSize
&
size
)
Convenience for sending a configure event with the maximized state set, and fullscreen and resizing removed. The activated state is left in its current state.
size is the new size of the window.
注意: 此函數可以被援引,通過元對象係統和從 QML。見 Q_INVOKABLE .
[invokable]
uint
QWaylandXdgToplevel::
sendResizing
(const
QSize
&
maxSize
)
Convenience for sending a configure event with the resizing state set, and maximized and fullscreen removed. The activated state is left in its current state.
maxSize is the new size of the window.
注意: 此函數可以被援引,通過元對象係統和從 QML。見 Q_INVOKABLE .
[invokable]
uint
QWaylandXdgToplevel::
sendUnmaximized
(const
QSize
&
size
= QSize(0, 0))
Convenience for sending a configure event with the maximized, fullscreen and resizing states removed, and fullscreen and resizing removed. The activated state is left in its current state.
size is the new size of the window. If size is zero, the client decides the size.
注意: 此函數可以被援引,通過元對象係統和從 QML。見 Q_INVOKABLE .
[invokable]
QSize
QWaylandXdgToplevel::
sizeForResize
(const
QSizeF
&
size
, const
QPointF
&
delta
,
Qt::Edges
edges
) const
Convenience for computing the new size given the current size , delta ,和 edges active in the drag.
注意: 此函數可以被援引,通過元對象係統和從 QML。見 Q_INVOKABLE .