QtBase
v6.3.1
|
The QGraphicsDropShadowEffect class provides a drop shadow effect. More...
#include <qgraphicseffect.h>
Public Slots | |
void | setOffset (const QPointF &ofs) |
void | setOffset (qreal dx, qreal dy) |
void | setOffset (qreal d) |
void | setXOffset (qreal dx) |
void | setYOffset (qreal dy) |
void | setBlurRadius (qreal blurRadius) |
void | setColor (const QColor &color) |
Public Slots inherited from QGraphicsEffect | |
void | setEnabled (bool enable) |
void | update () |
Public Slots inherited from QObject | |
void | deleteLater () |
Signals | |
void | offsetChanged (const QPointF &offset) |
void | blurRadiusChanged (qreal blurRadius) |
void | colorChanged (const QColor &color) |
Signals inherited from QGraphicsEffect | |
void | enabledChanged (bool enabled) |
Signals inherited from QObject | |
void | destroyed (QObject *=nullptr) |
void | objectNameChanged (const QString &objectName, QPrivateSignal) |
Properties | |
QPointF | offset |
the shadow offset in pixels. More... | |
qreal | xOffset |
the horizontal shadow offset in pixels. More... | |
qreal | yOffset |
the vertical shadow offset in pixels. More... | |
qreal | blurRadius |
the blur radius in pixels of the drop shadow. More... | |
QColor | color |
the color of the drop shadow. More... | |
Properties inherited from QGraphicsEffect | |
bool | enabled |
whether the effect is enabled or not. More... | |
Properties inherited from QObject | |
QString | objectName |
the name of this object More... | |
The QGraphicsDropShadowEffect class provides a drop shadow effect.
A drop shadow effect renders the source with a drop shadow. The color of the drop shadow can be modified using the setColor() function. The drop shadow offset can be modified using the setOffset() function and the blur radius of the drop shadow can be changed with the setBlurRadius() function.
By default, the drop shadow is a semi-transparent dark gray (QColor(63, 63, 63, 180)) shadow, blurred with a radius of 1 at an offset of 8 pixels towards the lower right. The drop shadow offset is specified in device coordinates.
Definition at line 196 of file qgraphicseffect.h.
Constructs a new QGraphicsDropShadowEffect instance. The parent parameter is passed to QGraphicsEffect's constructor.
Definition at line 903 of file qgraphicseffect.cpp.
QGraphicsDropShadowEffect::~QGraphicsDropShadowEffect | ( | ) |
Destroys the effect.
Definition at line 911 of file qgraphicseffect.cpp.
qreal QGraphicsDropShadowEffect::blurRadius | ( | ) | const |
Definition at line 981 of file qgraphicseffect.cpp.
This signal is emitted whenever the effect's blur radius changes. The blurRadius parameter holds the effect's new blur radius.
QColor QGraphicsDropShadowEffect::color | ( | ) | const |
Definition at line 1014 of file qgraphicseffect.cpp.
This signal is emitted whenever the effect's color changes. The color parameter holds the effect's new color.
\reimp
Implements QGraphicsEffect.
Definition at line 1050 of file qgraphicseffect.cpp.
QPointF QGraphicsDropShadowEffect::offset | ( | ) | const |
Definition at line 926 of file qgraphicseffect.cpp.
This signal is emitted whenever the effect's shadow offset changes. The offset parameter holds the effect's new shadow offset.
Definition at line 226 of file qgraphicseffect.h.
Definition at line 223 of file qgraphicseffect.h.
Definition at line 229 of file qgraphicseffect.h.
Definition at line 232 of file qgraphicseffect.h.
|
inline |
Definition at line 211 of file qgraphicseffect.h.
|
inline |
Definition at line 214 of file qgraphicseffect.h.
|
readwrite |
the blur radius in pixels of the drop shadow.
Using a smaller radius results in a sharper shadow, whereas using a bigger radius results in a more blurred shadow.
By default, the blur radius is 1 pixel.
Definition at line 186 of file qgraphicseffect.h.
|
readwrite |
the color of the drop shadow.
By default, the drop color is a semi-transparent dark gray (QColor(63, 63, 63, 180)).
Definition at line 186 of file qgraphicseffect.h.
|
readwrite |
the shadow offset in pixels.
By default, the offset is 8 pixels towards the lower right.
The offset is given in device coordinates, which means it is unaffected by scale.
Definition at line 186 of file qgraphicseffect.h.
|
readwrite |
the horizontal shadow offset in pixels.
By default, the horizontal shadow offset is 8 pixels.
Definition at line 186 of file qgraphicseffect.h.
|
readwrite |
the vertical shadow offset in pixels.
By default, the vertical shadow offset is 8 pixels.
Definition at line 186 of file qgraphicseffect.h.