|
DtkWidget
DTK Widget module
|
信号 | |
| void | confirmBtnClicked () |
信号 继承自 Dtk::Widget::DBlurEffectWidget | |
| void | radiusChanged (int radius) |
| 信号会在 radius 属性的值改变时被发送 | |
| void | modeChanged (BlurMode mode) |
| 信号会在 mode 属性的值改变时被发送. | |
| void | blendModeChanged (BlendMode blendMode) |
| 信号会在 blendMode 属性的值改变时被发送 | |
| void | blurRectXRadiusChanged (int blurRectXRadius) |
| 信号会在 blurRectXRadius 属性的值改变时被发送 | |
| void | blurRectYRadiusChanged (int blurRectYRadius) |
| 信号会在 blurRectYRadius 属性的值改变时被发送 | |
| void | maskAlphaChanged (quint8 alpha) |
| 信号会在 alpha 属性的值改变时被发送 | |
| void | maskColorChanged (QColor maskColor) |
| 信号会在 maskColor 属性的值改变时被发送 | |
| void | fullChanged (bool full) |
| void | blurEnabledChanged (bool blurEnabled) |
| void | blurSourceImageDirtied () |
Public 成员函数 | |
| DToolbarEditPanel (DTitlebarSettingsImpl *settingsImpl, QWidget *parent=Q_NULLPTR) | |
| void | addWidgetToSelectionZone (const QString &id) |
| void | setDefaultView (const QPixmap &pixmap, const QSize &size) |
| void | removeAll () |
Public 成员函数 继承自 Dtk::Widget::DBlurEffectWidget | |
| DBlurEffectWidget (QWidget *parent=0) | |
| DBlurEffectWidget::DBlurEffectWidget constructs an instance of DBlurEffectWidget. | |
| int | radius () const |
| This property holds the radius of the blur effect. | |
| BlurMode | mode () const |
| This property holds which blur algorithm to be used. | |
| BlendMode | blendMode () const |
| This property holds which mode is used to blend the widget and its background scene. | |
| int | blurRectXRadius () const |
| This property holds the xRadius of the effective background. | |
| int | blurRectYRadius () const |
| This property holds the yRadius of the effective background. | |
| bool | isFull () const |
| DBlurEffectWidget::isFull | |
| bool | blurEnabled () const |
| DBlurEffectWidget::blurEnabled | |
| QColor | maskColor () const |
| This property holds the background color of this widget. | |
| quint8 | maskAlpha () const |
| void | setMaskPath (const QPainterPath &path) |
| DBlurEffectWidget::setMaskPath set custom area as the effective background. | |
| void | setSourceImage (const QImage &image, bool autoScale=true) |
| DBlurEffectWidget::setSourceImage image autoScale | |
Protected 成员函数 | |
| void | keyPressEvent (QKeyEvent *event) Q_DECL_OVERRIDE |
Protected 成员函数 继承自 Dtk::Widget::DBlurEffectWidget | |
| DBlurEffectWidget (DBlurEffectWidgetPrivate &dd, QWidget *parent=0) | |
| void | paintEvent (QPaintEvent *event) Q_DECL_OVERRIDE |
| void | moveEvent (QMoveEvent *event) Q_DECL_OVERRIDE |
| void | resizeEvent (QResizeEvent *event) Q_DECL_OVERRIDE |
| void | showEvent (QShowEvent *event) Q_DECL_OVERRIDE |
| void | hideEvent (QHideEvent *event) Q_DECL_OVERRIDE |
| void | changeEvent (QEvent *event) Q_DECL_OVERRIDE |
| bool | eventFilter (QObject *watched, QEvent *event) override |
额外继承的成员函数 | |
Public 类型 继承自 Dtk::Widget::DBlurEffectWidget | |
| enum | BlurMode { GaussianBlur } |
| enum | BlendMode { InWindowBlend , BehindWindowBlend , InWidgetBlend } |
| enum | MaskColorType { DarkColor , LightColor , AutoColor , CustomColor } |
Public 槽 继承自 Dtk::Widget::DBlurEffectWidget | |
| void | setRadius (int radius) |
| DBlurEffectWidget::setRadius radius 模糊区域的圆角大小 如果设定值和原值不一致会发送信号radiusChanged | |
| void | setMode (BlurMode mode) |
| DBlurEffectWidget::setMode mode 设定模糊算法,默认为高斯模糊算法GaussianBlur | |
| void | setBlendMode (BlendMode blendMode) |
| DBlurEffectWidget::setBlendMode blendMode 窗口混合模式,模式设定变化发送blendModeChanged信号 | |
| void | setBlurRectXRadius (int blurRectXRadius) |
| DBlurEffectWidget::setBlurRectXRadius blurRectXRadius 模糊区域矩形的X圆角大小 | |
| void | setBlurRectYRadius (int blurRectYRadius) |
| DBlurEffectWidget::setBlurRectYRadius blurRectYRadius 模糊区域矩形的Y圆角大小 | |
| void | setMaskAlpha (quint8 alpha) |
| DBlurEffectWidget::setMaskAlpha alpha 设置Alpha通道,值变化发送maskAlphaChanged信号 | |
| void | setMaskColor (QColor maskColor) |
| DBlurEffectWidget::setMaskColor maskColor 设定mask的颜色 | |
| void | setMaskColor (MaskColorType type) |
| 设置控件的颜色模式,默认值为 MaskColorType::CustomColor type | |
| void | setFull (bool full) |
| DBlurEffectWidget::setFull full 设置时候模糊区域占满整个窗口大小 | |
| void | setBlurEnabled (bool blurEnabled) |
| DBlurEffectWidget::setBlurEnabled blurEnabled 设定模糊区域是否可以伸缩 | |
| void | updateBlurSourceImage (const QRegion &ren) |
| DBlurEffectWidget::updateBlurSourceImage ren 设定模糊区域的背景图片 | |
属性 继承自 Dtk::Widget::DBlurEffectWidget | |
| int | radius |
| 模糊效果计算时的取样范围,模糊的原理为:将此像素点和周围像素点合成计算得到得到新的值, 此属性表示像素点周围 radius 距离的所有像素点参与计算 | |
| BlurMode | mode |
| 所采用的模糊算法,默认值为 GaussianBlur | |
| BlendMode | blendMode |
| 模糊的应用场景,默认会根据有没有父控件自动判断使用哪种模式 | |
| int | blurRectXRadius |
| 模糊区域在x轴方向上的圆角半径,默认值为0 | |
| int | blurRectYRadius |
| 模糊区域在y轴方向上的圆角半径,默认值为0 | |
| QColor | maskColor |
| 画在控件模糊背景之上的颜色,此颜色的alpha通道值会被 maskAlpha 属性影响 修改此属性会自动将颜色模式设置为 CustomColor,设置后将不能再自动根据窗口管理器是否 支持混成和模糊来自动使用最佳的颜色 | |
| quint8 | maskAlpha |
| maskColor 的alpha通道值。当前窗口管理器支持混成(窗口背景透明)时默认值为102,否则为204 | |
| bool | full |
| 如果值为true,将模糊此控件所在顶层窗口的整个背景,而无论控件的大小和位置,否则使用控件的位置和大小 设置顶层窗口的模糊区域。需要注意的时,当控件本身就是顶层窗口且未设置 blurRectXRadius 和 blurRectYRadius 属性的情况下,无论 full 属性的值为多少,都将和值为 true 时的行为保持一致。 | |
| bool | blurEnabled |
| 如果值为 true 则此控件的模糊设置生效,否则不生效 | |