CopperSpice API  1.7.2
QGraphicsDropShadowEffect Class Reference

The QGraphicsDropShadowEffect class provides a drop shadow effect. More...

Inheritance diagram for QGraphicsDropShadowEffect:
QGraphicsEffect QObject

Public Signals

void blurRadiusChanged (qreal blurRadius)
 
void colorChanged (const QColor &color)
 
void offsetChanged (const QPointF &offset)
 
- 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 setBlurRadius (qreal blurRadius)
 
void setColor (const QColor &color)
 
void setOffset (const QPointF &ofs)
 
void setOffset (qreal d)
 
void setOffset (qreal dx, qreal dy)
 
void setXOffset (qreal dx)
 
void setYOffset (qreal dy)
 
- Public Slots inherited from QGraphicsEffect
void setEnabled (bool enable)
 
void update ()
 
- Public Slots inherited from QObject
void deleteLater ()
 

Public Methods

 QGraphicsDropShadowEffect (QObject *parent=nullptr)
 
 ~QGraphicsDropShadowEffect ()
 
qreal blurRadius () const
 
QRectF boundingRectFor (const QRectF &rect) const override
 
QColor color () const
 
QPointF offset () const
 
qreal xOffset () const
 
qreal yOffset () const
 
- Public Methods inherited from QGraphicsEffect
 QGraphicsEffect (QObject *parent=nullptr)
 
virtual ~QGraphicsEffect ()
 
QRectF boundingRect () 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

 blurRadius
 
 color
 
 offset
 
 xOffset
 
 yOffset
 
- 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 QGraphicsDropShadowEffect class provides a drop shadow effect.

A drop shadow effect renders the source with a drop shadow. The color of the drop shadow can be modified using the setColor() function. The drop shadow offset can be modified using the setOffset() function and the blur radius of the drop shadow can be changed with the setBlurRadius() function.

By default, the drop shadow is a semi-transparent dark gray (QColor(63, 63, 63, 180)) shadow, blurred with a radius of 1 at an offset of 8 pixels towards the lower right. The drop shadow offset is specified in device coordinates.

See also
QGraphicsBlurEffect, QGraphicsColorizeEffect, QGraphicsOpacityEffect

Constructor & Destructor Documentation

QGraphicsDropShadowEffect::QGraphicsDropShadowEffect ( QObject parent = nullptr)

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

QGraphicsDropShadowEffect::~QGraphicsDropShadowEffect ( )

Destroys the effect.

Method Documentation

qreal QGraphicsDropShadowEffect::blurRadius ( ) const

Returns the blur radius.

void QGraphicsDropShadowEffect::blurRadiusChanged ( qreal  blurRadius)
signal

This signal is emitted whenever the effect's blur radius changes. The blurRadius parameter holds the effect's new blur radius.

QRectF QGraphicsDropShadowEffect::boundingRectFor ( const QRectF rect) const
overridevirtual

Reimplemented from QGraphicsEffect::boundingRectFor().

Reimplemented from QGraphicsEffect.

QColor QGraphicsDropShadowEffect::color ( ) const

Returns the color.

void QGraphicsDropShadowEffect::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 QGraphicsDropShadowEffect::draw ( QPainter painter)
overrideprotectedvirtual

Reimplemented from QGraphicsEffect::draw().

Implements QGraphicsEffect.

QPointF QGraphicsDropShadowEffect::offset ( ) const

Returns the shadow offset.

void QGraphicsDropShadowEffect::offsetChanged ( const QPointF offset)
signal

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

void QGraphicsDropShadowEffect::setBlurRadius ( qreal  blurRadius)
slot

Sets the blur radius.

void QGraphicsDropShadowEffect::setColor ( const QColor color)
slot

Sets the color.

void QGraphicsDropShadowEffect::setOffset ( const QPointF ofs)
slot

Sets the shadow offset.

void QGraphicsDropShadowEffect::setOffset ( qreal  d)
slot

Sets the shadow offset.

void QGraphicsDropShadowEffect::setOffset ( qreal  dx,
qreal  dy 
)
slot

Sets the shadow offset.

void QGraphicsDropShadowEffect::setXOffset ( qreal  dx)
inlineslot

Sets the horizontal shadow offset.

void QGraphicsDropShadowEffect::setYOffset ( qreal  dy)
inlineslot

Sets the vertical shadow offset.

qreal QGraphicsDropShadowEffect::xOffset ( ) const
inline

Returns the horizontal shadow offset.

qreal QGraphicsDropShadowEffect::yOffset ( ) const
inline

Returns the vertical shadow offset.

Property Documentation

QGraphicsDropShadowEffect::blurRadius

This property holds the blur radius in pixels of the drop shadow.

Using a smaller radius results in a sharper shadow, whereas using a bigger radius results in a more blurred shadow.

By default, the blur radius is 1 pixel.

See also
color(), offset()
PropertiesClass Methods
read blurRadius
write setBlurRadius
notify blurRadiusChanged
QGraphicsDropShadowEffect::color

This property holds the color of the drop shadow. By default the drop color is a semi-transparent dark gray (QColor(63, 63, 63, 180)).

See also
offset(), blurRadius()
PropertiesClass Methods
read color
write setColor
notify colorChanged
QGraphicsDropShadowEffect::offset

This property holds the shadow offset in pixels. By default the offset is 8 pixels towards the lower right.

The offset is given in device coordinates, which means it is unaffected by scale.

See also
xOffset(), yOffset(), blurRadius(), color()
PropertiesClass Methods
read offset
write cs_setOffset
notify offsetChanged
QGraphicsDropShadowEffect::xOffset

This property holds the horizontal shadow offset in pixels.

By default, the horizontal shadow offset is 8 pixels.

See also
yOffset(), offset()
PropertiesClass Methods
read xOffset
write setXOffset
notify offsetChanged
QGraphicsDropShadowEffect::yOffset

This property holds the vertical shadow offset in pixels.

By default, the vertical shadow offset is 8 pixels.

See also
xOffset(), offset()
PropertiesClass Methods
read yOffset
write setYOffset
notify offsetChanged