CopperSpice API  1.7.2
QGraphicsBlurEffect Class Reference

The QGraphicsBlurEffect class provides a blur effect. More...

Inheritance diagram for QGraphicsBlurEffect:
QGraphicsEffect QObject

Public Typedefs

using BlurHints = QFlags< BlurHint >
 

Public Types

enum  BlurHint
 
- Public Types inherited from QGraphicsEffect
enum  PixmapPadMode
 

Public Signals

void blurHintsChanged (BlurHints hints)
 
void blurRadiusChanged (qreal blurRadius)
 
- Public Signals inherited from QGraphicsEffect
void enabledChanged (bool enabled)
 
- Public Signals inherited from QObject
void destroyed (QObject *obj=nullptr)
 
void objectNameChanged (const QString &objectName)
 

Public Slots

void setBlurHints (BlurHints hints)
 
void setBlurRadius (qreal blurRadius)
 
- Public Slots inherited from QGraphicsEffect
void setEnabled (bool enable)
 
void update ()
 
- Public Slots inherited from QObject
void deleteLater ()
 

Public Methods

 QGraphicsBlurEffect (QObject *parent=nullptr)
 
 ~QGraphicsBlurEffect ()
 
BlurHints blurHints () const
 
qreal blurRadius () const
 
QRectF boundingRectFor (const QRectF &rect) const override
 
- Public Methods inherited from QGraphicsEffect
 QGraphicsEffect (QObject *parent=nullptr)
 
virtual ~QGraphicsEffect ()
 
QRectF boundingRect () const
 
bool isEnabled () const
 
- Public Methods inherited from QObject
 QObject (QObject *parent=nullptr)
 
 ~QObject ()
 
bool blockSignals (bool block)
 
const QList< QObject * > & children () const
 
bool connect (const QObject *sender, const QString &signalMethod, const QString &location, const QString &slotMethod, Qt::ConnectionType type=Qt::AutoConnection)
 
bool connect (const QObject *sender, const QString &signalMethod, const QString &slotMethod, Qt::ConnectionType type=Qt::AutoConnection)
 
bool disconnect (const QObject *receiver, const QString &slotMethod=QString ()) const
 
bool disconnect (const QString &signalMethod, const QString &location, const QObject *receiver=nullptr, const QString &slotMethod=QString ()) const
 
bool disconnect (const QString &signalMethod=QString (), const QObject *receiver=nullptr, const QString &slotMethod=QString ()) const
 
void dumpObjectInfo ()
 
void dumpObjectTree ()
 
QList< QStringdynamicPropertyNames () const
 
virtual bool event (QEvent *event)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
template<typename T >
findChild (const QString &childName=QString ()) const
 
template<class T >
QList< T > findChildren (const QRegularExpression &regExp, Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 
template<class T >
QList< T > findChildren (const QString &objName=QString (), Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 
bool inherits (const QString &className) const
 
void installEventFilter (QObject *filterObj)
 
bool isWidgetType () const
 
bool isWindowType () const
 
void killTimer (int id)
 
const QMetaObjectmetaObject () const
 
void moveToThread (QThread *targetThread)
 
QString objectName () const
 
QObject * parent () const
 
template<class T = QVariant>
property (const QString &name) const
 
void removeEventFilter (QObject *obj)
 
void setObjectName (const QString &name)
 
void setParent (QObject *parent)
 
bool setProperty (const QString &name, const QVariant &value)
 
bool signalsBlocked () const
 
int startTimer (int interval, Qt::TimerType timerType=Qt::CoarseTimer)
 
QThreadthread () const
 

Protected Methods

void draw (QPainter *painter) override
 
- Protected Methods inherited from QGraphicsEffect
void drawSource (QPainter *painter)
 
QRectF sourceBoundingRect (Qt::CoordinateSystem system=Qt::LogicalCoordinates) const
 
virtual void sourceChanged (ChangeFlags flags)
 
bool sourceIsPixmap () const
 
QPixmap sourcePixmap (Qt::CoordinateSystem system=Qt::LogicalCoordinates, QPoint *offset=nullptr, PixmapPadMode mode=PadToEffectiveBoundingRect) const
 
void updateBoundingRect ()
 
- Protected Methods inherited from QObject
virtual void childEvent (QChildEvent *event)
 
virtual void connectNotify (const QMetaMethod &signalMethod) const
 
virtual void customEvent (QEvent *event)
 
virtual void disconnectNotify (const QMetaMethod &signalMethod) const
 
bool isSignalConnected (const QMetaMethod &signalMethod) const
 
int receivers (const QString &signal) const
 
QObject * sender () const
 
int senderSignalIndex () const
 
virtual void timerEvent (QTimerEvent *event)
 

Properties

 blurHints
 
 blurRadius
 
- Properties inherited from QGraphicsEffect
 enabled
 
- Properties inherited from QObject
 objectName
 

Additional Inherited Members

- Static Public Methods inherited from QObject
static bool connect (const QObject *sender, const QMetaMethod &signalMethod, const QObject *receiver, const QMetaMethod &slotMethod, Qt::ConnectionType type=Qt::AutoConnection)
 
static bool connect (const QObject *sender, const QString &signalMethod, const QObject *receiver, const QString &slotMethod, Qt::ConnectionType type=Qt::AutoConnection, const QString &location=QString ())
 
static bool connect (const QObject *sender, const QString &signalMethod, const QString &location, const QObject *receiver, const QString &slotMethod, Qt::ConnectionType type=Qt::AutoConnection)
 
template<class Sender , class SignalClass , class... SignalArgs, class Receiver , class SlotClass , class... SlotArgs, class SlotReturn >
static bool connect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, SlotReturn (SlotClass::*slotMethod)(SlotArgs...), Qt::ConnectionType type=Qt::AutoConnection)
 
template<class Sender , class SignalClass , class... SignalArgs, class Receiver , class T >
static bool connect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, T slotLambda, Qt::ConnectionType type=Qt::AutoConnection)
 
