16class LIBDTKWIDGETSHARED_EXPORT
DBlurEffectWidget :
public QWidget,
public DTK_CORE_NAMESPACE::DObject
21 Q_PROPERTY(
int radius READ radius WRITE setRadius NOTIFY radiusChanged)
22 Q_PROPERTY(
BlurMode mode READ mode WRITE setMode NOTIFY modeChanged)
23 Q_PROPERTY(
BlendMode blendMode READ blendMode WRITE setBlendMode NOTIFY blendModeChanged)
24 Q_PROPERTY(
int blurRectXRadius READ blurRectXRadius WRITE setBlurRectXRadius NOTIFY blurRectXRadiusChanged)
25 Q_PROPERTY(
int blurRectYRadius READ blurRectYRadius WRITE setBlurRectYRadius NOTIFY blurRectYRadiusChanged)
28 Q_PROPERTY(QColor maskColor READ maskColor WRITE setMaskColor NOTIFY maskColorChanged)
29 Q_PROPERTY(quint8 maskAlpha READ maskAlpha WRITE setMaskAlpha NOTIFY maskAlphaChanged)
30 Q_PROPERTY(
bool full READ isFull WRITE setFull NOTIFY fullChanged)
31 Q_PROPERTY(
bool blurEnabled READ blurEnabled WRITE setBlurEnabled NOTIFY blurEnabledChanged)
56 Q_ENUMS(MaskColorType)
58 explicit DBlurEffectWidget(QWidget *parent = 0);
62 BlurMode mode()
const;
64 BlendMode blendMode()
const;
65 int blurRectXRadius()
const;
66 int blurRectYRadius()
const;
69 bool blurEnabled()
const;
71 QColor maskColor()
const;
73 quint8 maskAlpha()
const;
75 void setMaskPath(
const QPainterPath &path);
76 void setSourceImage(
const QImage &image,
bool autoScale =
true);
79 void setRadius(
int radius);
80 void setMode(BlurMode mode);
82 void setBlendMode(BlendMode blendMode);
83 void setBlurRectXRadius(
int blurRectXRadius);
84 void setBlurRectYRadius(
int blurRectYRadius);
85 void setMaskAlpha(quint8 alpha);
86 void setMaskColor(QColor maskColor);
87 void setMaskColor(MaskColorType type);
88 void setFull(
bool full);
89 void setBlurEnabled(
bool blurEnabled);
91 void updateBlurSourceImage(
const QRegion &ren);
102 void fullChanged(
bool full);
103 void blurEnabledChanged(
bool blurEnabled);
105 void blurSourceImageDirtied();
110 void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE;
111 void moveEvent(QMoveEvent *event) Q_DECL_OVERRIDE;
112 void resizeEvent(QResizeEvent *event) Q_DECL_OVERRIDE;
113 void showEvent(QShowEvent *event) Q_DECL_OVERRIDE;
114 void hideEvent(QHideEvent *event) Q_DECL_OVERRIDE;
115 void changeEvent(QEvent *event) Q_DECL_OVERRIDE;
116 bool eventFilter(QObject *watched, QEvent *event)
override;