42 #ifndef QGRAPHICSEFFECT_H
43 #define QGRAPHICSEFFECT_H
51 #ifndef QT_NO_GRAPHICSEFFECT
63 class QGraphicsEffectSource;
65 class QGraphicsEffectPrivate;
70 Q_PROPERTY(
bool enabled READ isEnabled WRITE setEnabled NOTIFY enabledChanged)
75 SourceBoundingRectChanged = 0x4,
76 SourceInvalidated = 0x8
78 Q_DECLARE_FLAGS(ChangeFlags, ChangeFlag)
83 PadToEffectiveBoundingRect
89 virtual QRectF boundingRectFor(
const QRectF &sourceRect)
const;
90 QRectF boundingRect()
const;
92 bool isEnabled()
const;
95 void setEnabled(
bool enable);
99 void enabledChanged(
bool enabled);
104 virtual void sourceChanged(ChangeFlags flags);
105 void updateBoundingRect();
107 bool sourceIsPixmap()
const;
112 PixmapPadMode
mode = PadToEffectiveBoundingRect)
const;
118 friend class QGraphicsItemPrivate;
119 friend class QGraphicsScenePrivate;
121 friend class QWidgetPrivate;
124 QGraphicsEffectSource *
source() const;
129 class QGraphicsColorizeEffectPrivate;
134 Q_PROPERTY(qreal strength READ strength WRITE setStrength NOTIFY strengthChanged)
140 qreal strength() const;
143 void setColor(const
QColor &
c);
144 void setStrength(qreal strength);
148 void strengthChanged(qreal strength);
158 class QGraphicsBlurEffectPrivate;
163 Q_PROPERTY(qreal blurRadius READ blurRadius WRITE setBlurRadius NOTIFY blurRadiusChanged)
164 Q_PROPERTY(BlurHints blurHints READ blurHints WRITE setBlurHints NOTIFY blurHintsChanged)
167 PerformanceHint = 0x00,
171 Q_DECLARE_FLAGS(BlurHints, BlurHint)
177 qreal blurRadius() const;
178 BlurHints blurHints() const;
181 void setBlurRadius(qreal blurRadius);
182 void setBlurHints(BlurHints hints);
185 void blurRadiusChanged(qreal blurRadius);
186 void blurHintsChanged(BlurHints hints);
196 Q_DECLARE_OPERATORS_FOR_FLAGS(QGraphicsBlurEffect::BlurHints)
198 class QGraphicsDropShadowEffectPrivate;
203 Q_PROPERTY(qreal xOffset READ xOffset WRITE setXOffset NOTIFY offsetChanged)
204 Q_PROPERTY(qreal yOffset READ yOffset WRITE setYOffset NOTIFY offsetChanged)
205 Q_PROPERTY(qreal blurRadius READ blurRadius WRITE setBlurRadius NOTIFY blurRadiusChanged)
220 qreal blurRadius()
const;
224 void setOffset(
const QPointF &ofs);
227 { setOffset(
QPointF(dx, dy)); }
233 { setOffset(
QPointF(dx, yOffset())); }
236 { setOffset(
QPointF(xOffset(), dy)); }
238 void setBlurRadius(qreal blurRadius);
243 void blurRadiusChanged(qreal blurRadius);
254 class QGraphicsOpacityEffectPrivate;
258 Q_PROPERTY(qreal opacity READ opacity WRITE setOpacity NOTIFY opacityChanged)
259 Q_PROPERTY(
QBrush opacityMask READ opacityMask WRITE setOpacityMask NOTIFY opacityMaskChanged)
264 qreal opacity() const;
265 QBrush opacityMask() const;
268 void setOpacity(qreal opacity);
272 void opacityChanged(qreal opacity);
273 void opacityMaskChanged(const
QBrush &mask);
286 #endif //QT_NO_GRAPHICSEFFECT
288 #endif // QGRAPHICSEFFECT_H
GLsizei GLsizei GLchar * source
void setXOffset(qreal dx)
void setOffset(qreal dx, qreal dy)
void setYOffset(qreal dy)
#define QT_BEGIN_NAMESPACE