|
Fluid
|
A QQuickItem that renders elevation-based shadow effects. More...
#include <elevation.h>


Signals | |
| void | elevationChanged (qreal elevation) |
| void | radiusChanged (qreal radius) |
| void | topLeftRadiusChanged (qreal topLeftRadius) |
| void | topRightRadiusChanged (qreal topRightRadius) |
| void | bottomLeftRadiusChanged (qreal bottomLeftRadius) |
| void | bottomRightRadiusChanged (qreal bottomRightRadius) |
| void | colorChanged (QColor color) |
Public Member Functions | |
| Elevation (QQuickItem *parent=nullptr) | |
| Constructs an Elevation item with an optional parent. | |
| ~Elevation () override | |
| Destructor for the Elevation item. | |
| qreal | elevation () const |
| Returns the current elevation level. | |
| void | setElevation (qreal elevation) |
| Sets the elevation level. | |
| qreal | radius () const |
| Returns the current radius. | |
| void | setRadius (qreal newRadius) |
| Sets the radius for all corners. | |
| qreal | topLeftRadius () const |
| void | setTopLeftRadius (qreal newTopLeftRadius) |
| qreal | topRightRadius () const |
| void | setTopRightRadius (qreal newTopRightRadius) |
| qreal | bottomLeftRadius () const |
| void | setBottomLeftRadius (qreal newBottomLeftRadius) |
| qreal | bottomRightRadius () const |
| void | setBottomRightRadius (qreal newBottomRightRadius) |
| QColor | color () const |
| Returns the current shadow color. | |
| void | setColor (const QColor &newColor) |
| Sets the shadow color. | |
| void | componentComplete () override |
| Called when the component is complete. | |
Protected Member Functions | |
| void | itemChange (QQuickItem::ItemChange change, const QQuickItem::ItemChangeData &value) override |
| Handles item changes. | |
| QSGNode * | updatePaintNode (QSGNode *node, QQuickItem::UpdatePaintNodeData *data) override |
| Updates the paint node for rendering. | |
Properties | |
| qreal | elevation |
| qreal | radius |
| qreal | topLeftRadius |
| qreal | topRightRadius |
| qreal | bottomLeftRadius |
| qreal | bottomRightRadius |
| QColor | color |
A QQuickItem that renders elevation-based shadow effects.
The Elevation class provides a visual shadow effect that simulates material design elevation. It renders shadows beneath the item based on the specified elevation level, corner radii, and color. The shadow is rendered using a custom scene graph node (ElevationNode) that handles the geometry and material for the shadow effect.
The class supports:
| Elevation::Elevation | ( | QQuickItem * | parentItem = nullptr | ) |
Constructs an Elevation item with an optional parent.
| parentItem | The parent QQuickItem, if any. |
|
override |
Destructor for the Elevation item.
| qreal Elevation::bottomLeftRadius | ( | ) | const |
|
signal |
| qreal Elevation::bottomRightRadius | ( | ) | const |
|
signal |
| QColor Elevation::color | ( | ) | const |
Returns the current shadow color.
|
signal |
|
override |
Called when the component is complete.
| qreal Elevation::elevation | ( | ) | const |
Returns the current elevation level.
|
signal |
|
overrideprotected |
Handles item changes.
| change | The type of change. |
| value | Additional data related to the change. |
| qreal Elevation::radius | ( | ) | const |
Returns the current radius.
If any individual corner radius has been explicitly set, returns the maximum of all four corner radii. Otherwise returns the uniform radius value.
|
signal |
| void Elevation::setBottomLeftRadius | ( | qreal | newBottomLeftRadius | ) |
| void Elevation::setBottomRightRadius | ( | qreal | newBottomRightRadius | ) |
| void Elevation::setColor | ( | const QColor & | newColor | ) |
Sets the shadow color.
| newColor | New QColor for the shadow. |
| void Elevation::setElevation | ( | qreal | l | ) |
Sets the elevation level.
| l | New elevation level. |
| void Elevation::setRadius | ( | qreal | newRadius | ) |
Sets the radius for all corners.
Clears any individually overridden corner radii, so all four corners will use this value. Individual radii set afterwards will override it.
| newRadius | New radius value. |
| void Elevation::setTopLeftRadius | ( | qreal | newTopLeftRadius | ) |
| void Elevation::setTopRightRadius | ( | qreal | newTopRightRadius | ) |
| qreal Elevation::topLeftRadius | ( | ) | const |
|
signal |
| qreal Elevation::topRightRadius | ( | ) | const |
|
signal |
|
overrideprotected |
Updates the paint node for rendering.
| node | The existing QSGNode, if any. |
| data | Additional data for updating the paint node. |
|
readwrite |
|
readwrite |
|
readwrite |
|
readwrite |
|
readwrite |
|
readwrite |
|
readwrite |