QSkinny 0.8.0
C++/Qt UI toolkit
Loading...
Searching...
No Matches
QskGradient Class Reference

Detailed Description

Definition at line 21 of file QskGradient.h.

Public Types

enum  Type { Stops , Linear , Radial , Conic }
 
enum  SpreadMode { PadSpread , ReflectSpread , RepeatSpread }
 
enum  StretchMode { NoStretch , StretchToSize }
 

Properties

Type type
 
QskLinearDirection linear
 
QskConicDirection conic
 
QskRadialDirection radial
 
QskGradientStops stops
 
SpreadMode spreadMode
 
StretchMode stretchMode
 
bool valid
 
bool visible
 
bool monochrome
 

Public Member Functions

 QskGradient (Qt::GlobalColor)
 
 QskGradient (QRgb)
 
 QskGradient (const QColor &)
 
 QskGradient (const QColor &, const QColor &)
 
 QskGradient (QGradient::Preset)
 
 QskGradient (const QskGradientStops &)
 
 QskGradient (const QGradient &)
 
 QskGradient (const QskGradient &) noexcept
 
QskGradientoperator= (const QskGradient &) noexcept
 
bool operator== (const QskGradient &) const noexcept
 
bool operator!= (const QskGradient &) const noexcept
 
QskGradient::Type type () const noexcept
 
void setLinearDirection (const QskLinearDirection &)
 
void setLinearDirection (qreal, qreal, qreal, qreal)
 
void setLinearDirection (Qt::Orientation)
 
QskLinearDirection linearDirection () const
 
void setRadialDirection (const QskRadialDirection &)
 
void setRadialDirection (const qreal x, qreal y, qreal radius)
 
void setRadialDirection (const qreal x, qreal y, qreal radiusX, qreal radiusY)
 
QskRadialDirection radialDirection () const
 
void setConicDirection (qreal x, qreal y)
 
void setConicDirection (qreal x, qreal y, qreal startAngle, qreal spanAngle=360.0)
 
void setConicDirection (qreal x, qreal y, qreal startAngle, qreal spanAngle, qreal aspectRatio)
 
void setConicDirection (const QskConicDirection &)
 
QskConicDirection conicDirection () const
 
void setDirection (Type)
 
void resetDirection ()
 
bool isValid () const noexcept
 
bool isMonochrome () const noexcept
 
bool isVisible () const noexcept
 
void setStops (const QskGradientStops &)
 
const QskGradientStops & stops () const noexcept
 
void setStops (const QRgb)
 
void setStops (Qt::GlobalColor)
 
void setStops (const QColor &)
 
void setStops (const QColor &, const QColor &)
 
void setStops (QGradient::Preset)
 
void clearStops ()
 
Q_INVOKABLE bool hasStopAt (qreal value) const noexcept
 
Q_INVOKABLE QColor startColor () const noexcept
 
Q_INVOKABLE QColor endColor () const noexcept
 
QRgb rgbStart () const
 
QRgb rgbEnd () const
 
void setAlpha (int alpha)
 
void setSpreadMode (SpreadMode)
 
SpreadMode spreadMode () const noexcept
 
void setStretchMode (StretchMode)
 
StretchMode stretchMode () const noexcept
 
void reverse ()
 
QskGradient reversed () const
 
QskGradient interpolated (const QskGradient &, qreal value) const
 
void stretchTo (const QRectF &)
 
QskGradient stretchedTo (const QSizeF &) const
 
QskGradient stretchedTo (const QRectF &) const
 
QskGradient extracted (qreal from, qreal start) const
 
QskHashValue hash (QskHashValue seed=0) const
 
Q_INVOKABLE qreal stopAt (int index) const noexcept
 
Q_INVOKABLE QColor colorAt (int index) const noexcept
 
int stepCount () const noexcept
 
QGradient toQGradient () const
 

Static Public Member Functions

static QVariant interpolate (const QskGradient &, const QskGradient &, qreal progress)
 

Member Enumeration Documentation

◆ SpreadMode

enum QskGradient::SpreadMode

Definition at line 53 of file QskGradient.h.

◆ StretchMode

enum QskGradient::StretchMode

Definition at line 61 of file QskGradient.h.

◆ Type

enum QskGradient::Type

Definition at line 43 of file QskGradient.h.

Constructor & Destructor Documentation

◆ QskGradient() [1/9]

QskGradient::QskGradient ( )
inlinenoexcept

Definition at line 195 of file QskGradient.h.

◆ QskGradient() [2/9]

QskGradient::QskGradient ( Qt::GlobalColor  color)
inline

Definition at line 206 of file QskGradient.h.

◆ QskGradient() [3/9]

QskGradient::QskGradient ( QRgb  rgb)
inline

Definition at line 211 of file QskGradient.h.

◆ QskGradient() [4/9]

QskGradient::QskGradient ( const QColor &  color)

Definition at line 69 of file QskGradient.cpp.

◆ QskGradient() [5/9]

QskGradient::QskGradient ( const QColor &  color1,
const QColor &  color2 
)

