Movatterモバイル変換


[0]ホーム

URL:


We bake cookies in your browser for a better experience. Using this site means that you consent.Read More

Menu

Qt Documentation

QGraphicsDropShadowEffect Class

TheQGraphicsDropShadowEffect class provides a drop shadow effect.More...

Header:#include <QGraphicsDropShadowEffect>
Since: Qt 4.6
Inherits:QGraphicsEffect

Properties

Public Functions

QGraphicsDropShadowEffect(QObject * parent = 0)
~QGraphicsDropShadowEffect()
qrealblurRadius() const
QColorcolor() const
QPointFoffset() const
qrealxOffset() const
qrealyOffset() const

Reimplemented Public Functions

virtual QRectFboundingRectFor(const QRectF & rect) const

Public Slots

voidsetBlurRadius(qreal blurRadius)
voidsetColor(const QColor & color)
voidsetOffset(const QPointF & ofs)
voidsetOffset(qreal dx, qreal dy)
voidsetOffset(qreal d)
voidsetXOffset(qreal dx)
voidsetYOffset(qreal dy)

Signals

voidblurRadiusChanged(qreal blurRadius)
voidcolorChanged(const QColor & color)
voidoffsetChanged(const QPointF & offset)

Reimplemented Protected Functions

virtual voiddraw(QPainter * painter)

Additional Inherited Members

Detailed Description

TheQGraphicsDropShadowEffect 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 thesetColor() function. The drop shadow offset can be modified using thesetOffset() function and the blur radius of the drop shadow can be changed with thesetBlurRadius() 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 alsoQGraphicsBlurEffect,QGraphicsColorizeEffect, andQGraphicsOpacityEffect.

Property Documentation

blurRadius :qreal

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.

Access functions:

qrealblurRadius() const
voidsetBlurRadius(qreal blurRadius)

Notifier signal:

voidblurRadiusChanged(qreal blurRadius)

See alsocolor(),offset(), and ..

color :QColor

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)).

Access functions:

QColorcolor() const
voidsetColor(const QColor & color)

Notifier signal:

voidcolorChanged(const QColor & color)

See alsooffset() andblurRadius().

offset :QPointF

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.

Access functions:

QPointFoffset() const
voidsetOffset(const QPointF & ofs)
voidsetOffset(qreal dx, qreal dy)
voidsetOffset(qreal d)

Notifier signal:

voidoffsetChanged(const QPointF & offset)

See alsoxOffset(),yOffset(),blurRadius(), andcolor().

xOffset :qreal

This property holds the horizontal shadow offset in pixels.

By default, the horizontal shadow offset is 8 pixels.

Access functions:

qrealxOffset() const
voidsetXOffset(qreal dx)

Notifier signal:

voidoffsetChanged(const QPointF & offset)

See alsoyOffset() andoffset().

yOffset :qreal

This property holds the vertical shadow offset in pixels.

By default, the vertical shadow offset is 8 pixels.

Access functions:

qrealyOffset() const
voidsetYOffset(qreal dy)

Notifier signal:

voidoffsetChanged(const QPointF & offset)

See alsoxOffset() andoffset().

Member Function Documentation

QGraphicsDropShadowEffect::QGraphicsDropShadowEffect(QObject * parent = 0)

Constructs a newQGraphicsDropShadowEffect instance. Theparent parameter is passed toQGraphicsEffect's constructor.

QGraphicsDropShadowEffect::~QGraphicsDropShadowEffect()

Destroys the effect.

[virtual]QRectF QGraphicsDropShadowEffect::boundingRectFor(constQRectF & rect) const

Reimplemented fromQGraphicsEffect::boundingRectFor().

[virtual protected]void QGraphicsDropShadowEffect::draw(QPainter * painter)

Reimplemented fromQGraphicsEffect::draw().

© 2016 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 theGNU 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.


[8]ページ先頭

©2009-2025 Movatter.jp