QWaylandWlShellSurface Class
La classe `QWaylandWlShellSurface` offre à une surface des fonctionnalités spécifiques au compositeur, de type bureau. En savoir plus...
| En-tête : | #include <QWaylandWlShellSurface> |
| CMake : | find_package(Qt6 REQUIRED COMPONENTS WaylandCompositor) target_link_libraries(mytarget PRIVATE Qt6::WaylandCompositor) |
| qmake : | QT += waylandcompositor |
| En QML : | WlShellSurface |
| Hérite de : | QWaylandShellSurfaceTemplate |
Types publics
| enum | ResizeEdge { NoneEdge, TopEdge, BottomEdge, LeftEdge, TopLeftEdge, …, BottomRightEdge } |
Propriétés
Fonctions publiques
| 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 |
Emplacements publics
| void | ping() |
Signaux
| void | classNameChanged() |
| void | shellChanged() |
| void | surfaceChanged() |
| void | titleChanged() |
Membres publics statiques
| QWaylandWlShellSurface * | fromResource(wl_resource *resource) |
Description détaillée
Cette classe fait partie de l'extension QWaylandWlShell et permet d'étendre les fonctionnalités d'une surface existante ( QWaylandSurface ) avec des fonctionnalités spécifiques aux compositeurs de type bureau, telles que le redimensionnement et le déplacement de la surface.
Elle correspond à l’interface Wayland « wl_shell_surface ».
Documentation sur le type de membre
enum QWaylandWlShellSurface::ResizeEdge
Ce type d'énumération permet de spécifier un bord ou un coin de la surface.
| Constante | Valeur | Description |
|---|---|---|
QWaylandWlShellSurface::NoneEdge | 0 | Pas de bord. |
QWaylandWlShellSurface::TopEdge | 1 | Le bord supérieur. |
QWaylandWlShellSurface::BottomEdge | 2 | Le bord inférieur. |
QWaylandWlShellSurface::LeftEdge | 4 | Le bord gauche. |
QWaylandWlShellSurface::TopLeftEdge | 5 | Le coin supérieur gauche. |
QWaylandWlShellSurface::BottomLeftEdge | 6 | Le coin inférieur gauche. |
QWaylandWlShellSurface::RightEdge | 8 | Le bord droit. |
QWaylandWlShellSurface::TopRightEdge | 9 | Le coin supérieur droit. |
QWaylandWlShellSurface::BottomRightEdge | 10 | Le coin inférieur droit. |
Documentation sur les propriétés
[read-only] className : QString
Cette propriété contient le nom de la classe de l'QWaylandWlShellSurface.
Fonctions d'accès :
| QString | className() const |
Signal de notification :
| void | classNameChanged() |
[read-only] shell : QWaylandWlShell*
Cette propriété contient le shell associé à cette QWaylandWlShellSurface.
Fonctions d'accès :
| QWaylandWlShell * | shell() const |
Signal de notification :
| void | shellChanged() |
[read-only] surface : QWaylandSurface*
Cette propriété contient la surface associée à cette QWaylandWlShellSurface.
Fonctions d'accès :
| QWaylandSurface * | surface() const |
Signal de notification :
| void | surfaceChanged() |
[read-only] title : QString
Cette propriété détient le titre d'« QWaylandWlShellSurface ».
Fonctions d'accès :
| QString | title() const |
Signal de notification :
| void | titleChanged() |
Documentation des fonctions membres
QWaylandWlShellSurface::QWaylandWlShellSurface()
Crée un objet `QWaylandWlShellSurface`.
QWaylandWlShellSurface::QWaylandWlShellSurface(QWaylandWlShell *shell, QWaylandSurface *surface, const QWaylandResource &res)
Crée un objet `QWaylandWlShellSurface` pour ` surface ` et l'initialise avec l'shell ` et la ressource ` res` fournies.
[static] QWaylandWlShellSurface *QWaylandWlShellSurface::fromResource(wl_resource *resource)
Renvoie l'objet ` QWaylandWlShellSurface ` associé à l'resource` indiquée, ou `null` si aucun objet de ce type n'existe.
[invokable] void QWaylandWlShellSurface::initialize(QWaylandWlShell *shell, QWaylandSurface *surface, const QWaylandResource &resource)
Initialise l'QWaylandWlShellSurface et l'associe aux éléments shell, surface et resource indiqués.
Remarque : cette fonction peut être appelée via le système de méta-objets et depuis QML. Voir Q_INVOKABLE.
[slot] void QWaylandWlShellSurface::ping()
Envoie un événement « ping » au client. Si le client répond à cet événement, le signal « pong » sera émis.
[invokable] void QWaylandWlShellSurface::sendConfigure(const QSize &size, QWaylandWlShellSurface::ResizeEdge edges)
Envoie un événement « configure » au client, lui suggérant de redimensionner sa surface selon les size s fournies. Les edges s fournissent une indication sur la manière dont la surface a été redimensionnée.
Remarque : cette fonction peut être appelée via le système de méta-objets et depuis QML. Voir Q_INVOKABLE.
[invokable] void QWaylandWlShellSurface::sendPopupDone()
Envoie un événement `popup_done` au client pour indiquer que l'utilisateur a cliqué à un endroit situé en dehors des surfaces du client.
Remarque : cette fonction peut être appelée via le système de méta-objets et depuis QML. Voir Q_INVOKABLE.
© 2026 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.