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

WindowAgentBase is the window agent for QtWidgets. 更多...

#include <qxwindow/windowagentwidget.h>

类 QxWindow::WindowAgentWidget 继承关系图:

Public 成员函数

 WindowAgentWidget (QObject *parent=nullptr)
 Constructs a widget agent, it's better to set the widget to setup as parent.
 
 ~WindowAgentWidget () override
 Destructor.
 
bool setup (QWidget *w)
 Installs the window agent on the widget.
 
QWidget * titleBar () const
 Returns the title bar widget.
 
void setTitleBar (QWidget *w)
 Sets the title bar widget, all system button and hit-test visible widget references that have been set will be removed.
 
QWidget * systemButton (SystemButton button) const
 Returns the system button of the given type.
 
void setSystemButton (SystemButton button, QWidget *w)
 Sets the system button of the given type, the system buttons always receive mouse events so you don't need to call setHitTestVisible for them.
 
void removeSystemButton (SystemButton button)
 
QWidget * systemButtonArea () const
 Returns the widget that acts as the system button area.
 
void setSystemButtonArea (QWidget *widget)
 Sets the widget that acts as the system button area.
 
ScreenRectCallback systemButtonAreaCallback () const
 Returns the the system button area callback.
 
void setSystemButtonAreaCallback (const ScreenRectCallback &callback)
 Sets the the system button area callback, the size of the callback is the native title bar size.
 
bool isHitTestVisible (const QWidget *w) const
 Returns true if the widget can receive mouse events on title bar.
 
void setHitTestVisible (const QWidget *w, bool visible=true)
 Makes the widget able to receive mouse events on title bar if visible is true.
 
void addCaptionClassName (const QString &name)
 
void titleBarChanged (const QWidget *w)
 This signal is emitted when the title bar widget is replaced.
 
void systemButtonChanged (SystemButton button, const QWidget *w)
 This signal is emitted when a system button is replaced.
 
- Public 成员函数 继承自 QxWindow::WindowAgentBase
 ~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 成员函数

 WindowAgentWidget (WindowAgentWidgetPrivate &d, QObject *parent=nullptr)
 
- Protected 成员函数 继承自 QxWindow::WindowAgentBase
 WindowAgentBase (WindowAgentBasePrivate &d, QObject *parent=nullptr)
 

额外继承的成员函数

- Public 类型 继承自 QxWindow::WindowAgentBase
enum  SystemButton {
  Unknown , WindowIcon , Help , Minimize ,
  Maximize , Close
}
 
- Protected 属性 继承自 QxWindow::WindowAgentBase
WindowAgentBasePrivate * d_ptr
 

详细描述

WindowAgentBase is the window agent for QtWidgets.

It provides interfaces for QtWidgets and processes some Qt events related to the QWidget instance.

在文件 windowagentwidget.h 第 16 行定义.

构造及析构函数说明

◆ WindowAgentWidget() [1/2]

QxWindow::WindowAgentWidget::WindowAgentWidget ( QObject *  parent = nullptr)
explicit

Constructs a widget agent, it's better to set the widget to setup as parent.

在文件 windowagentwidget.cpp 第 33 行定义.

◆ ~WindowAgentWidget()

QxWindow::WindowAgentWidget::~WindowAgentWidget ( )
overridedefault

Destructor.

◆ WindowAgentWidget() [2/2]

QxWindow::WindowAgentWidget::WindowAgentWidget ( WindowAgentWidgetPrivate &  d,
QObject *  parent = nullptr 
)
protected

在文件 windowagentwidget.cpp 第 154 行定义.

成员函数说明

◆ addCaptionClassName()

void QxWindow::WindowAgentWidget::addCaptionClassName ( const QString &  name)

在文件 windowagentwidget.cpp 第 145 行定义.

◆ isHitTestVisible()

bool QxWindow::WindowAgentWidget::isHitTestVisible ( const QWidget *  w) const

Returns true if the widget can receive mouse events on title bar.

在文件 windowagentwidget.cpp 第 128 行定义.

◆ removeSystemButton()

void QxWindow::WindowAgentWidget::removeSystemButton ( SystemButton  button)

在文件 windowagentwidget.cpp 第 119 行定义.

◆ setHitTestVisible()

void QxWindow::WindowAgentWidget::setHitTestVisible ( const QWidget *  w,
bool  visible = true 
)

Makes the widget able to receive mouse events on title bar if visible is true.

You're supposed to make sure that the specified widget w is a child or descendant of the title bar widget.

在文件 windowagentwidget.cpp 第 139 行定义.

◆ setSystemButton()

void QxWindow::WindowAgentWidget::setSystemButton ( SystemButton  button,
QWidget *  w 
)

Sets the system button of the given type, the system buttons always receive mouse events so you don't need to call setHitTestVisible for them.

在文件 windowagentwidget.cpp 第 110 行定义.

◆ setSystemButtonArea()

void QxWindow::WindowAgentWidget::setSystemButtonArea ( QWidget *  widget)

Sets the widget that acts as the system button area.

The system button will be centered in its area, it is recommended to place the widget in a layout and set a fixed size policy.

The system button will be visible in the system title bar area.

在文件 windowagentwidget_mac.cpp 第 65 行定义.

◆ setSystemButtonAreaCallback()

void QxWindow::WindowAgentWidget::setSystemButtonAreaCallback ( const ScreenRectCallback &  callback)

Sets the the system button area callback, the size of the callback is the native title bar size.

The system button position will be updated when the window resizes.

在文件 windowagentwidget_mac.cpp 第 96 行定义.

◆ setTitleBar()

void QxWindow::WindowAgentWidget::setTitleBar ( QWidget *  w)

Sets the title bar widget, all system button and hit-test visible widget references that have been set will be removed.

在文件 windowagentwidget.cpp 第 85 行定义.

◆ setup()

bool QxWindow::WindowAgentWidget::setup ( QWidget *  w)

Installs the window agent on the widget.

The window agent will take over some of the window events, making the window look frameless.

在文件 windowagentwidget.cpp 第 47 行定义.

◆ systemButton()

QWidget * QxWindow::WindowAgentWidget::systemButton ( SystemButton  button) const

Returns the system button of the given type.

在文件 windowagentwidget.cpp 第 100 行定义.

◆ systemButtonArea()

QWidget * QxWindow::WindowAgentWidget::systemButtonArea ( ) const

Returns the widget that acts as the system button area.

在文件 windowagentwidget_mac.cpp 第 53 行定义.

◆ systemButtonAreaCallback()

ScreenRectCallback QxWindow::WindowAgentWidget::systemButtonAreaCallback ( ) const

Returns the the system button area callback.

在文件 windowagentwidget_mac.cpp 第 84 行定义.

◆ systemButtonChanged()

void QxWindow::WindowAgentWidget::systemButtonChanged ( SystemButton  button,
const QWidget *  w 
)

This signal is emitted when a system button is replaced.

◆ titleBar()

QWidget * QxWindow::WindowAgentWidget::titleBar ( ) const

Returns the title bar widget.

在文件 windowagentwidget.cpp 第 75 行定义.

◆ titleBarChanged()

void QxWindow::WindowAgentWidget::titleBarChanged ( const QWidget *  w)

This signal is emitted when the title bar widget is replaced.


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