QGraphicsColorizeEffect Class
The QGraphicsColorizeEffect class provides a colorize effect. 更多...
头文件: | #include <QGraphicsColorizeEffect> |
qmake: | QT += widgets |
开始支持版本: | Qt 4.6 |
基类: | QGraphicsEffect |
属性
- 1 个属性继承自 QGraphicsEffect
- 1 个属性继承自 QObject
公有函数
QGraphicsColorizeEffect(QObject *parent = Q_NULLPTR) | |
~QGraphicsColorizeEffect() | |
QColor | color() const |
qreal | strength() const |
- 3 个公有函数继承自 QGraphicsEffect
- 32 个公有函数继承自 QObject
公有槽函数
void | setColor(const QColor &c) |
void | setStrength(qreal strength) |
- 2 个公有槽函数继承自 QGraphicsEffect
- 1 个公有槽函数继承自 QObject
信号
void | colorChanged(const QColor &color) |
void | strengthChanged(qreal strength) |
- 1 个信号继承自 QGraphicsEffect
- 2 个信号继承自 QObject
重新实现的受保护函数
virtual void | draw(QPainter *painter) |
- 7 个受保护的函数继承自 QGraphicsEffect
- 9 个受保护的函数继承自 QObject
其他继承的成员
- 1 个公有变量继承自 QObject
- 10 个静态公有成员继承自 QObject
- 7 个受保护的函数继承自 QGraphicsEffect
- 9 个受保护的函数继承自 QObject
- 2 个受保护的变量继承自 QObject
详细描述
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)).
参见 QGraphicsDropShadowEffect, QGraphicsBlurEffect, and QGraphicsOpacityEffect.
属性
color : QColor
This property holds the color of the effect.
By default, the color is light blue (QColor(0, 0, 192)).
访问函数:
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.
访问函数:
qreal | strength() const |
void | setStrength(qreal strength) |
Notifier signal:
void | strengthChanged(qreal strength) |
成员函数
QGraphicsColorizeEffect::QGraphicsColorizeEffect(QObject *parent = Q_NULLPTR)
Constructs a new QGraphicsColorizeEffect instance. The parent parameter is passed to QGraphicsEffect's constructor.
QGraphicsColorizeEffect::~QGraphicsColorizeEffect()
Destroys the effect.
[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.
[virtual protected]
void QGraphicsColorizeEffect::draw(QPainter *painter)
重新实现 QGraphicsEffect::draw().
[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.