cut 3.3.0
Loading...
Searching...
No Matches
QeLinearGradient Class Reference

The QeLinearGradient class draws a linear gradient in its bounding rectangle. More...

#include <CutWidgets.h>

Public Slots

void SetVertical (bool newVertical)
 SetVertical sets a new state for rendering the gradient.
 
void SetStops (QGradientStops stops)
 Resets Gradient with entries in QGradientStops.
 
void SetStartColor (const QColor &newStartColor)
 Replaces or sets the color at position 0.0.
 
void SetStopColor (const QColor &newStopColor)
 Replaces or sets the color at position 1.0.
 
void SetColorAt (float pos, QColor colorAt)
 Sets color at specified position in the gradient.
 

Signals

void VerticalChanged ()
 VerticalChanged Signal emitted when vertical property changes.
 
void StartColorChanged ()
 StartColorChanged Signal emitted when StartColor property changes.
 
void StopColorChanged ()
 StopColorChanged Signal emitted when StopColor property changes.
 

Public Member Functions

 QeLinearGradient (QWidget *parent=nullptr)
 QeLinearGradient default constructor.
 
bool IsVertical () const
 IsVertical returns the value of the vertical property.
 
void ResetVertical ()
 ResetVertical resets the value to its default: true.
 
QColor GetStartColor () const
 GetStartColor returns the Start color of the gradient: position 0.0.
 
void ResetStartColor ()
 ResetStartColor resets the value to its default: white (255, 255, 255)
 
QColor GetStopColor () const
 GetStopColor returns the Stop color of the gradient: position 1.0.
 
void ResetStopColor ()
 ResetStartColor resets the value to its default: black (0, 0, 0)
 

Properties

bool vertical
 Determines if the gradient is drawn vertically or horizontally.
 
QColor startColor
 Start color (0.0) of the gradient.
 
QColor stopColor
 Stop color (1.0) of the gradient.
 

Detailed Description

The QeLinearGradient class draws a linear gradient in its bounding rectangle.

Constructor & Destructor Documentation

◆ QeLinearGradient()

QeLinearGradient::QeLinearGradient ( QWidget * parent = nullptr)

QeLinearGradient default constructor.

Parameters
parentQWidget that represents the parental relationship in the QObject tree.

Member Function Documentation

◆ GetStartColor()

QColor QeLinearGradient::GetStartColor ( ) const

GetStartColor returns the Start color of the gradient: position 0.0.

Returns
QColor with the color at that position

◆ GetStopColor()

QColor QeLinearGradient::GetStopColor ( ) const

GetStopColor returns the Stop color of the gradient: position 1.0.

Returns
QColor with the color at that position

◆ IsVertical()

bool QeLinearGradient::IsVertical ( ) const

IsVertical returns the value of the vertical property.

Returns
bool true if the gradient is rendered verticaly, false if not.
See also
SetVertical(bool), ResetVertical()

◆ ResetVertical()

void QeLinearGradient::ResetVertical ( )

ResetVertical resets the value to its default: true.

See also
IsVertical(), SetVertical(bool)

◆ SetColorAt

void QeLinearGradient::SetColorAt ( float pos,
QColor colorAt )
slot

Sets color at specified position in the gradient.

Parameters
colorAtQColor with the desired color
posfloat position in the range [0.0, 1.0]

◆ SetStartColor

void QeLinearGradient::SetStartColor ( const QColor & newStartColor)
slot

Replaces or sets the color at position 0.0.

Parameters
newStartColor

◆ SetStopColor

void QeLinearGradient::SetStopColor ( const QColor & newStopColor)
slot

Replaces or sets the color at position 1.0.

Parameters
newStopColor

◆ SetStops

void QeLinearGradient::SetStops ( QGradientStops stops)
slot

Resets Gradient with entries in QGradientStops.

Parameters
stopsQGradientStops with values and positions

◆ SetVertical

void QeLinearGradient::SetVertical ( bool newVertical)
slot

SetVertical sets a new state for rendering the gradient.

Parameters
newVerticalbool true indicates vertical, false indicates horizontal
See also
IsVertical(), ResetVertical()

Property Documentation

◆ startColor

QColor QeLinearGradient::startColor
readwrite

Start color (0.0) of the gradient.

Accessors:
GetStartColor(), SetStartColor(QColor), StartColorChanged(QColor), ResetStartColor()

◆ stopColor

QColor QeLinearGradient::stopColor
readwrite

Stop color (1.0) of the gradient.

Accessors:
GetStopColor(), SetStopColor(QColor), StopColorChanged(QColor), ResetStopColor()

◆ vertical

bool QeLinearGradient::vertical
readwrite

Determines if the gradient is drawn vertically or horizontally.

Accessors:
IsVertical(), SetVertical(bool), VerticalChanged(bool), ResetVertical()

The documentation for this class was generated from the following files: