cf::ui::widget::material::base::PainterLayer¶
Painter layer for Material Design widget rendering. More...
#include <painter_layer.h>
Inherits from QObject
Public Functions¶
| Name | |
|---|---|
| PainterLayer(QObject * parent) Constructor with parent. |
|
| void | setColor(constcf::ui::base::CFColor & color) Sets the layer color. |
| void | setOpacity(float opacity) Sets the layer opacity. |
| void | paint(QPainter * painter, constQPainterPath & clipPath) Paints the layer. |
Protected Attributes¶
| Name | |
|---|---|
| cf::ui::base::CFColor | cached_color_ |
| float | opacity_ |
Detailed Description¶
Painter layer for Material Design widget rendering.
Since: N/A
Provides a layer abstraction for painting operations with color and opacity control. Used for layered rendering in Material Design widgets.
Public Functions Documentation¶
function PainterLayer¶
Constructor with parent.
Parameters:
- parent QObject parent.
- parent QObject parent for memory management.
Exceptions:
- None
Since: N/A
Note: None
Warning: None
Constructor - initializes default values.
function setColor¶
Sets the layer color.
Parameters:
- color Color to use for this layer.
Exceptions:
- None
Since: N/A
Note: None
Warning: None
function setOpacity¶
Sets the layer opacity.
Parameters:
- opacity Opacity value (0.0 = transparent, 1.0 = opaque).
Exceptions:
- None
Since: N/A
Note: None
Warning: None
function paint¶
Paints the layer.
Parameters:
- painter QPainter to render with.
- clipPath Clipping path for the layer.
- painter QPainter instance (must be active).
- clipPath Path to clip the drawing area.
Exceptions:
- None
Since: N/A
Note: Call in paintEvent.
Warning: None
Paints the layer with current color and opacity.
This method fills the clip path with the cached color, applying the current opacity value. Used in paintEvent of Material widgets.
Protected Attributes Documentation¶
variable cached_color_¶
variable opacity_¶
Updated on 2026-03-09 at 10:14:01 +0000