From d327a68fc199e38d364f2bb989213f2a34e2b0cd Mon Sep 17 00:00:00 2001 From: Uwe Rathmann Date: Wed, 16 Nov 2022 16:19:19 +0100 Subject: [PATCH] missing setStops versions added --- src/common/QskGradient.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/common/QskGradient.h b/src/common/QskGradient.h index ce391945..ee671275 100644 --- a/src/common/QskGradient.h +++ b/src/common/QskGradient.h @@ -92,7 +92,10 @@ class QSK_EXPORT QskGradient Q_INVOKABLE void setStops( const QVector< QskGradientStop >& ); Q_INVOKABLE const QVector< QskGradientStop >& 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 ); @@ -211,6 +214,16 @@ inline const QskGradientStops& QskGradient::stops() const noexcept return m_stops; } +inline void QskGradient::setStops( QRgb rgb ) +{ + setStops( QColor::fromRgba( rgb ) ); +} + +inline void QskGradient::setStops( Qt::GlobalColor color ) +{ + setStops( QColor( color ) ); +} + inline QColor QskGradient::startColor() const noexcept { return m_stops.isEmpty() ? QColor() : m_stops.first().color();