Definition at line 75 of file QskGradient.cpp.

◆ QskGradient() [6/9]

QskGradient::QskGradient ( QGradient::Preset  preset)

Definition at line 81 of file QskGradient.cpp.

◆ QskGradient() [7/9]

QskGradient::QskGradient ( const QskGradientStops &  stops)

Definition at line 87 of file QskGradient.cpp.

◆ QskGradient() [8/9]

QskGradient::QskGradient ( const QGradient &  qGradient)

Definition at line 93 of file QskGradient.cpp.

◆ QskGradient() [9/9]

QskGradient::QskGradient ( const QskGradient other)
noexcept

Definition at line 171 of file QskGradient.cpp.

◆ ~QskGradient()

QskGradient::~QskGradient ( )

Definition at line 185 of file QskGradient.cpp.

Member Function Documentation

◆ clearStops()

void QskGradient::clearStops ( )

Definition at line 572 of file QskGradient.cpp.

◆ colorAt()

QColor QskGradient::colorAt ( int  index) const
noexcept

Definition at line 366 of file QskGradient.cpp.

◆ conicDirection()

QskConicDirection QskGradient::conicDirection ( ) const

Definition at line 686 of file QskGradient.cpp.

◆ endColor()

QColor QskGradient::endColor ( ) const
inlinenoexcept

Definition at line 255 of file QskGradient.h.

◆ extracted()

QskGradient QskGradient::extracted ( qreal  from,
qreal  start 
) const

Definition at line 489 of file QskGradient.cpp.

◆ hash()

QskHashValue QskGradient::hash ( QskHashValue  seed = 0) const

Definition at line 581 of file QskGradient.cpp.

◆ hasStopAt()

bool QskGradient::hasStopAt ( qreal  value) const
noexcept

Definition at line 351 of file QskGradient.cpp.

◆ interpolate()

QVariant QskGradient::interpolate ( const QskGradient from,
const QskGradient to,
qreal  progress 
)
static

Definition at line 566 of file QskGradient.cpp.

◆ interpolated()

QskGradient QskGradient::interpolated ( const QskGradient to,
qreal  value 
) const

Definition at line 514 of file QskGradient.cpp.

◆ isMonochrome()

bool QskGradient::isMonochrome ( ) const
noexcept

Definition at line 278 of file QskGradient.cpp.

◆ isValid()

bool QskGradient::isValid ( ) const
noexcept

Definition at line 270 of file QskGradient.cpp.

◆ isVisible()

bool QskGradient::isVisible ( ) const
noexcept

Definition at line 286 of file QskGradient.cpp.

◆ linearDirection()

QskLinearDirection QskGradient::linearDirection ( ) const

Definition at line 616 of file QskGradient.cpp.

◆ operator!=()

bool QskGradient::operator!= ( const QskGradient other) const
inlinenoexcept

Definition at line 216 of file QskGradient.h.

◆ operator=()

QskGradient & QskGradient::operator= ( const QskGradient other)
noexcept

Definition at line 189 of file QskGradient.cpp.

◆ operator==()

bool QskGradient::operator== ( const QskGradient other) const
noexcept

Definition at line 210 of file QskGradient.cpp.

◆ radialDirection()

QskRadialDirection QskGradient::radialDirection ( ) const

Definition at line 646 of file QskGradient.cpp.

◆ resetDirection()

void QskGradient::resetDirection ( )

Definition at line 722 of file QskGradient.cpp.

◆ reverse()

void QskGradient::reverse ( )

Definition at line 471 of file QskGradient.cpp.

◆ reversed()

QskGradient QskGradient::reversed ( ) const

Definition at line 481 of file QskGradient.cpp.

◆ rgbEnd()

QRgb QskGradient::rgbEnd ( ) const
inline

Definition at line 265 of file QskGradient.h.

◆ rgbStart()

QRgb QskGradient::rgbStart ( ) const
inline

Definition at line 260 of file QskGradient.h.

◆ setAlpha()

void QskGradient::setAlpha ( int  alpha)

Definition at line 374 of file QskGradient.cpp.

◆ setConicDirection() [1/4]

void QskGradient::setConicDirection ( const QskConicDirection direction)

Definition at line 675 of file QskGradient.cpp.

◆ setConicDirection() [2/4]

void QskGradient::setConicDirection ( qreal  x,
qreal  y 
)

Definition at line 657 of file QskGradient.cpp.

◆ setConicDirection() [3/4]

void QskGradient::setConicDirection ( qreal  x,
qreal  y,
qreal  startAngle,
qreal  spanAngle,
qreal  aspectRatio 
)

Definition at line 668 of file QskGradient.cpp.

◆ setConicDirection() [4/4]

void QskGradient::setConicDirection ( qreal  x,
qreal  y,
qreal  startAngle,
qreal  spanAngle = 360.0 
)

Definition at line 662 of file QskGradient.cpp.

◆ setDirection()

void QskGradient::setDirection ( Type  type)

Definition at line 700 of file QskGradient.cpp.

◆ setLinearDirection() [1/3]

