The QGraphicsColorizeEffect class provides a colorize effect. More...
Header: | #include <QGraphicsColorizeEffect> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS Widgets) target_link_libraries(mytarget PRIVATE Qt6::Widgets) |
qmake: | QT += widgets |
Inherits: | QGraphicsEffect |
QGraphicsColorizeEffect(QObject *parent = nullptr) | |
virtual | ~QGraphicsColorizeEffect() |
QColor | color() const |
qreal | strength() const |
void | setColor(const QColor &c) |
void | setStrength(qreal strength) |
void | colorChanged(const QColor &color) |
void | strengthChanged(qreal strength) |
virtual void | draw(QPainter *painter) override |
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.
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) |
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) |
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).
As part of the free Business evaluation, we offer a free welcome call for companies, to talk about your requirements, and how the Felgo SDK & Services can help you. Just sign up and schedule your call.
Sign up now to start your free Business evaluation: