QGraphicsColorizeEffect Class
La classe QGraphicsColorizeEffect fournit un effet de colorisation. Plus d'informations...
| En-tête : | #include <QGraphicsColorizeEffect> |
| CMake : | find_package(Qt6 REQUIRED COMPONENTS Widgets)target_link_libraries(mytarget PRIVATE Qt6::Widgets) |
| qmake : | QT += widgets |
| Héritages : | QGraphicsEffect |
Propriétés
Fonctions publiques
| QGraphicsColorizeEffect(QObject *parent = nullptr) | |
| virtual | ~QGraphicsColorizeEffect() |
| QColor | color() const |
| qreal | strength() const |
Emplacements publics
| void | setColor(const QColor &c) |
| void | setStrength(qreal strength) |
Signaux
| void | colorChanged(const QColor &color) |
| void | strengthChanged(qreal strength) |
Fonctions protégées réimplémentées
| virtual void | draw(QPainter *painter) override |
Description détaillée
Un effet de colorisation rend la source avec une teinte de son color(). La couleur peut être modifiée à l'aide de la fonction setColor().
Par défaut, la couleur est bleu clair (QColor(0, 0, 192)).

Voir également QGraphicsDropShadowEffect, QGraphicsBlurEffect, et QGraphicsOpacityEffect.
Documentation sur les propriétés
color : QColor
Cette propriété définit la couleur de l'effet.
Par défaut, la couleur est bleu clair (QColor(0, 0, 192)).
Fonctions d'accès :
| QColor | color() const |
| void | setColor(const QColor &c) |
Signal du notificateur :
| void | colorChanged(const QColor &color) |
strength : qreal
Cette propriété définit l'intensité de l'effet.
Par défaut, l'intensité est de 1,0. Une intensité de 0,0 signifie qu'il n'y a pas d'effet, tandis qu'une intensité de 1,0 signifie une colorisation complète.
Fonctions d'accès :
| qreal | strength() const |
| void | setStrength(qreal strength) |
Signal Notificateur :
| void | strengthChanged(qreal strength) |
Member Function Documentation
QGraphicsColorizeEffect::QGraphicsColorizeEffect(QObject *parent = nullptr)
Construit une nouvelle instance de QGraphicsColorizeEffect. Le paramètre parent est transmis au constructeur de QGraphicsEffect.
[virtual noexcept] QGraphicsColorizeEffect::~QGraphicsColorizeEffect()
Détruit l'effet.
[signal] void QGraphicsColorizeEffect::colorChanged(const QColor &color)
Ce signal est émis lorsque la couleur de l'effet change. Le paramètre color contient la nouvelle couleur de l'effet.
Note : Signal de notification pour la propriété color.
[override virtual protected] void QGraphicsColorizeEffect::draw(QPainter *painter)
Réimplémente : QGraphicsEffect::draw(QPainter *painter).
[signal] void QGraphicsColorizeEffect::strengthChanged(qreal strength)
Ce signal est émis chaque fois que setStrength() modifie la propriété force de la colorisation. strength contient la nouvelle valeur de la force de l'effet de colorisation.
Note : Signal de notification pour la propriété strength.
© 2026 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.