QWaylandXdgToplevel Class

The QWaylandXdgToplevel class represents the toplevel window specific parts of an xdg surface. 更多...

头: #include <QWaylandXdgToplevel>
qmake: QT += waylandcompositor
Since: Qt 5.12
继承: QObject

公共类型

enum DecorationMode { ServerSideDecoration, ClientSideDecoration }
enum State { MaximizedState, FullscreenState, ResizingState, ActivatedState }

特性

公共函数

QWaylandXdgToplevel (QWaylandXdgSurface * xdgSurface , QWaylandResource & resource )
virtual ~QWaylandXdgToplevel () override
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 QVector<QWaylandXdgToplevel::State> & 状态 )
uint sendConfigure (const QSize & size , const QVector<int> & 状态 )
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
QVector<QWaylandXdgToplevel::State> states () 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 setFullscreen (QWaylandOutput * output )
void setMaximized ()
void setMinimized ()
void showWindowMenu (QWaylandSeat * seat , const QPoint & localSurfacePosition )
void startMove (QWaylandSeat * seat )
void startResize (QWaylandSeat * seat , Qt::Edges edges )
void statesChanged ()
void titleChanged ()
void unsetFullscreen ()
void unsetMaximized ()

静态公共成员

QWaylandXdgToplevel * fromResource (::wl_resource * resource )
QWaylandSurfaceRole * role ()
const QMetaObject staticMetaObject

额外继承成员

详细描述

The QWaylandXdgToplevel class represents the toplevel window specific parts of an xdg surface.

此类属于 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 .

成员类型文档编制

enum QWaylandXdgToplevel:: DecorationMode

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.

enum QWaylandXdgToplevel:: State

特性文档编制

DecorationMode : const enum

activated : const bool

This property holds whether toplevel is drawing itself as having input focus.

访问函数:

bool activated () const

通知程序信号:

void activatedChanged ()

appId : const QString

This property holds the app id of the QWaylandXdgToplevel .

访问函数:

QString appId () const

通知程序信号:

void appIdChanged ()

fullscreen : const bool

This property holds whether the client has acknowledged that it should be fullscreen.

访问函数:

bool fullscreen () const

通知程序信号:

void fullscreenChanged ()

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 ()

maximized : const bool

This property holds whether the client has acknowledged that it should be maximized.

访问函数:

bool maximized () const

通知程序信号:

void maximizedChanged ()

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 ()

parentToplevel : QWaylandXdgToplevel * const

此特性保持 XdgToplevel parent of this XdgToplevel .

访问函数:

QWaylandXdgToplevel * parentToplevel () const

通知程序信号:

void parentToplevelChanged ()

resizing : const bool

This property holds whether the client has acknowledged that it is being resized.

访问函数:

bool resizing () const

通知程序信号:

void resizingChanged ()

状态 : const QList < int >

This property holds the last states the client acknowledged for this QWaylandToplevel.

通知程序信号:

void statesChanged ()

title : const QString

This property holds the title of the QWaylandXdgToplevel .

访问函数:

QString title () const

通知程序信号:

void titleChanged ()

xdgSurface : QWaylandXdgSurface * const

此特性保持 QWaylandXdgSurface for this QWaylandXdgToplevel .

访问函数:

QWaylandXdgSurface * xdgSurface () const

成员函数文档编制

QWaylandXdgToplevel:: QWaylandXdgToplevel ( QWaylandXdgSurface * xdgSurface , QWaylandResource & resource )

构造 QWaylandXdgToplevel 为给定 xdgSurface and resource .

[override virtual] QWaylandXdgToplevel:: ~QWaylandXdgToplevel ()

Destroys the instance of QWaylandXdgToplevel. The destructor is virtual.

QWaylandXdgToplevel::DecorationMode QWaylandXdgToplevel:: decorationMode () const

[signal] void QWaylandXdgToplevel:: decorationModeChanged ()

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

返回 QWaylandXdgToplevel corresponding to the resource .

[static] QWaylandSurfaceRole *QWaylandXdgToplevel:: role ()

Returns the surface role for the QWaylandToplevel.

void QWaylandXdgToplevel:: sendClose ()

Sends a close event to the client. The client may choose to ignore the event.

注意: 此函数可以被援引,通过元对象系统和从 QML。见 Q_INVOKABLE .

uint QWaylandXdgToplevel:: sendConfigure (const QSize & size , const QVector < QWaylandXdgToplevel::State > & 状态 )

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 状态 are enumerated in QWaylandXdgToplevel::State .

uint QWaylandXdgToplevel:: sendConfigure (const QSize & size , const QVector < int > & 状态 )

注意: 此函数可以被援引,通过元对象系统和从 QML。见 Q_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 .

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 .

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 .

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 .

[signal] void QWaylandXdgToplevel:: setFullscreen ( QWaylandOutput * output )

另请参阅 fullscreen ().

[signal] void QWaylandXdgToplevel:: setMaximized ()

另请参阅 maximized ().

[signal] void QWaylandXdgToplevel:: setMinimized ()

[signal] void QWaylandXdgToplevel:: showWindowMenu ( QWaylandSeat * seat , const QPoint & localSurfacePosition )

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 .

[signal] void QWaylandXdgToplevel:: startMove ( QWaylandSeat * seat )

[signal] void QWaylandXdgToplevel:: startResize ( QWaylandSeat * seat , Qt::Edges edges )

QVector < QWaylandXdgToplevel::State > QWaylandXdgToplevel:: 状态 () const

[signal] void QWaylandXdgToplevel:: unsetFullscreen ()

[signal] void QWaylandXdgToplevel:: unsetMaximized ()