QtCanpool 3.3.0
载入中...
搜索中...
未找到
QxWindow::WindowAgentBase类 参考

WindowAgentBase is the base class of the specifiy window agent for QtWidgets and QtQuick. 更多...

#include <qxwindow/windowagentbase.h>

类 QxWindow::WindowAgentBase 继承关系图:

Public 类型

enum  SystemButton {
  Unknown , WindowIcon , Help , Minimize ,
  Maximize , Close
}
 

Public 成员函数

 ~WindowAgentBase () override
 Destructor.
 
QVariant windowAttribute (const QString &key) const
 Returns the window attribute value.
 
bool setWindowAttribute (const QString &key, const QVariant &attribute)
 Sets the platform-related attribute for the window.
 
void showSystemMenu (const QPoint &pos)
 Shows the system menu, it's only implemented on Windows.
 
void centralize ()
 Makes the window show in center of the current screen.
 
void raise ()
 Brings the window to top.
 

Protected 成员函数

 WindowAgentBase (WindowAgentBasePrivate &d, QObject *parent=nullptr)
 

Protected 属性

WindowAgentBasePrivate * d_ptr
 

详细描述

WindowAgentBase is the base class of the specifiy window agent for QtWidgets and QtQuick.

It processes some system events to remove the window's default title bar, and provides some shared methods for derived classes to call.

在文件 windowagentbase.h 第 15 行定义.

成员枚举类型说明

◆ SystemButton

枚举值
Unknown 
WindowIcon 
Help 
Minimize 
Maximize 
Close 

在文件 windowagentbase.h 第 22 行定义.

构造及析构函数说明

◆ ~WindowAgentBase()

QxWindow::WindowAgentBase::~WindowAgentBase ( )
overridedefault

Destructor.

◆ WindowAgentBase()

QxWindow::WindowAgentBase::WindowAgentBase ( WindowAgentBasePrivate &  d,
QObject *  parent = nullptr 
)
explicitprotected

在文件 windowagentbase.cpp 第 143 行定义.

成员函数说明

◆ centralize()

void QxWindow::WindowAgentBase::centralize ( )

Makes the window show in center of the current screen.

在文件 windowagentbase.cpp 第 125 行定义.

◆ raise()

void QxWindow::WindowAgentBase::raise ( )

Brings the window to top.

在文件 windowagentbase.cpp 第 134 行定义.

◆ setWindowAttribute()

bool QxWindow::WindowAgentBase::setWindowAttribute ( const QString &  key,
const QVariant &  attribute 
)

Sets the platform-related attribute for the window.

Available attributes:

On Windows,

  • dwm-blur: Specify a boolean value to enable or disable dwm blur effect, this attribute is available on Windows 10 or later.
  • dark-mode: Specify a boolean value to enable or disable the dark mode, it is enabled by default on Windows 10 if the system borders config is enabled. This attribute is available on Windows 10 or later.
  • acrylic-material: Specify a boolean value to enable or disable acrylic material, this attribute is only available on Windows 11.
  • mica: Specify a boolean value to enable or disable mica material, this attribute is only available on Windows 11.
  • mica-alt: Specify a boolean value to enable or disable mica-alt material, this attribute is only available on Windows 11.
  • extra-margins: Specify a margin value to change the dwm extended area geometry, you shouldn't change this attribute because it may break the internal state.

On macOS,

  • no-system-buttons: Specify a boolean value to set the system buttons' visibility.
  • blur-effect: You can specify a string value, "dark" to enable dark mode, "light" to set enable mode, "none" to disable. You can also specify a boolean value, true to enable current theme mode, false to disable.
  • title-bar-height: Returns the system title bar height, the system button display area will be limited to this height. (Readonly)

在文件 windowagentbase.cpp 第 107 行定义.

◆ showSystemMenu()

void QxWindow::WindowAgentBase::showSystemMenu ( const QPoint &  pos)

Shows the system menu, it's only implemented on Windows.

在文件 windowagentbase.cpp 第 116 行定义.

◆ windowAttribute()

QVariant QxWindow::WindowAgentBase::windowAttribute ( const QString &  key) const

Returns the window attribute value.

参见
setWindowAttribute()

在文件 windowagentbase.cpp 第 73 行定义.

类成员变量说明

◆ d_ptr

WindowAgentBasePrivate* QxWindow::WindowAgentBase::d_ptr
protected

在文件 windowagentbase.h 第 42 行定义.


该类的文档由以下文件生成: