Class QAccelPlot::GradientFill¶
ClassList > QAccelPlot > GradientFill
A LineCurve effect that fills the area under the curve with a color gradient.More...
#include <GradientFill.hpp>
Inherits the following classes: QAccelPlot::LineCurveEffect
Inheritance diagram¶
flowchart TB
classQAccelPlot_1_1GradientFill["QAccelPlot::GradientFill"]
classQAccelPlot_1_1LineCurveEffect["QAccelPlot::LineCurveEffect"]
classQAccelPlot_1_1LineCurveEffect --> classQAccelPlot_1_1GradientFill
click classQAccelPlot_1_1LineCurveEffect "../classQAccelPlot_1_1LineCurveEffect/" "Open QAccelPlot::LineCurveEffect"
external_base_classQAccelPlot_1_1LineCurveEffect_1["QObject"]
external_base_classQAccelPlot_1_1LineCurveEffect_1 --> classQAccelPlot_1_1LineCurveEffect
Public Properties¶
| Type | Name |
|---|---|
| property GradientFillBaseline | baseline Where the filled area's baseline starts (axis minimum or a fixed value). |
| property qreal | baselineValue Fixed baseline data value used when baseline isGradientFillBaseline.Value . |
| property Colormap * | colormap Colormap supplying the color stops. Overrides gradient when set. |
| property Qt::Orientation | direction Axis along which the gradient color varies: Qt.Horizontal for X values,Qt.Vertical for Y values. Default:Qt.Horizontal . |
| property QObject * | gradient A Qt Gradient (or compatible) object supplying the color stops. |
| property qreal | opacity Overall opacity of the fill area in [0, 1]. Default: 0.35. |
| property qreal | valueMax Data-space value that maps to gradient position 1.0. Only used when valueMaxSource is Fixed. |
| property GradientValueSource | valueMaxSource How the gradient normalization maximum is determined; see GradientValueSource . |
| property qreal | valueMin Data-space value that maps to gradient position 0.0. Only used when valueMinSource is Fixed. |
| property GradientValueSource | valueMinSource How the gradient normalization minimum is determined; see GradientValueSource . |
Public Properties inherited from QAccelPlot::LineCurveEffect¶
See QAccelPlot::LineCurveEffect
| Type | Name |
|---|---|
| property QML_ANONYMOUSbool | enabled Whether this effect is active. Disabled effects are ignored during rendering. |
Public Signals¶
| Type | Name |
|---|---|
| signal void | baselineChanged Emitted when the baseline property changes. |
| signal void | baselineValueChanged Emitted when the baselineValue property changes. |
| signal void | colormapChanged Emitted when the colormap property changes. |
| signal void | directionChanged Emitted when the direction property changes. |
| signal void | gradientChanged Emitted when the gradient property changes. |
| signal void | opacityChanged Emitted when the opacity property changes. |
| signal void | valueMaxChanged Emitted when the valueMax property changes. |
| signal void | valueMaxSourceChanged Emitted when the valueMaxSource property changes. |
| signal void | valueMinChanged Emitted when the valueMin property changes. |
| signal void | valueMinSourceChanged Emitted when the valueMinSource property changes. |
Public Signals inherited from QAccelPlot::LineCurveEffect¶
See QAccelPlot::LineCurveEffect
| Type | Name |
|---|---|
| signal void | effectChanged Emitted when any effect property changes, requesting a curve redraw. |
| signal void | enabledChanged Emitted when the enabled property changes. |
Public Functions¶
| Type | Name |
|---|---|
| GradientFill (QObject * parent=nullptr) Constructs a GradientFill with the given__parent . |
|
| GradientFillBaseline | baseline () const Returns the baseline mode. |
| qreal | baselineValue () const Returns the fixed baseline data value. |
| Colormap * | colormap () const Returns the colormap supplying color stops, or nullptr whengradient supplies them. |
| Qt::Orientation | direction () const Returns the gradient direction. |
| QObject * | gradient () const Returns the Qt Gradient object supplying color stops. |
| qreal | opacity () const Returns the fill opacity. |
| const GradientFillPayload & | payload () const Returns a snapshot of all fill parameters, updated on the GUI thread when the effect changes. |
| virtual void | refresh () override Re-reads the gradient stops, which can change without a notification, and emitseffectChanged() if they differ from the snapshot. |
| void | setBaseline (GradientFillBaseline baseline) Sets the baseline mode to baseline . |
| void | setBaselineValue (qreal value) Sets the fixed baseline data value to value . |
| void | setColormap (Colormap * colormap) Sets the colormap to colormap . Pass nullptr to take the stops fromgradient . |
| void | setDirection (Qt::Orientation direction) Sets the gradient direction to direction . |
| void | setGradient (QObject * gradient) Sets the Qt Gradient object to gradient . |
| void | setOpacity (qreal value) Sets the fill opacity to value . |
| void | setValueMax (qreal value) Sets the maximum data value for gradient normalization to value . |
| void | setValueMaxSource (GradientValueSource source) Sets the gradient normalization maximum source to source . |
| void | setValueMin (qreal value) Sets the minimum data value for gradient normalization to value . |
| void | setValueMinSource (GradientValueSource source) Sets the gradient normalization minimum source to source . |
| qreal | valueMax () const Returns the maximum data value for gradient normalization. |
| GradientValueSource | valueMaxSource () const Returns how the gradient normalization maximum is determined. |
| qreal | valueMin () const Returns the minimum data value for gradient normalization. |
| GradientValueSource | valueMinSource () const Returns how the gradient normalization minimum is determined. |
Public Functions inherited from QAccelPlot::LineCurveEffect¶
See QAccelPlot::LineCurveEffect
| Type | Name |
|---|---|
| LineCurveEffect (QObject * parent=nullptr) Constructs an LineCurveEffect with the given__parent . |
|
| bool | enabled () const Returns true if the effect is active. |
| virtual void | refresh () Re-reads inputs that can change without a notification and emits effectChanged() if they did. |
| void | setEnabled (bool enabled) Sets the effect's enabled state to enabled . |
Detailed Description¶
Attach to LineCurve::effects to render a shaded fill between the curve and a configurable baseline. The color stops come from colormap when set, otherwise from a Qt Gradient assigned to gradient. direction sets the axis the colors vary along.
See also: GradientStroke, Colormap, LineCurveEffect, LineCurve
Public Properties Documentation¶
property baseline¶
Where the filled area's baseline starts (axis minimum or a fixed value).
property baselineValue¶
Fixed baseline data value used when baseline isGradientFillBaseline.Value .
property colormap¶
Colormap supplying the color stops. Overridesgradient when set.
Only the ramp is used. Colormap::min, Colormap::max, and Colormap::logScale are ignored; valueMin and valueMax place the ramp instead.
property direction¶
Axis along which the gradient color varies:Qt.Horizontal for X values,Qt.Vertical for Y values. Default:Qt.Horizontal .
property gradient¶
A Qt Gradient (or compatible) object supplying the color stops.
property opacity¶
Overall opacity of the fill area in [0, 1]. Default: 0.35.
Applies to the fill only. The curve's opacity and the opacity of its parent items also apply, so the rendered fill alpha is the product of all of them.
property valueMax¶
Data-space value that maps to gradient position 1.0. Only used when valueMaxSource is Fixed.
property valueMaxSource¶
How the gradient normalization maximum is determined; see GradientValueSource .
property valueMin¶
Data-space value that maps to gradient position 0.0. Only used when valueMinSource is Fixed.
property valueMinSource¶
How the gradient normalization minimum is determined; see GradientValueSource .
Public Signals Documentation¶
signal baselineChanged¶
Emitted when the baseline property changes.
signal baselineValueChanged¶
Emitted when the baselineValue property changes.
signal colormapChanged¶
Emitted when the colormap property changes.
signal directionChanged¶
Emitted when the direction property changes.
signal gradientChanged¶
Emitted when the gradient property changes.
signal opacityChanged¶
Emitted when the opacity property changes.
signal valueMaxChanged¶
Emitted when the valueMax property changes.
signal valueMaxSourceChanged¶
Emitted when the valueMaxSource property changes.
signal valueMinChanged¶
Emitted when the valueMin property changes.
signal valueMinSourceChanged¶
Emitted when the valueMinSource property changes.
Public Functions Documentation¶
function GradientFill¶
Constructs a GradientFill with the given__parent .
function baseline¶
Returns the baseline mode.
function baselineValue¶
Returns the fixed baseline data value.
function colormap¶
Returns the colormap supplying color stops, or nullptr whengradient supplies them.
function direction¶
Returns the gradient direction.
function gradient¶
Returns the Qt Gradient object supplying color stops.
function opacity¶
Returns the fill opacity.
function payload¶
Returns a snapshot of all fill parameters, updated on the GUI thread when the effect changes.
Does not read the QML gradient, so updatePaintNode() can call it on the render thread.
function refresh¶
Re-reads the gradient stops, which can change without a notification, and emitseffectChanged() if they differ from the snapshot.
Implements QAccelPlot::LineCurveEffect::refresh
function setBaseline¶
Sets the baseline mode to baseline .
function setBaselineValue¶
Sets the fixed baseline data value to value .
function setColormap¶
Sets the colormap to colormap . Passnullptr to take the stops fromgradient .
function setDirection¶
Sets the gradient direction to direction .
function setGradient¶
Sets the Qt Gradient object to gradient .
function setOpacity¶
Sets the fill opacity to value .
function setValueMax¶
Sets the maximum data value for gradient normalization to value .
function setValueMaxSource¶
Sets the gradient normalization maximum source to source .
function setValueMin¶
Sets the minimum data value for gradient normalization to value .
function setValueMinSource¶
Sets the gradient normalization minimum source to source .
function valueMax¶
Returns the maximum data value for gradient normalization.
function valueMaxSource¶
Returns how the gradient normalization maximum is determined.
function valueMin¶
Returns the minimum data value for gradient normalization.
function valueMinSource¶
Returns how the gradient normalization minimum is determined.
The documentation for this class was generated from the following file QAccelPlot/src/QAccelPlot/effects/GradientFill.hpp