static bool disconnect (const QObject *sender, const QMetaMethod &signalMethod, const QObject *receiver, const QMetaMethod &slotMethod)
 
static bool disconnect (const QObject *sender, const QString &signalMethod, const QObject *receiver, const QString &slotMethod)
 
static bool disconnect (const QObject *sender, const QString &signalMethod, const QString &location, const QObject *receiver, const QString &slotMethod)
 
template<class Sender , class SignalClass , class... SignalArgs, class Receiver , class SlotClass , class... SlotArgs, class SlotReturn >
static bool disconnect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, SlotReturn (SlotClass::*slotMethod)(SlotArgs...))
 
template<class Sender , class SignalClass , class... SignalArgs, class Receiver >
static bool disconnect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, std::nullptr_t slotMethod=nullptr)
 
template<class Sender , class SignalClass , class... SignalArgs, class Receiver , class T >
static bool disconnect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, T slotMethod)
 
static QMetaObjectstaticMetaObject ()
 
static QString tr (const char *text, const char *comment=nullptr, std::optional< int > numArg=std::optional< int >())
 

Detailed Description

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.

See also
QGraphicsDropShadowEffect, QGraphicsColorizeEffect, QGraphicsOpacityEffect

Member Typedef Documentation

Member Enumeration Documentation

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.

ConstantValueDescription
QGraphicsBlurEffect::PerformanceHint0x00 Indicates that rendering performance is the most important factor, at the potential cost of lower quality.
QGraphicsBlurEffect::QualityHint0x01 Indicates that rendering quality is the most important factor, at the potential cost of lower performance.
QGraphicsBlurEffect::AnimationHint0x02 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.
See also
blurHints(), setBlurHints()

Constructor & Destructor Documentation

QGraphicsBlurEffect::QGraphicsBlurEffect ( QObject parent = nullptr)

Constructs a new QGraphicsBlurEffect instance. The parent parameter is passed to QGraphicsEffect's constructor.

QGraphicsBlurEffect::~QGraphicsBlurEffect ( )

Destroys the effect.

Method Documentation

BlurHints QGraphicsBlurEffect::blurHints ( ) const

Property documentation pending.

void QGraphicsBlurEffect::blurHintsChanged ( BlurHints  hints)
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

Property documentation pending.

void QGraphicsBlurEffect::blurRadiusChanged ( qreal  blurRadius)
signal

This signal is emitted whenever the effect's blur radius changes. The blurRadius parameter holds the effect's new blur radius.

QRectF QGraphicsBlurEffect::boundingRectFor ( const QRectF rect) const
overridevirtual

Reimplemented from QGraphicsEffect::boundingRectFor().

Reimplemented from QGraphicsEffect.

void QGraphicsBlurEffect::draw ( QPainter painter)
overrideprotectedvirtual

Reimplemented from QGraphicsEffect::draw().

Implements QGraphicsEffect.

void QGraphicsBlurEffect::setBlurHints ( BlurHints  hints)
slot

Property documentation pending.

void QGraphicsBlurEffect::setBlurRadius ( qreal  blurRadius)
slot

Property documentation pending.

Property Documentation

QGraphicsBlurEffect::blurHints

This property holds 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.

PropertiesClass Methods
read blurHints
write setBlurHints
notify blurHintsChanged
QGraphicsBlurEffect::blurRadius

This property holds 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. The radius is given in device coordinates, meaning it is unaffected by scale.

By default, the blur radius is 5 pixels.

PropertiesClass Methods
read blurRadius
write setBlurRadius
notify blurRadiusChanged