CopperSpice API  1.7.2
QGraphicsColorizeEffect Class Reference

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

Inheritance diagram for QGraphicsColorizeEffect:
QGraphicsEffect QObject

Public Signals

void colorChanged (const QColor &color)
 
void strengthChanged (qreal strength)
 
- Public Signals inherited from QGraphicsEffect
void enabledChanged (bool enabled)
 
- Public Signals inherited from QObject
void destroyed (QObject *obj=nullptr)
 
void objectNameChanged (const QString &objectName)
 

Public Slots

void setColor (const QColor &c)
 
void setStrength (qreal strength)
 
- Public Slots inherited from QGraphicsEffect
void setEnabled (bool enable)
 
void update ()
 
- Public Slots inherited from QObject
void deleteLater ()
 

Public Methods

 QGraphicsColorizeEffect (QObject *parent=nullptr)
 
 ~QGraphicsColorizeEffect ()
 
QColor color () const
 
qreal strength () const
 
- Public Methods inherited from QGraphicsEffect
 QGraphicsEffect (QObject *parent=nullptr)
 
virtual ~QGraphicsEffect ()
 
QRectF boundingRect () const
 
virtual QRectF boundingRectFor (const QRectF &rectF) const
 
bool isEnabled () const
 
- Public Methods inherited from QObject
 QObject (QObject *parent=nullptr)
 
 ~QObject ()
 
bool blockSignals (bool block)
 
const QList< QObject * > & children () const
 
bool connect (const QObject *sender, const QString &signalMethod, const QString &location, const QString &slotMethod, Qt::ConnectionType type=Qt::AutoConnection)
 
bool connect (const QObject *sender, const QString &signalMethod, const QString &slotMethod, Qt::ConnectionType type=Qt::AutoConnection)
 
bool disconnect (const QObject *receiver, const QString &slotMethod=QString ()) const
 
bool disconnect (const QString &signalMethod, const QString &location, const QObject *receiver=nullptr, const QString &slotMethod=QString ()) const
 
bool disconnect (const QString &signalMethod=QString (), const QObject *receiver=nullptr, const QString &slotMethod=QString ()) const
 
void dumpObjectInfo ()
 
void dumpObjectTree ()
 
QList< QStringdynamicPropertyNames () const
 
virtual bool event (QEvent *event)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
template<typename T >
findChild (const QString &childName=QString ()) const
 
template<class T >
QList< T > findChildren (const QRegularExpression &regExp, Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 
template<class T >
QList< T > findChildren (const QString &objName=QString (), Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 
bool inherits (const QString &className) const
 
void installEventFilter (QObject *filterObj)
 
bool isWidgetType () const
 
bool isWindowType () const
 
void killTimer (int id)
 
const QMetaObjectmetaObject () const
 
void moveToThread (QThread *targetThread)
 
QString objectName () const
 
QObject * parent () const
 
template<class T = QVariant>
property (const QString &name) const
 
void removeEventFilter (QObject *obj)
 
void setObjectName (const QString &name)
 
void setParent (QObject *parent)
 
bool setProperty (const QString &name, const QVariant &value)
 
bool signalsBlocked () const
 
int startTimer (int interval, Qt::TimerType timerType=Qt::CoarseTimer)
 
QThreadthread () const
 

Protected Methods

void draw (QPainter *painter) override
 
- Protected Methods inherited from QGraphicsEffect
void drawSource (QPainter *painter)
 
QRectF sourceBoundingRect (Qt::CoordinateSystem system=Qt::LogicalCoordinates) const
 
virtual void sourceChanged (ChangeFlags flags)
 
bool sourceIsPixmap () const
 
QPixmap sourcePixmap (Qt::CoordinateSystem system=Qt::LogicalCoordinates, QPoint *offset=nullptr, PixmapPadMode mode=PadToEffectiveBoundingRect) const
 
void updateBoundingRect ()
 
- Protected Methods inherited from QObject
virtual void childEvent (QChildEvent *event)
 
virtual void connectNotify (const QMetaMethod &signalMethod) const
 
virtual void customEvent (QEvent *event)
 
virtual void disconnectNotify (const QMetaMethod &signalMethod) const
 
bool isSignalConnected (const QMetaMethod &signalMethod) const
 
int receivers (const QString &signal) const
 
QObject * sender () const
 
int senderSignalIndex () const
 
virtual void timerEvent (QTimerEvent *event)
 

Properties

 color
 
 strength
 
- Properties inherited from QGraphicsEffect
 enabled
 
- Properties inherited from QObject
 objectName
 

Additional Inherited Members

- Public Types inherited from QGraphicsEffect
enum  PixmapPadMode
 
- Static Public Methods inherited from QObject
static bool connect (const QObject *sender, const QMetaMethod &signalMethod, const QObject *receiver, const QMetaMethod &slotMethod, Qt::ConnectionType type=Qt::AutoConnection)
 
static bool connect (const QObject *sender, const QString &signalMethod, const QObject *receiver, const QString &slotMethod, Qt::ConnectionType type=Qt::AutoConnection, const QString &location=QString ())
 
static bool connect (const QObject *sender, const QString &signalMethod, const QString &location, const QObject *receiver, const QString &slotMethod, Qt::ConnectionType type=Qt::AutoConnection)
 
template<class Sender , class SignalClass , class... SignalArgs, class Receiver , class SlotClass , class... SlotArgs, class SlotReturn >
static bool connect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, SlotReturn (SlotClass::*slotMethod)(SlotArgs...), Qt::ConnectionType type=Qt::AutoConnection)
 
template<class Sender , class SignalClass , class... SignalArgs, class Receiver , class T >
static bool connect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, T slotLambda, Qt::ConnectionType type=Qt::AutoConnection)
 
