DtkWidget 5.6.0.2
DTK Widget module
|
The DMainWindow class provides a main application window. 更多...
Public 槽 | |
void | setWindowRadius (int windowRadius) |
DMainWindow::setWindowRadius 设定窗口的圆角 windowRadius 窗口的圆角值 | |
void | setBorderWidth (int borderWidth) |
DMainWindow::setBorderWidth 设定边框的宽度 borderWidth 边框的宽度 | |
void | setBorderColor (const QColor &borderColor) |
DMainWindow::setBorderColor 设定边框的颜色 borderColor 边框的颜色 | |
void | setShadowRadius (int shadowRadius) |
DMainWindow::setShadowRadius 设定阴影区域的圆角 shadowRadius 阴影区域圆角大小 | |
void | setShadowOffset (const QPoint &shadowOffset) |
DMainWindow::setShadowOffset 设定阴影区域的偏移距离 shadowOffset 阴影区域的偏移距离 | |
void | setShadowColor (const QColor &shadowColor) |
DMainWindow::setShadowColor 设定阴影的颜色 shadowColor 阴影的颜色 | |
void | setClipPath (const QPainterPath &clipPath) |
DMainWindow::setClipPath 设定裁剪路径 clipPath 裁剪的路径 | |
void | setFrameMask (const QRegion &frameMask) |
DMainWindow::setFrameMask 设定边框的mask区域 frameMask mask区域 | |
void | setTranslucentBackground (bool translucentBackground) |
DMainWindow::setTranslucentBackground 设定时候擦除背景 translucentBackground true擦除背景 false不擦除背景 | |
void | setEnableSystemResize (bool enableSystemResize) |
DMainWindow::setEnableSystemResize 设定是否允许系统调整窗口大小 enableSystemResize true允许系统调整 false不允许系统调整 | |
void | setEnableSystemMove (bool enableSystemMove) |
DMainWindow::setEnableSystemMove 设定时候允许系统移动窗口 enableSystemMove true允许移动 false不允许移动 | |
void | setEnableBlurWindow (bool enableBlurWindow) |
DMainWindow::setEnableBlurWindow 设置窗口模糊效果 | |
void | setAutoInputMaskByClipPath (bool autoInputMaskByClipPath) |
通过裁剪区域自动设定mask. 更多... | |
void | sendMessage (const QIcon &icon, const QString &message) |
发送浮动消息. 更多... | |
void | sendMessage (DFloatingMessage *message) |
发送浮动消息. 更多... | |
void | setTitlebarShadowEnabled (bool titlebarShadowEnabled) |
Public 成员函数 | |
DMainWindow (QWidget *parent=0) | |
DMainWindow::DMainWindow constructs an instance of DMainWindow parent is passed to QMainWindow construtor. | |
DTitlebar * | titlebar () const |
DMainWindow::titlebar 更多... | |
bool | isDXcbWindow () const |
DMainWindow::isDXcbWindow 更多... | |
int | windowRadius () const |
int | borderWidth () const |
QColor | borderColor () const |
int | shadowRadius () const |
QPoint | shadowOffset () const |
QColor | shadowColor () const |
QPainterPath | clipPath () const |
QRegion | frameMask () const |
QMargins | frameMargins () const |
bool | translucentBackground () const |
bool | enableSystemResize () const |
DMainWindow::enableSystemResize 更多... | |
bool | enableSystemMove () const |
bool | enableBlurWindow () const |
bool | autoInputMaskByClipPath () const |
bool | titlebarShadowIsEnabled () const |
Protected 成员函数 | |
DMainWindow (DMainWindowPrivate &dd, QWidget *parent=0) | |
void | mouseMoveEvent (QMouseEvent *event) override |
void | resizeEvent (QResizeEvent *event) override |
void | changeEvent (QEvent *event) override |
属性 | |
int | windowRadius |
This property holds the radius of the main window. | |
int | borderWidth |
This property holds the width of the main window's border. | |
QColor | borderColor |
This property holds the color of the main window's border. | |
int | shadowRadius |
This property holds the shadow radius of the main widnow. | |
QPoint | shadowOffset |
This property holds the offset applied on the window shadow. | |
QColor | shadowColor |
This property holds the color of the window shadow. | |
QPainterPath | clipPath |
This property holds the custom QPainterPath to be used to clip the window. 更多... | |
QRegion | frameMask |
This property holds the mask to be applied on the window. 更多... | |
QMargins | frameMargins |
bool | translucentBackground |
This property holds whether the window has translucent background. | |
bool | enableSystemResize |
bool | enableSystemMove |
This property holds whether the window can be moved by the user. 更多... | |
bool | enableBlurWindow |
This property holds whether the window background is blurred. | |
bool | autoInputMaskByClipPath |
This property holds whether the user input is masked by the clip path. 更多... | |
bool | titlebarShadowEnabled |
titleBar阴影属性. 更多... | |
The DMainWindow class provides a main application window.
\inmodule dtkwidget
A main window provides a framework for building an application's user interface. DMainWindow has its own layout compared to QMainWindow, it has only title bar and content area, simpler and cleaner.
Developers can provide customized title bar and content to make the application rich functional.
bool Dtk::Widget::DMainWindow::enableSystemResize | ( | ) | const |
DMainWindow::enableSystemResize
The default value of this property is true.
You can set this property to false and implement the resize polizy of this window by you self.
bool Dtk::Widget::DMainWindow::isDXcbWindow | ( | ) | const |
Many features like blurred background and window clipping are supported only if the window is using the dxcb Qt platform plugin.
|
slot |
发送浮动消息.
icon 消息展示图标 message 消息内容
|
slot |
发送浮动消息.
message DFloatingMessage消息
|
slot |
通过裁剪区域自动设定mask.
autoInputMaskByClipPath true自动设定 false不自动设定
DTitlebar * Dtk::Widget::DMainWindow::titlebar | ( | ) | const |
|
readwrite |
This property holds whether the user input is masked by the clip path.
Sometimes you may want to handle events happening in the areas that are visually clipped by the setting DMainWindow::clipPath.
The default value of this property is true.
|
readwrite |
This property holds the custom QPainterPath to be used to clip the window.
By default DMainWindow is clipped as a corner-rounded rectangle, but you can supply a custom QPainterPath to do custom shaped window.
|
readwrite |
This property holds whether the window can be moved by the user.
The default value of this property is true.
You can set this property to false and choose the effective area to drag and move.
|
readwrite |
This property holds the mask to be applied on the window.
For better clip quality, for example antialiasing, use property DMainWindow::clipPath instead.
|
readwrite |
titleBar阴影属性.
用于设置或者判断是否设置titleBar阴影属性.