Qt 4.6: QGraphicsPixelizeEffect Class Reference

|  | Home · All Classes · 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.

- List of all members, including inherited members

## Properties

- pixelSize : int

- 1 property inherited from QGraphicsEffect
- 1 property inherited from QObject

## Public Functions

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

- 4 public functions inherited from QGraphicsEffect
- 29 public functions inherited from QObject

## Public Slots

void | setPixelSize ( int pixelSize )

- 2 public slots inherited from QGraphicsEffect
- 1 public slot inherited from QObject

## Signals

void | pixelSizeChanged ( int size )

- 1 signal inherited from QGraphicsEffect
- 1 signal inherited from QObject

## Reimplemented Protected Functions

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

- 3 protected functions inherited from QGraphicsEffect
- 7 protected functions inherited from QObject

### Additional Inherited Members

- 5 static public members inherited from QObject
- 3 protected functions inherited from QGraphicsEffect
- 7 protected functions inherited from QObject

## 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.