QWaylandWlShellSurface Class

Die Klasse QWaylandWlShellSurface bietet einer Oberfläche desktop-spezifische Compositor-Funktionen. Mehr...

Kopfzeile: #include <QWaylandWlShellSurface>
CMake: find_package(Qt6 REQUIRED COMPONENTS WaylandCompositor)
target_link_libraries(mytarget PRIVATE Qt6::WaylandCompositor)
qmake: QT += waylandcompositor
In QML: WlShellSurface
Vererbt: QWaylandShellSurfaceTemplate

Öffentliche Typen

enum ResizeEdge { NoneEdge, TopEdge, BottomEdge, LeftEdge, TopLeftEdge, …, BottomRightEdge }

Eigenschaften

Öffentliche Funktionen

QWaylandWlShellSurface()
QWaylandWlShellSurface(QWaylandWlShell *shell, QWaylandSurface *surface, const QWaylandResource &res)
QString className() const
void initialize(QWaylandWlShell *shell, QWaylandSurface *surface, const QWaylandResource &resource)
void sendConfigure(const QSize &size, QWaylandWlShellSurface::ResizeEdge edges)
void sendPopupDone()
QWaylandWlShell *shell() const
QWaylandSurface *surface() const
QString title() const

Öffentliche Slots

void ping()

Signale

Statische öffentliche Mitglieder

QWaylandWlShellSurface *fromResource(wl_resource *resource)

Detaillierte Beschreibung

Diese Klasse ist Teil der QWaylandWlShell -Erweiterung und bietet eine Möglichkeit, die Funktionalität eines bestehenden QWaylandSurface mit Funktionen zu erweitern, die spezifisch für Compositors im Desktop-Stil sind, wie z.B. Größenänderung und Verschieben der Oberfläche.

Sie entspricht der Wayland-Schnittstelle wl_shell_surface.

Dokumentation der Mitgliedstypen

enum QWaylandWlShellSurface::ResizeEdge

Dieser Enum-Typ bietet die Möglichkeit, eine Kante oder Ecke der Oberfläche anzugeben.

KonstanteWertBeschreibung
QWaylandWlShellSurface::NoneEdge0Keine Kante.
QWaylandWlShellSurface::TopEdge1Die obere Kante.
QWaylandWlShellSurface::BottomEdge2Die untere Kante.
QWaylandWlShellSurface::LeftEdge4Die linke Kante.
QWaylandWlShellSurface::TopLeftEdge5Die obere linke Ecke.
QWaylandWlShellSurface::BottomLeftEdge6Die untere linke Ecke.
QWaylandWlShellSurface::RightEdge8Die rechte Kante.
QWaylandWlShellSurface::TopRightEdge9Die obere rechte Ecke.
QWaylandWlShellSurface::BottomRightEdge10Die untere rechte Ecke.

Eigenschaft Dokumentation

[read-only] className : const QString

Diese Eigenschaft enthält den Klassennamen der QWaylandWlShellSurface.

Zugriffsfunktionen:

QString className() const

Melder-Signal:

void classNameChanged()

[read-only] shell : QWaylandWlShell* const

Diese Eigenschaft enthält die Shell, die mit dieser QWaylandWlShellSurface verbunden ist.

Zugriffsfunktionen:

QWaylandWlShell *shell() const

Benachrichtigungssignal:

void shellChanged()

[read-only] surface : QWaylandSurface* const

Diese Eigenschaft enthält die mit dieser QWaylandWlShellSurface verbundene Fläche.

Zugriffsfunktionen:

QWaylandSurface *surface() const

Benachrichtigungssignal:

void surfaceChanged()

[read-only] title : const QString

Diese Eigenschaft enthält den Titel der QWaylandWlShellSurface.

Zugriffsfunktionen:

QString title() const

Benachrichtigungssignal:

void titleChanged()

Dokumentation der Mitgliedsfunktionen

QWaylandWlShellSurface::QWaylandWlShellSurface()

Konstruiert eine QWaylandWlShellSurface.

QWaylandWlShellSurface::QWaylandWlShellSurface(QWaylandWlShell *shell, QWaylandSurface *surface, const QWaylandResource &res)

Konstruiert eine QWaylandWlShellSurface für surface und initialisiert sie mit der angegebenen shell und Ressource res.

[static] QWaylandWlShellSurface *QWaylandWlShellSurface::fromResource(wl_resource *resource)

Gibt das QWaylandWlShellSurface Objekt zurück, das mit dem angegebenen resource verbunden ist, oder null, wenn kein solches Objekt existiert.

[invokable] void QWaylandWlShellSurface::initialize(QWaylandWlShell *shell, QWaylandSurface *surface, const QWaylandResource &resource)

Initialisiert QWaylandWlShellSurface und verknüpft es mit den angegebenen shell, surface und resource.

Hinweis: Diese Funktion kann über das Meta-Objektsystem und von QML aus aufgerufen werden. Siehe Q_INVOKABLE.

[slot] void QWaylandWlShellSurface::ping()

Sendet ein ping-Ereignis an den Client. Wenn der Client auf das Ereignis antwortet, wird das Pong-Signal ausgegeben.

[invokable] void QWaylandWlShellSurface::sendConfigure(const QSize &size, QWaylandWlShellSurface::ResizeEdge edges)

Sendet ein Configure-Ereignis an den Client und fordert ihn auf, die Größe seiner Oberfläche an die angegebene size anzupassen. Die edges gibt einen Hinweis darauf, wie die Größe der Oberfläche geändert wurde.

Hinweis: Diese Funktion kann über das Meta-Objektsystem und von QML aus aufgerufen werden. Siehe Q_INVOKABLE.

[invokable] void QWaylandWlShellSurface::sendPopupDone()

Sendet ein popup_done-Ereignis an den Client, um anzuzeigen, dass der Benutzer irgendwo außerhalb der Oberfläche des Clients geklickt hat.

Hinweis: Diese Funktion kann über das Meta-Objektsystem und von QML aus aufgerufen werden. Siehe Q_INVOKABLE.

© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.