QWaylandWlShellSurface Class
La clase `QWaylandWlShellSurface` proporciona a una superficie funciones específicas del compositor propias de un escritorio. Más información...
| Encabezado: | #include <QWaylandWlShellSurface> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS WaylandCompositor) target_link_libraries(mytarget PRIVATE Qt6::WaylandCompositor) |
| qmake: | QT += waylandcompositor |
| En QML: | WlShellSurface |
| Heredan de: | QWaylandShellSurfaceTemplate |
Tipos públicos
| enum | ResizeEdge { NoneEdge, TopEdge, BottomEdge, LeftEdge, TopLeftEdge, …, BottomRightEdge } |
Propiedades
Funciones públicas
| 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 |
Ranuras públicas
| void | ping() |
Señales
| void | classNameChanged() |
| void | shellChanged() |
| void | surfaceChanged() |
| void | titleChanged() |
Miembros públicos estáticos
| QWaylandWlShellSurface * | fromResource(wl_resource *resource) |
Descripción detallada
Esta clase forma parte de la extensión QWaylandWlShell y ofrece una forma de ampliar la funcionalidad de un QWaylandSurface ya existente con características específicas de los compositores de estilo escritorio, como el cambio de tamaño y el desplazamiento de la superficie.
Se corresponde con la interfaz de Wayland wl_shell_surface.
Documentación sobre los tipos de miembros
enum QWaylandWlShellSurface::ResizeEdge
Este tipo de enumeración permite especificar un borde o una esquina de la superficie.
| Constante | Valor | Descripción |
|---|---|---|
QWaylandWlShellSurface::NoneEdge | 0 | Sin borde. |
QWaylandWlShellSurface::TopEdge | 1 | El borde superior. |
QWaylandWlShellSurface::BottomEdge | 2 | El borde inferior. |
QWaylandWlShellSurface::LeftEdge | 4 | El borde izquierdo. |
QWaylandWlShellSurface::TopLeftEdge | 5 | La esquina superior izquierda. |
QWaylandWlShellSurface::BottomLeftEdge | 6 | La esquina inferior izquierda. |
QWaylandWlShellSurface::RightEdge | 8 | El borde derecho. |
QWaylandWlShellSurface::TopRightEdge | 9 | La esquina superior derecha. |
QWaylandWlShellSurface::BottomRightEdge | 10 | La esquina inferior derecha. |
Documentación sobre propiedades
[read-only] className : QString
Esta propiedad contiene el nombre de la clase de « QWaylandWlShellSurface ».
Funciones de acceso:
| QString | className() const |
Señal del notificador:
| void | classNameChanged() |
[read-only] shell : QWaylandWlShell*
Esta propiedad contiene el shell asociado a este QWaylandWlShellSurface.
Funciones de acceso:
| QWaylandWlShell * | shell() const |
Señal de notificador:
| void | shellChanged() |
[read-only] surface : QWaylandSurface*
Esta propiedad contiene la superficie asociada a este QWaylandWlShellSurface.
Funciones de acceso:
| QWaylandSurface * | surface() const |
Señal de notificador:
| void | surfaceChanged() |
[read-only] title : QString
Esta propiedad ostenta el título de « QWaylandWlShellSurface ».
Funciones de acceso:
| QString | title() const |
Señal del notificador:
| void | titleChanged() |
Documentación de las funciones miembro
QWaylandWlShellSurface::QWaylandWlShellSurface()
Crea un objeto `QWaylandWlShellSurface`.
QWaylandWlShellSurface::QWaylandWlShellSurface(QWaylandWlShell *shell, QWaylandSurface *surface, const QWaylandResource &res)
Crea un objeto `QWaylandWlShellSurface` para ` surface ` y lo inicializa con el ` shell ` y el recurso ` res` indicados.
[static] QWaylandWlShellSurface *QWaylandWlShellSurface::fromResource(wl_resource *resource)
Devuelve el objeto ` QWaylandWlShellSurface ` asociado al ` resource` indicado, o `null` si dicho objeto no existe.
[invokable] void QWaylandWlShellSurface::initialize(QWaylandWlShell *shell, QWaylandSurface *surface, const QWaylandResource &resource)
Inicializa el objeto « QWaylandWlShellSurface » y lo asocia con los valores indicados: « shell », « surface » y « resource ».
Nota: Esta función se puede invocar a través del sistema de metaobjetos y desde QML. Véase Q_INVOKABLE.
[slot] void QWaylandWlShellSurface::ping()
Envía un evento «ping» al cliente. Si el cliente responde al evento, se emitirá la señal «pong».
[invokable] void QWaylandWlShellSurface::sendConfigure(const QSize &size, QWaylandWlShellSurface::ResizeEdge edges)
Envía un evento de configuración al cliente, sugiriéndole que cambie el tamaño de su superficie al valor proporcionado en ` size`. Los parámetros ` edges ` proporcionan una indicación sobre cómo se ha cambiado el tamaño de la superficie.
Nota: Esta función se puede invocar a través del sistema de metaobjetos y desde QML. Véase Q_INVOKABLE.
[invokable] void QWaylandWlShellSurface::sendPopupDone()
Envía un evento «popup_done» al cliente para indicar que el usuario ha hecho clic en algún punto fuera de las superficies del cliente.
Nota: Esta función se puede invocar a través del sistema de metaobjetos y desde QML. Véase 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.