Home · All Classes · All Functions · Overviews

QGraphicsGrayscaleEffect Class Reference
[
QtGui module]

The QGraphicsGrayscaleEffect class provides a grayscale effect. More...

 #include <QGraphicsGrayscaleEffect>

Inherits QGraphicsEffect.

This class was introduced in Qt 4.6.


Properties


Public Functions

QGraphicsGrayscaleEffect ( QObject * parent = 0 )
~QGraphicsGrayscaleEffect ()
qreal strength () const

Public Slots

void setStrength ( qreal strength )

Signals

void strengthChanged ( qreal strength )

Reimplemented Protected Functions

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

Additional Inherited Members


Detailed Description

The QGraphicsGrayscaleEffect class provides a grayscale effect.

A grayscale effect renders the source in shades of gray.

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


Property Documentation

strength : qreal

This property holds the strength of the effect.

By default, the strength is 1.0. A strength 0.0 equals to no effect, while 1.0 means full grayscale.

Access functions:

qreal strength () const
void setStrength ( qreal strength )

Notifier signal:

void strengthChanged ( qreal strength )

Member Function Documentation

QGraphicsGrayscaleEffect::QGraphicsGrayscaleEffect ( QObject * parent = 0 )

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

QGraphicsGrayscaleEffect::~QGraphicsGrayscaleEffect ()

Destroys the effect.

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

Reimplemented from QGraphicsEffect::draw().

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

This signal is emitted whenever setStrength() changes the grayscale strength property. strength contains the new strength value of the grayscale effect.


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