QtBase
v6.3.1
|
The QGraphicsBlurEffect class provides a blur effect. More...
#include <qgraphicseffect.h>
Public Types | |
enum | BlurHint { PerformanceHint = 0x00 , QualityHint = 0x01 , AnimationHint = 0x02 } |
Public Types inherited from QGraphicsEffect | |
enum | ChangeFlag { SourceAttached = 0x1 , SourceDetached = 0x2 , SourceBoundingRectChanged = 0x4 , SourceInvalidated = 0x8 } |
enum | PixmapPadMode { NoPad , PadToTransparentBorder , PadToEffectiveBoundingRect } |
Public Slots | |
void | setBlurRadius (qreal blurRadius) |
void | setBlurHints (BlurHints hints) |
Public Slots inherited from QGraphicsEffect | |
void | setEnabled (bool enable) |
void | update () |
Public Slots inherited from QObject | |
void | deleteLater () |
Signals | |
void | blurRadiusChanged (qreal blurRadius) |
void | blurHintsChanged (BlurHints hints) |
Signals inherited from QGraphicsEffect | |
void | enabledChanged (bool enabled) |
Signals inherited from QObject | |
void | destroyed (QObject *=nullptr) |
void | objectNameChanged (const QString &objectName, QPrivateSignal) |
Properties | |
qreal | blurRadius |
the blur radius of the effect. More... | |
BlurHints | blurHints |
the blur hint of the effect. 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 QGraphicsBlurEffect class provides a blur effect.
A blur effect blurs the source. This effect is useful for reducing details, such as when the source loses focus and you want to draw attention to other elements. The level of detail can be modified using the setBlurRadius() function. Use setBlurHints() to choose the blur hints.
By default, the blur radius is 5 pixels. The blur radius is specified in device coordinates.
Definition at line 155 of file qgraphicseffect.h.
This enum describes the possible hints that can be used to control how blur effects are applied. The hints might not have an effect in all the paint engines.
\value PerformanceHint Indicates that rendering performance is the most important factor, at the potential cost of lower quality.
\value QualityHint Indicates that rendering quality is the most important factor, at the potential cost of lower performance.
\value AnimationHint Indicates that the blur radius is going to be animated, hinting that the implementation can keep a cache of blurred versions of the source. Do not use this hint if the source is going to be dynamically changing.
Enumerator | |
---|---|
PerformanceHint | |
QualityHint | |
AnimationHint |
Definition at line 161 of file qgraphicseffect.h.
Constructs a new QGraphicsBlurEffect instance. The parent parameter is passed to QGraphicsEffect's constructor.
Definition at line 764 of file qgraphicseffect.cpp.
QGraphicsBlurEffect::~QGraphicsBlurEffect | ( | ) |
Destroys the effect.
Definition at line 774 of file qgraphicseffect.cpp.
QGraphicsBlurEffect::BlurHints QGraphicsBlurEffect::blurHints | ( | ) | const |
Definition at line 824 of file qgraphicseffect.cpp.
|
signal |
This signal is emitted whenever the effect's blur hints changes. The hints parameter holds the effect's new blur hints.
qreal QGraphicsBlurEffect::blurRadius | ( | ) | const |
Definition at line 790 of file qgraphicseffect.cpp.
This signal is emitted whenever the effect's blur radius changes. The radius parameter holds the effect's new blur radius.
\reimp
Implements QGraphicsEffect.
Definition at line 859 of file qgraphicseffect.cpp.
|
slot |
Definition at line 830 of file qgraphicseffect.cpp.
|
readwrite |
the blur hint of the effect.
Use the PerformanceHint hint to say that you want a faster blur, the QualityHint hint to say that you prefer a higher quality blur, or the AnimationHint when you want to animate the blur radius.
By default, the blur hint is PerformanceHint.
Definition at line 147 of file qgraphicseffect.h.
|
readwrite |
the blur radius of the effect.
Using a smaller radius results in a sharper appearance, whereas a bigger radius results in a more blurred appearance.
By default, the blur radius is 5 pixels.
The radius is given in device coordinates, meaning it is unaffected by scale.
Definition at line 147 of file qgraphicseffect.h.