Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Classes principales  ·  Annotées  ·  Classes groupées  ·  Modules  ·  Fonctions  · 

QGraphicsBlurEffect Class

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

 #include <QGraphicsBlurEffect>

Inherits: QGraphicsEffect.

This class was introduced in Qt 4.6.

Public Types

enum BlurHint { PerformanceHint, QualityHint, AnimationHint }
flags BlurHints
enum ChangeFlag { SourceAttached, SourceDetached, SourceBoundingRectChanged, SourceInvalidated }
flags ChangeFlags
enum PixmapPadMode { NoPad, PadToTransparentBorder, PadToEffectiveBoundingRect }

Properties

  • 1 property inherited from QObject

Public Functions

QGraphicsBlurEffect(QObject * parent = 0)
QGraphicsEffect(QObject * parent = 0)
~QGraphicsBlurEffect()
virtual ~QGraphicsEffect()
BlurHints blurHints() const
qreal blurRadius() const
QRectF boundingRect() const
virtual QRectF boundingRectFor(const QRectF & rect) const
bool isEnabled() const

Reimplemented Public Functions

virtual QRectF boundingRectFor(const QRectF & rect) const
  • 31 public functions inherited from QObject

Public Slots

void setBlurHints(BlurHints hints)
void setBlurRadius(qreal blurRadius)
void setEnabled(bool enable)
void update()
  • 1 public slot inherited from QObject

Signals

void blurHintsChanged(BlurHints hints)
void blurRadiusChanged(qreal radius)
void enabledChanged(bool enabled)

Protected Functions

virtual void draw(QPainter * painter) = 0
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 = 0, PixmapPadMode mode = PadToEffectiveBoundingRect) const
void updateBoundingRect()

Reimplemented Protected Functions

virtual void draw(QPainter * painter)
  • 9 protected functions inherited from QObject

Additional Inherited Members

  • 11 static public members inherited from QObject

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, and QGraphicsOpacityEffect.

Member Type Documentation

enum QGraphicsBlurEffect::BlurHint
flags QGraphicsBlurEffect::BlurHints

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::PerformanceHint0x00Indicates that rendering performance is the most important factor, at the potential cost of lower quality.
QGraphicsBlurEffect::QualityHint0x01Indicates that rendering quality is the most important factor, at the potential cost of lower performance.
QGraphicsBlurEffect::AnimationHint0x02Indicates that the blur radius is going to be animated, hinting that the implementation can keep a cache of blurred verisons of the source. Do not use this hint if the source is going to be dynamically changing.

This enum was introduced or modified in Qt 4.6.

The BlurHints type is a typedef for QFlags<BlurHint>. It stores an OR combination of BlurHint values.

See also blurHints() and setBlurHints().

Property Documentation

blurHints : 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.

Access functions:

BlurHints blurHints() const
void setBlurHints(BlurHints hints)

Notifier signal:

void blurHintsChanged(BlurHints hints)

blurRadius : qreal

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.

By default, the blur radius is 5 pixels.

The radius is given in device coordinates, meaning it is unaffected by scale.

Access functions:

qreal blurRadius() const
void setBlurRadius(qreal blurRadius)

Notifier signal:

void blurRadiusChanged(qreal radius)

Member Function Documentation

QGraphicsBlurEffect::QGraphicsBlurEffect(QObject * parent = 0)

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

QGraphicsBlurEffect::~QGraphicsBlurEffect()

Destroys the effect.

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

Reimplemented from QGraphicsEffect::boundingRectFor().

void QGraphicsBlurEffect::draw(QPainter * painter) [virtual protected]

Reimplemented from QGraphicsEffect::draw().

Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt 5.0-snapshot
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web