Home · All Classes · All Functions · Overviews

QGraphicsPixelizeEffect Class Reference
[
QtGui module]

The QGraphicsPixelizeEffect class provides a pixelize effect. More...

 #include <QGraphicsPixelizeEffect>

Inherits QGraphicsEffect.

This class was introduced in Qt 4.6.


Properties


Public Functions

QGraphicsPixelizeEffect ( QObject * parent = 0 )
~QGraphicsPixelizeEffect ()
int pixelSize () const

Public Slots

void setPixelSize ( int pixelSize )

Signals

void pixelSizeChanged ( int size )

Reimplemented Protected Functions

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

Additional Inherited Members


Detailed Description

The QGraphicsPixelizeEffect class provides a pixelize effect.

A pixelize effect renders the source in lower resolution. This effect is useful for reducing details, like censorship. The resolution can be modified using the setPixelSize() function.

By default, the pixel size is 3.

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


Property Documentation

pixelSize : int

This property holds the size of a pixel in the effect.

Setting the pixel size to 2 means two pixels in the source will be used to represent one pixel. Using a bigger size results in lower resolution.

By default, the pixel size is 3.

Access functions:

int pixelSize () const
void setPixelSize ( int pixelSize )

Notifier signal:

void pixelSizeChanged ( int size )

Member Function Documentation

QGraphicsPixelizeEffect::QGraphicsPixelizeEffect ( QObject * parent = 0 )

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

QGraphicsPixelizeEffect::~QGraphicsPixelizeEffect ()

Destroys the effect.

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

Reimplemented from QGraphicsEffect::draw().

void QGraphicsPixelizeEffect::pixelSizeChanged ( int size )   [signal]

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


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