Home · All Classes · All Functions · Overviews

QGraphicsBloomEffect Class Reference
[
QtGui module]

The QGraphicsBloomEffect class provides a bloom/glow effect. More...

 #include <QGraphicsBloomEffect>

Inherits QGraphicsEffect.

This class was introduced in Qt 4.6.


Properties


Public Functions

QGraphicsBloomEffect ( QObject * parent = 0 )
~QGraphicsBloomEffect ()
Qt::RenderHint blurHint () const
int blurRadius () const
int brightness () const
qreal strength () const

Reimplemented Public Functions

virtual QRectF boundingRectFor ( const QRectF & rect ) const

Public Slots

void setBlurHint ( Qt::RenderHint hint )
void setBlurRadius ( int blurRadius )
void setBrightness ( int brightness )
void setStrength ( qreal strength )

Signals

void blurHintChanged ( Qt::RenderHint hint )
void blurRadiusChanged ( int blurRadius )
void brightnessChanged ( int brightness )
void strengthChanged ( qreal strength )

Reimplemented Protected Functions

virtual void draw ( QPainter * painter, QGraphicsEffectSource * source )

Additional Inherited Members


Detailed Description

The QGraphicsBloomEffect class provides a bloom/glow effect.

A bloom/glow effect adds fringes of light around bright areas in the source.

See also QGraphicsDropShadowEffect, QGraphicsBlurEffect, QGraphicsPixelizeEffect, QGraphicsGrayscaleEffect, and QGraphicsColorizeEffect.


Property Documentation

blurHint : Qt::RenderHint

This property holds the blur hint of the effect.

Use the Qt::PerformanceHint hint to say that you want a faster blur, and the Qt::QualityHint hint to say that you prefer a higher quality blur.

When animating the blur radius it's recommended to use Qt::PerformanceHint.

By default, the blur hint is Qt::PerformanceHint.

Access functions:

Qt::RenderHint blurHint () const
void setBlurHint ( Qt::RenderHint hint )

Notifier signal:

void blurHintChanged ( Qt::RenderHint hint )

blurRadius : int

This property holds the blur radius in pixels 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.

Access functions:

int blurRadius () const
void setBlurRadius ( int blurRadius )

Notifier signal:

void blurRadiusChanged ( int blurRadius )

See also strength() and brightness().

brightness : int

This property holds the brightness of the glow.

The value should be in the range of 0 to 255, where 0 is dark and 255 is bright.

By default, the brightness is 70.

Access functions:

int brightness () const
void setBrightness ( int brightness )

Notifier signal:

void brightnessChanged ( int brightness )

See also strength() and blurRadius().

strength : qreal

This property holds the strength of the effect.

A strength 0.0 equals to no effect, while 1.0 means maximum glow.

By default, the strength is 0.7.

Access functions:

qreal strength () const
void setStrength ( qreal strength )

Notifier signal:

void strengthChanged ( qreal strength )

Member Function Documentation

QGraphicsBloomEffect::QGraphicsBloomEffect ( QObject * parent = 0 )

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

QGraphicsBloomEffect::~QGraphicsBloomEffect ()

Destroys the effect.

void QGraphicsBloomEffect::blurHintChanged ( Qt::RenderHint hint )   [signal]

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

void QGraphicsBloomEffect::blurRadiusChanged ( int blurRadius )   [signal]

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

QRectF QGraphicsBloomEffect::boundingRectFor ( const QRectF & rect ) const   [virtual]

Reimplemented from QGraphicsEffect::boundingRectFor().

void QGraphicsBloomEffect::brightnessChanged ( int brightness )   [signal]

This signal is emitted whenever the effect's brightness changes. The brightness parameter holds the effect's new brightness.

void QGraphicsBloomEffect::draw ( QPainter * painter, QGraphicsEffectSource * source )   [virtual protected]

Reimplemented from QGraphicsEffect::draw().

void QGraphicsBloomEffect::strengthChanged ( qreal strength )   [signal]

This signal is emitted whenever the effect's strength changes. The strength parameter holds the effect's new strength.


Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies) Trademarks
Qt 4.6.0