![]() |
Home · All Classes · All Functions · Overviews |
The QGraphicsGrayscaleEffect class provides a grayscale effect. More...
#include <QGraphicsGrayscaleEffect>
Inherits QGraphicsEffect.
This class was introduced in Qt 4.6.
QGraphicsGrayscaleEffect ( QObject * parent = 0 ) | |
~QGraphicsGrayscaleEffect () | |
qreal | strength () const |
void | setStrength ( qreal strength ) |
void | strengthChanged ( qreal strength ) |
virtual void | draw ( QPainter * painter, QGraphicsEffectSource * source ) |
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.
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 ) |
Constructs a new QGraphicsGrayscale instance. The parent parameter is passed to QGraphicsEffect's constructor.
Destroys the effect.
Reimplemented from QGraphicsEffect::draw().
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 |