QGraphicsColorizeEffect Class

The QGraphicsColorizeEffect class provides a colorize effect. More...

Header: #include <QGraphicsColorizeEffect>
Since: Qt 4.6
Inherits: QGraphicsEffect

Properties

Public Functions

QGraphicsColorizeEffect(QObject * parent = 0)
~QGraphicsColorizeEffect()
QColor color() const
qreal strength() const

Public Slots

void setColor(const QColor & c)
void setStrength(qreal strength)

Signals

void colorChanged(const QColor & color)
void strengthChanged(qreal strength)

Reimplemented Protected Functions

virtual void draw(QPainter * painter)

Additional Inherited Members

  • 7 static public members inherited from QObject
  • 7 protected functions inherited from QGraphicsEffect
  • 8 protected functions inherited from QObject

Detailed Description

The QGraphicsColorizeEffect class provides a colorize effect.

A colorize effect renders the source with a tint of its color(). The color can be modified using the setColor() function.

By default, the color is light blue (QColor(0, 0, 192)).

See also QGraphicsDropShadowEffect, QGraphicsBlurEffect, and QGraphicsOpacityEffect.

Property Documentation

color : QColor

This property holds the color of the effect.

By default, the color is light blue (QColor(0, 0, 192)).

Access functions:

QColor color() const
void setColor(const QColor & c)

Notifier signal:

void colorChanged(const QColor & color)

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

Access functions:

qreal strength() const
void setStrength(qreal strength)

Notifier signal:

void strengthChanged(qreal strength)

Member Function Documentation

QGraphicsColorizeEffect::QGraphicsColorizeEffect(QObject * parent = 0)

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

QGraphicsColorizeEffect::~QGraphicsColorizeEffect()

Destroys the effect.

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

Reimplemented from QGraphicsEffect::draw().

© 2016 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.