static bool disconnect (const QObject *sender, const QMetaMethod &signalMethod, const QObject *receiver, const QMetaMethod &slotMethod)
 
static bool disconnect (const QObject *sender, const QString &signalMethod, const QObject *receiver, const QString &slotMethod)
 
static bool disconnect (const QObject *sender, const QString &signalMethod, const QString &location, const QObject *receiver, const QString &slotMethod)
 
template<class Sender , class SignalClass , class... SignalArgs, class Receiver , class SlotClass , class... SlotArgs, class SlotReturn >
static bool disconnect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, SlotReturn (SlotClass::*slotMethod)(SlotArgs...))
 
template<class Sender , class SignalClass , class... SignalArgs, class Receiver >
static bool disconnect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, std::nullptr_t slotMethod=nullptr)
 
template<class Sender , class SignalClass , class... SignalArgs, class Receiver , class T >
static bool disconnect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, T slotMethod)
 
static QMetaObjectstaticMetaObject ()
 
static QString tr (const char *text, const char *comment=nullptr, std::optional< int > numArg=std::optional< int >())
 

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, QGraphicsOpacityEffect

Constructor & Destructor Documentation

QGraphicsColorizeEffect::QGraphicsColorizeEffect ( QObject parent = nullptr)

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

QGraphicsColorizeEffect::~QGraphicsColorizeEffect ( )

Destroys the effect.

Method Documentation

QColor QGraphicsColorizeEffect::color ( ) const

Returns the value of the color property.

void QGraphicsColorizeEffect::colorChanged ( const QColor color)
signal

This signal is emitted whenever the effect's color changes. The color parameter holds the effect's new color.

void QGraphicsColorizeEffect::draw ( QPainter painter)
overrideprotectedvirtual

Reimplemented from QGraphicsEffect::draw().

Implements QGraphicsEffect.

void QGraphicsColorizeEffect::setColor ( const QColor c)
slot

Sets the value of the color property to c.

void QGraphicsColorizeEffect::setStrength ( qreal  strength)
slot

Sets the value of the strength property to strength.

qreal QGraphicsColorizeEffect::strength ( ) const

Returns the value of the strength property.

void QGraphicsColorizeEffect::strengthChanged ( qreal  strength)
signal

This signal is emitted whenever setStrength() changes the colorize strength property. strength contains the new strength value of the colorize effect.

Property Documentation

QGraphicsColorizeEffect::color

This property holds the color of the effect.

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

PropertiesClass Methods
read color
write setColor
notify colorChanged
QGraphicsColorizeEffect::strength

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.

PropertiesClass Methods
read strength
write setStrength
notify strengthChanged