QtCanpool 3.3.0
载入中...
搜索中...
未找到
windowagentwidget.h
浏览该文件的文档.
1
5#ifndef WINDOWAGENTWIDGET_H
6#define WINDOWAGENTWIDGET_H
7
8#include "windowagentbase.h"
9#include "qxwindow_global.h"
10#include <QtWidgets/QWidget>
11
13
14class WindowAgentWidgetPrivate;
15
17{
18 Q_OBJECT
19 Q_DECLARE_PRIVATE(WindowAgentWidget)
20public:
21 explicit WindowAgentWidget(QObject *parent = nullptr);
23public:
24 bool setup(QWidget *w);
25
26 QWidget *titleBar() const;
27 void setTitleBar(QWidget *w);
28
29 QWidget *systemButton(SystemButton button) const;
30 void setSystemButton(SystemButton button, QWidget *w);
31 void removeSystemButton(SystemButton button);
32
33#ifdef Q_OS_MAC
34 // The system button area APIs are experimental, very likely to change in the future.
35 QWidget *systemButtonArea() const;
36 void setSystemButtonArea(QWidget *widget);
37
38 ScreenRectCallback systemButtonAreaCallback() const;
39 void setSystemButtonAreaCallback(const ScreenRectCallback &callback);
40#endif
41
42 bool isHitTestVisible(const QWidget *w) const;
43 void setHitTestVisible(const QWidget *w, bool visible = true);
44
45 void addCaptionClassName(const QString &name);
46
47Q_SIGNALS:
48 void titleBarChanged(const QWidget *w);
49 void systemButtonChanged(SystemButton button, const QWidget *w);
50protected:
51 WindowAgentWidget(WindowAgentWidgetPrivate &d, QObject *parent = nullptr);
52};
53
55
56#endif // WINDOWAGENTWIDGET_H
WindowAgentBase is the base class of the specifiy window agent for QtWidgets and QtQuick.
WindowAgentBase is the window agent for QtWidgets.
void systemButtonChanged(SystemButton button, const QWidget *w)
This signal is emitted when a system button is replaced.
void titleBarChanged(const QWidget *w)
This signal is emitted when the title bar widget is replaced.
~WindowAgentWidget() override
Destructor.
std::function< QRect(const QSize &)> ScreenRectCallback
const char * name
Definition qxtheme.cpp:25
QColor button
#define QX_WINDOW_END_NAMESPACE
#define QX_WINDOW_EXPORT
#define QX_WINDOW_BEGIN_NAMESPACE