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


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. | |
| Q_SIGNAL void | elevationChanged (qreal elevation) |
| const CornersGroup & | corners () const |
| Returns the corners group. | |
| void | setCorners (const CornersGroup &) |
| Sets the corners group. | |
| Q_SIGNAL void | cornersChanged (CornersGroup) |
| qreal | radius () const |
| Returns the current radius. | |
| void | setRadius (qreal newRadius) |
| Sets the radius for all corners. | |
| Q_SIGNAL void | radiusChanged (qreal radius) |
| QColor | color () const |
| Returns the current shadow color. | |
| void | setColor (const QColor &newColor) |
| Sets the shadow color. | |
| Q_SIGNAL void | colorChanged (QColor 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 |
| QColor | color |
| CornersGroup | corners |
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.
| QColor Elevation::color | ( | ) | const |
Returns the current shadow color.
| Q_SIGNAL void Fluid::Elevation::colorChanged | ( | QColor | color | ) |
|
override |
Called when the component is complete.
| const CornersGroup & Elevation::corners | ( | ) | const |
Returns the corners group.
| Q_SIGNAL void Fluid::Elevation::cornersChanged | ( | CornersGroup | ) |
| qreal Elevation::elevation | ( | ) | const |
Returns the current elevation level.
| Q_SIGNAL void Fluid::Elevation::elevationChanged | ( | qreal | elevation | ) |
|
overrideprotected |
Handles item changes.
| change | The type of change. |
| value | Additional data related to the change. |
| qreal Elevation::radius | ( | ) | const |
Returns the current radius.
| Q_SIGNAL void Fluid::Elevation::radiusChanged | ( | qreal | radius | ) |
| void Elevation::setColor | ( | const QColor & | newColor | ) |
Sets the shadow color.
| newColor | New QColor for the shadow. |
| void Elevation::setCorners | ( | const CornersGroup & | c | ) |
Sets the corners group.
| c | New CornersGroup representing the corner radii. |
| void Elevation::setElevation | ( | qreal | l | ) |
Sets the elevation level.
| l | New elevation level. |
| void Elevation::setRadius | ( | qreal | newRadius | ) |
Sets the radius for all corners.
| newRadius | New radius value. |
|
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 |