missing setStops versions added

This commit is contained in:
Uwe Rathmann 2022-11-16 16:19:19 +01:00
parent 0f028e4239
commit d327a68fc1

View File

@ -92,7 +92,10 @@ class QSK_EXPORT QskGradient
Q_INVOKABLE void setStops( const QVector< QskGradientStop >& ); Q_INVOKABLE void setStops( const QVector< QskGradientStop >& );
Q_INVOKABLE const QVector< QskGradientStop >& stops() const noexcept; Q_INVOKABLE const QVector< QskGradientStop >& stops() const noexcept;
void setStops( const QRgb );
void setStops( Qt::GlobalColor );
void setStops( const QColor& ); void setStops( const QColor& );
void setStops( const QColor&, const QColor& ); void setStops( const QColor&, const QColor& );
void setStops( QGradient::Preset ); void setStops( QGradient::Preset );
@ -211,6 +214,16 @@ inline const QskGradientStops& QskGradient::stops() const noexcept
return m_stops; 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 inline QColor QskGradient::startColor() const noexcept
{ {
return m_stops.isEmpty() ? QColor() : m_stops.first().color(); return m_stops.isEmpty() ? QColor() : m_stops.first().color();