QGraphicsColorizeEffect Class
The QGraphicsColorizeEffect class provides a colorize effect. More...
Header: | #include <QGraphicsColorizeEffect> |
qmake: | QT += widgets |
Since: | Qt 4.6 |
Inherits: | QGraphicsEffect |
This class was introduced in Qt 4.6.
Properties
- 1 property inherited from QGraphicsEffect
- 1 property inherited from QObject
Public Functions
QGraphicsColorizeEffect(QObject *parent = nullptr) | |
virtual | ~QGraphicsColorizeEffect() |
QColor | color() const |
qreal | strength() const |
- 3 public functions inherited from QGraphicsEffect
- 30 public functions inherited from QObject
Public Slots
void | setColor(const QColor &c) |
void | setStrength(qreal strength) |
- 2 public slots inherited from QGraphicsEffect
- 1 public slot inherited from QObject
Signals
void | colorChanged(const QColor &color) |
void | strengthChanged(qreal strength) |
- 1 signal inherited from QGraphicsEffect
- 2 signals inherited from QObject
Reimplemented Protected Functions
virtual void | draw(QPainter *painter) override |
- 7 protected functions inherited from QGraphicsEffect
- 9 protected functions inherited from QObject
Related Non-Members
typedef | QObjectList |
QList<T> | qFindChildren(const QObject *obj, const QRegExp ®Exp) |
T | qobject_cast(QObject *object) |
T | qobject_cast(const QObject *object) |
Macros
QT_NO_NARROWING_CONVERSIONS_IN_CONNECT | |
Q_CLASSINFO(Name, Value) | |
Q_DISABLE_COPY(Class) | |
Q_DISABLE_COPY_MOVE(Class) | |
Q_DISABLE_MOVE(Class) | |
Q_EMIT | |
Q_ENUM(...) | |
Q_ENUM_NS(...) | |
Q_FLAG(...) | |
Q_FLAG_NS(...) | |
Q_GADGET | |
Q_INTERFACES(...) | |
Q_INVOKABLE | |
Q_NAMESPACE | |
Q_OBJECT | |
Q_PROPERTY(...) | |
Q_REVISION | |
Q_SET_OBJECT_NAME(Object) | |
Q_SIGNAL | |
Q_SIGNALS | |
Q_SLOT | |
Q_SLOTS |
Additional Inherited Members
- 9 static public members inherited from QObject
- 7 protected functions inherited from QGraphicsEffect
- 9 protected functions inherited from QObject
Detailed Description
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 = nullptr)
Constructs a new QGraphicsColorizeEffect instance. The parent parameter is passed to QGraphicsEffect's constructor.
[signal]
void QGraphicsColorizeEffect::colorChanged(const QColor &color)
This signal is emitted whenever the effect's color changes. The color parameter holds the effect's new color.
Note: Notifier signal for property color.
[signal]
void QGraphicsColorizeEffect::strengthChanged(qreal strength)
This signal is emitted whenever setStrength() changes the colorize strength property. strength contains the new strength value of the colorize effect.
Note: Notifier signal for property strength.
[virtual]
QGraphicsColorizeEffect::~QGraphicsColorizeEffect()
Destroys the effect.
[override virtual protected]
void QGraphicsColorizeEffect::draw(QPainter *painter)
Reimplements: QGraphicsEffect::draw(QPainter *painter).