void QskGradient::setLinearDirection ( const QskLinearDirection direction)

Definition at line 606 of file QskGradient.cpp.

◆ setLinearDirection() [2/3]

void QskGradient::setLinearDirection ( qreal  x1,
qreal  y1,
qreal  x2,
qreal  y2 
)

Definition at line 601 of file QskGradient.cpp.

◆ setLinearDirection() [3/3]

void QskGradient::setLinearDirection ( Qt::Orientation  orientation)

Definition at line 596 of file QskGradient.cpp.

◆ setRadialDirection() [1/3]

void QskGradient::setRadialDirection ( const qreal  x,
qreal  y,
qreal  radius 
)

Definition at line 627 of file QskGradient.cpp.

◆ setRadialDirection() [2/3]

void QskGradient::setRadialDirection ( const qreal  x,
qreal  y,
qreal  radiusX,
qreal  radiusY 
)

Definition at line 632 of file QskGradient.cpp.

◆ setRadialDirection() [3/3]

void QskGradient::setRadialDirection ( const QskRadialDirection direction)

Definition at line 636 of file QskGradient.cpp.

◆ setSpreadMode()

void QskGradient::setSpreadMode ( SpreadMode  spreadMode)

Definition at line 389 of file QskGradient.cpp.

◆ setStops() [1/6]

void QskGradient::setStops ( const QColor &  color)

Definition at line 294 of file QskGradient.cpp.

◆ setStops() [2/6]

void QskGradient::setStops ( const QColor &  color1,
const QColor &  color2 
)

Definition at line 300 of file QskGradient.cpp.

◆ setStops() [3/6]

void QskGradient::setStops ( const QRgb  rgb)
inline

Definition at line 240 of file QskGradient.h.

◆ setStops() [4/6]

void QskGradient::setStops ( const QskGradientStops &  stops)

Definition at line 312 of file QskGradient.cpp.

◆ setStops() [5/6]

void QskGradient::setStops ( QGradient::Preset  preset)

Definition at line 306 of file QskGradient.cpp.

◆ setStops() [6/6]

void QskGradient::setStops ( Qt::GlobalColor  color)
inline

Definition at line 245 of file QskGradient.h.

◆ setStretchMode()

void QskGradient::setStretchMode ( StretchMode  stretchMode)

Definition at line 394 of file QskGradient.cpp.

◆ spreadMode()

QskGradient::SpreadMode QskGradient::spreadMode ( ) const
inlinenoexcept

Definition at line 270 of file QskGradient.h.

◆ startColor()

QColor QskGradient::startColor ( ) const
inlinenoexcept

Definition at line 250 of file QskGradient.h.

◆ stepCount()

int QskGradient::stepCount ( ) const
noexcept

Definition at line 327 of file QskGradient.cpp.

◆ stopAt()

qreal QskGradient::stopAt ( int  index) const
noexcept

Definition at line 343 of file QskGradient.cpp.

◆ stops()

const QskGradientStops & QskGradient::stops ( ) const
inlinenoexcept

Definition at line 226 of file QskGradient.h.

◆ stretchedTo() [1/2]

QskGradient QskGradient::stretchedTo ( const QRectF &  rect) const

Definition at line 460 of file QskGradient.cpp.

◆ stretchedTo() [2/2]

QskGradient QskGradient::stretchedTo ( const QSizeF &  size) const

Definition at line 455 of file QskGradient.cpp.

◆ stretchMode()

QskGradient::StretchMode QskGradient::stretchMode ( ) const
inlinenoexcept

Definition at line 275 of file QskGradient.h.

◆ stretchTo()

void QskGradient::stretchTo ( const QRectF &  rect)

Definition at line 399 of file QskGradient.cpp.

◆ toQGradient()

QGradient QskGradient::toQGradient ( ) const

Definition at line 728 of file QskGradient.cpp.

◆ type()

QskGradient::Type QskGradient::type ( ) const
inlinenoexcept

Definition at line 221 of file QskGradient.h.

Property Documentation

◆ conic

QskConicDirection QskGradient::conic
readwrite

Definition at line 28 of file QskGradient.h.

◆ linear

QskLinearDirection QskGradient::linear
readwrite

Definition at line 27 of file QskGradient.h.

◆ monochrome

bool QskGradient::monochrome
read

Definition at line 38 of file QskGradient.h.

◆ radial

QskRadialDirection QskGradient::radial
readwrite

Definition at line 29 of file QskGradient.h.

◆ spreadMode

SpreadMode QskGradient::spreadMode
readwrite

Definition at line 33 of file QskGradient.h.

◆ stops

QskGradientStops QskGradient::stops
readwrite

Definition at line 31 of file QskGradient.h.

◆ stretchMode

StretchMode QskGradient::stretchMode
readwrite

Definition at line 34 of file QskGradient.h.

◆ type

Type QskGradient::type
read

Definition at line 25 of file QskGradient.h.

◆ valid

bool QskGradient::valid
read

Definition at line 36 of file QskGradient.h.

◆ visible

bool QskGradient::visible
read

Definition at line 37 of file QskGradient.h.