Nesta página

QWaylandWlShellSurface Class

A classe QWaylandWlShellSurface oferece a uma superfície recursos específicos do compositor, no estilo de uma área de trabalho. Mais...

Cabeçalho: #include <QWaylandWlShellSurface>
CMake: find_package(Qt6 REQUIRED COMPONENTS WaylandCompositor)
target_link_libraries(mytarget PRIVATE Qt6::WaylandCompositor)
qmake: QT += waylandcompositor
No QML: WlShellSurface
Herdado de: QWaylandShellSurfaceTemplate

Tipos públicos

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

Propriedades

Funções 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

Slots públicos

void ping()

Sinais

Membros públicos estáticos

QWaylandWlShellSurface *fromResource(wl_resource *resource)

Descrição detalhada

Esta classe faz parte da extensão QWaylandWlShell e oferece uma maneira de ampliar a funcionalidade de um QWaylandSurface já existente com recursos específicos para compositores no estilo desktop, como redimensionamento e movimentação da superfície.

Ela corresponde à interface Wayland wl_shell_surface.

Documentação do tipo de membro

enum QWaylandWlShellSurface::ResizeEdge

Esse tipo de enumeração permite especificar uma aresta ou um canto da superfície.

ConstanteValorDescrição
QWaylandWlShellSurface::NoneEdge0Sem aresta.
QWaylandWlShellSurface::TopEdge1A aresta superior.
QWaylandWlShellSurface::BottomEdge2A borda inferior.
QWaylandWlShellSurface::LeftEdge4A borda esquerda.
QWaylandWlShellSurface::TopLeftEdge5O canto superior esquerdo.
QWaylandWlShellSurface::BottomLeftEdge6O canto inferior esquerdo.
QWaylandWlShellSurface::RightEdge8A borda direita.
QWaylandWlShellSurface::TopRightEdge9O canto superior direito.
QWaylandWlShellSurface::BottomRightEdge10O canto inferior direito.

Documentação de propriedades

[read-only] className : QString

Essa propriedade contém o nome da classe do ` QWaylandWlShellSurface`.

Funções de acesso:

QString className() const

Sinal do Notifier:

void classNameChanged()

[read-only] shell : QWaylandWlShell*

Esta propriedade contém o shell associado a este QWaylandWlShellSurface.

Funções de acesso:

QWaylandWlShell *shell() const

Sinal do Notifier:

void shellChanged()

[read-only] surface : QWaylandSurface*

Esta propriedade contém a superfície associada a este QWaylandWlShellSurface.

Funções de acesso:

QWaylandSurface *surface() const

Sinal do notificador:

void surfaceChanged()

[read-only] title : QString

Este imóvel detém o título de “ QWaylandWlShellSurface ”.

Funções de acesso:

QString title() const

Sinal do Notifier:

void titleChanged()

Documentação das funções-membro

QWaylandWlShellSurface::QWaylandWlShellSurface()

Cria um objeto QWaylandWlShellSurface.

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

Cria um objeto `QWaylandWlShellSurface` para ` surface ` e o inicializa com o ` shell ` e o recurso ` res` fornecidos.

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

Retorna o objeto ` QWaylandWlShellSurface ` associado ao ` resource` fornecido, ou `null` caso tal objeto não exista.

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

Inicializa o objeto QWaylandWlShellSurface e o associa aos valores fornecidos shell, surface e resource.

Observação: Esta função pode ser chamada por meio do sistema de metaobjetos e a partir do QML. Consulte Q_INVOKABLE.

[slot] void QWaylandWlShellSurface::ping()

Envia um evento “ping” ao cliente. Se o cliente responder ao evento, o sinal “pong” será emitido.

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

Envia um evento de configuração ao cliente, sugerindo que ele redimensione sua superfície para o valor fornecido em ` size`. A variável ` edges ` fornece uma indicação sobre como a superfície foi redimensionada.

Observação: essa função pode ser invocada por meio do sistema de metaobjetos e a partir do QML. Consulte Q_INVOKABLE.

[invokable] void QWaylandWlShellSurface::sendPopupDone()

Envia um evento `popup_done` ao cliente para indicar que o usuário clicou em algum ponto fora das superfícies do cliente.

Observação: essa função pode ser invocada por meio do sistema de metaobjetos e a partir do QML. Consulte 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.