Skip to content

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

GradientFillBaseline QAccelPlot::GradientFill::baseline;


property baselineValue

Fixed baseline data value used when baseline isGradientFillBaseline.Value .

qreal QAccelPlot::GradientFill::baselineValue;


property colormap

Colormap supplying the color stops. Overridesgradient when set.

Colormap* QAccelPlot::GradientFill::colormap;

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 .

Qt::Orientation QAccelPlot::GradientFill::direction;


property gradient

A Qt Gradient (or compatible) object supplying the color stops.

QObject* QAccelPlot::GradientFill::gradient;


property opacity

Overall opacity of the fill area in [0, 1]. Default: 0.35.

qreal QAccelPlot::GradientFill::opacity;

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.

qreal QAccelPlot::GradientFill::valueMax;


property valueMaxSource

How the gradient normalization maximum is determined; see GradientValueSource .

GradientValueSource QAccelPlot::GradientFill::valueMaxSource;


property valueMin

Data-space value that maps to gradient position 0.0. Only used when valueMinSource is Fixed.

qreal QAccelPlot::GradientFill::valueMin;


property valueMinSource

How the gradient normalization minimum is determined; see GradientValueSource .

GradientValueSource QAccelPlot::GradientFill::valueMinSource;


Public Signals Documentation

signal baselineChanged

Emitted when the baseline property changes.

void QAccelPlot::GradientFill::baselineChanged;


signal baselineValueChanged

Emitted when the baselineValue property changes.

void QAccelPlot::GradientFill::baselineValueChanged;


signal colormapChanged

Emitted when the colormap property changes.

void QAccelPlot::GradientFill::colormapChanged;


signal directionChanged

Emitted when the direction property changes.

void QAccelPlot::GradientFill::directionChanged;


signal gradientChanged

Emitted when the gradient property changes.

void QAccelPlot::GradientFill::gradientChanged;


signal opacityChanged

Emitted when the opacity property changes.

void QAccelPlot::GradientFill::opacityChanged;


signal valueMaxChanged

Emitted when the valueMax property changes.

void QAccelPlot::GradientFill::valueMaxChanged;


signal valueMaxSourceChanged

Emitted when the valueMaxSource property changes.

void QAccelPlot::GradientFill::valueMaxSourceChanged;


signal valueMinChanged

Emitted when the valueMin property changes.

void QAccelPlot::GradientFill::valueMinChanged;


signal valueMinSourceChanged

Emitted when the valueMinSource property changes.

void QAccelPlot::GradientFill::valueMinSourceChanged;


Public Functions Documentation

function GradientFill

Constructs a GradientFill with the given__parent .

explicit QAccelPlot::GradientFill::GradientFill (
    QObject * parent=nullptr
) 


function baseline

Returns the baseline mode.

GradientFillBaseline QAccelPlot::GradientFill::baseline () const


function baselineValue

Returns the fixed baseline data value.

qreal QAccelPlot::GradientFill::baselineValue () const


function colormap

Returns the colormap supplying color stops, or nullptr whengradient supplies them.

Colormap * QAccelPlot::GradientFill::colormap () const


function direction

Returns the gradient direction.

Qt::Orientation QAccelPlot::GradientFill::direction () const


function gradient

Returns the Qt Gradient object supplying color stops.

QObject * QAccelPlot::GradientFill::gradient () const


function opacity

Returns the fill opacity.

qreal QAccelPlot::GradientFill::opacity () const


function payload

Returns a snapshot of all fill parameters, updated on the GUI thread when the effect changes.

const GradientFillPayload & QAccelPlot::GradientFill::payload () const

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.

virtual void QAccelPlot::GradientFill::refresh () override

Implements QAccelPlot::LineCurveEffect::refresh


function setBaseline

Sets the baseline mode to baseline .

void QAccelPlot::GradientFill::setBaseline (
    GradientFillBaseline baseline
) 


function setBaselineValue

Sets the fixed baseline data value to value .

void QAccelPlot::GradientFill::setBaselineValue (
    qreal value
) 


function setColormap

Sets the colormap to colormap . Passnullptr to take the stops fromgradient .

void QAccelPlot::GradientFill::setColormap (
    Colormap * colormap
) 


function setDirection

Sets the gradient direction to direction .

void QAccelPlot::GradientFill::setDirection (
    Qt::Orientation direction
) 


function setGradient

Sets the Qt Gradient object to gradient .

void QAccelPlot::GradientFill::setGradient (
    QObject * gradient
) 


function setOpacity

Sets the fill opacity to value .

void QAccelPlot::GradientFill::setOpacity (
    qreal value
) 


function setValueMax

Sets the maximum data value for gradient normalization to value .

void QAccelPlot::GradientFill::setValueMax (
    qreal value
) 


function setValueMaxSource

Sets the gradient normalization maximum source to source .

void QAccelPlot::GradientFill::setValueMaxSource (
    GradientValueSource source
) 


function setValueMin

Sets the minimum data value for gradient normalization to value .

void QAccelPlot::GradientFill::setValueMin (
    qreal value
) 


function setValueMinSource

Sets the gradient normalization minimum source to source .

void QAccelPlot::GradientFill::setValueMinSource (
    GradientValueSource source
) 


function valueMax

Returns the maximum data value for gradient normalization.

qreal QAccelPlot::GradientFill::valueMax () const


function valueMaxSource

Returns how the gradient normalization maximum is determined.

GradientValueSource QAccelPlot::GradientFill::valueMaxSource () const


function valueMin

Returns the minimum data value for gradient normalization.

qreal QAccelPlot::GradientFill::valueMin () const


function valueMinSource

Returns how the gradient normalization minimum is determined.

GradientValueSource QAccelPlot::GradientFill::valueMinSource () const



The documentation for this class was generated from the following file QAccelPlot/src/QAccelPlot/effects/GradientFill.hpp