4#ifndef QGRAPHICSEFFECT_H
5#define QGRAPHICSEFFECT_H
7#include <QtWidgets/qtwidgetsglobal.h>
8#include <QtCore/qobject.h>
9#include <QtCore/qpoint.h>
10#include <QtCore/qrect.h>
11#include <QtGui/qcolor.h>
12#include <QtGui/qbrush.h>
34 SourceBoundingRectChanged = 0x4,
35 SourceInvalidated = 0x8
43 PadToEffectiveBoundingRect
49 virtual QRectF boundingRectFor(
const QRectF &sourceRect)
const;
52 bool isEnabled()
const;
55 void setEnabled(
bool enable);
64 virtual void sourceChanged(ChangeFlags
flags);
65 void updateBoundingRect();
67 bool sourceIsPixmap()
const;
94 Q_PROPERTY(
qreal strength READ strength WRITE setStrength NOTIFY strengthChanged)
100 qreal strength()
const;
104 void setStrength(
qreal strength);
122 Q_PROPERTY(
qreal blurRadius READ blurRadius WRITE setBlurRadius NOTIFY blurRadiusChanged)
123 Q_PROPERTY(BlurHints blurHints READ blurHints WRITE setBlurHints NOTIFY blurHintsChanged)
126 PerformanceHint = 0x00,
138 qreal blurRadius()
const;
139 BlurHints blurHints()
const;
142 void setBlurRadius(
qreal blurRadius);
143 void setBlurHints(BlurHints hints);
164 Q_PROPERTY(
qreal xOffset READ xOffset WRITE setXOffset NOTIFY offsetChanged)
165 Q_PROPERTY(
qreal yOffset READ yOffset WRITE setYOffset NOTIFY offsetChanged)
166 Q_PROPERTY(
qreal blurRadius READ blurRadius WRITE setBlurRadius NOTIFY blurRadiusChanged)
181 qreal blurRadius()
const;
185 void setOffset(
const QPointF &ofs);
188 { setOffset(
QPointF(dx, dy)); }
194 { setOffset(
QPointF(dx, yOffset())); }
197 { setOffset(
QPointF(xOffset(), dy)); }
199 void setBlurRadius(
qreal blurRadius);
219 Q_PROPERTY(
qreal opacity READ opacity WRITE setOpacity NOTIFY opacityChanged)
225 qreal opacity()
const;
226 QBrush opacityMask()
const;
229 void setOpacity(
qreal opacity);
The QColor class provides colors based on RGB, HSV or CMYK values.
The QGraphicsBlurEffect class provides a blur effect.
void blurHintsChanged(BlurHints hints)
This signal is emitted whenever the effect's blur hints changes.
void blurRadiusChanged(qreal blurRadius)
This signal is emitted whenever the effect's blur radius changes.
The QGraphicsColorizeEffect class provides a colorize effect.
void strengthChanged(qreal strength)
This signal is emitted whenever setStrength() changes the colorize strength property.
void colorChanged(const QColor &color)
This signal is emitted whenever the effect's color changes.
The QGraphicsDropShadowEffect class provides a drop shadow effect.
void colorChanged(const QColor &color)
This signal is emitted whenever the effect's color changes.
void blurRadiusChanged(qreal blurRadius)
This signal is emitted whenever the effect's blur radius changes.
void offsetChanged(const QPointF &offset)
This signal is emitted whenever the effect's shadow offset changes.
void setXOffset(qreal dx)
void setYOffset(qreal dy)
void setOffset(qreal dx, qreal dy)
The QGraphicsEffectSource class represents the source on which a QGraphicsEffect is installed on.
The QGraphicsEffect class is the base class for all graphics effects.
ChangeFlag
This enum describes what has changed in QGraphicsEffectSource.
void enabledChanged(bool enabled)
This signal is emitted whenever the effect is enabled or disabled.
PixmapPadMode
This enum describes how the pixmap returned from sourcePixmap should be padded.
virtual void draw(QPainter *painter)=0
This pure virtual function draws the effect and is called whenever the source needs to be drawn.
The QGraphicsItem class is the base class for all graphical items in a QGraphicsScene.
The QGraphicsOpacityEffect class provides an opacity effect.
void opacityMaskChanged(const QBrush &mask)
This signal is emitted whenever the effect's opacity mask changes.
void opacityChanged(qreal opacity)
This signal is emitted whenever the effect's opacity changes.
The QPainter class performs low-level painting on widgets and other paint devices.
Returns a copy of the pixmap that is transformed using the given transformation transform and transfo...
\inmodule QtCore\reentrant
\inmodule QtCore\reentrant
\inmodule QtCore\reentrant
The QStyleOption class stores the parameters used by QStyle functions.
Combined button and popup list for selecting options.
#define Q_DECLARE_FLAGS(Flags, Enum)
#define Q_DECLARE_OPERATORS_FOR_FLAGS(Flags)
GLenum GLenum GLsizei const GLuint GLboolean enabled
GLenum GLuint GLintptr offset
GLint GLint GLint GLint GLint GLint GLint GLbitfield mask
GLsizei GLsizei GLchar * source
static const QRectF boundingRect(const QPointF *points, int pointCount)
#define QT_REQUIRE_CONFIG(feature)
effect setOpacityMask(alphaGradient)
myFilter setColor(QColor(128, 0, 0))
myFilter draw(painter, QPoint(0, 0), originalPixmap)
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent