KGradientSelector Class
Allows the user to choose from a one-dimensional range of colors which is given as a gradient between two colors provided by the programmer. More...
- Header:
#include <KGradientSelector> - CMake:
find_package(KF6 REQUIRED COMPONENTS WidgetsAddons)
target_link_libraries(mytarget PRIVATE KF6::WidgetsAddons) - Inherits: KSelector
List of all members, including inherited members
Properties
Public Functions
- KGradientSelector(QWidget *parent = nullptr)
- KGradientSelector(Qt::Orientation o, QWidget *parent = nullptr)
- QColor firstColor() const
- QString firstText() const
- QColor secondColor() const
- QString secondText() const
- void setColors(const QColor &col1, const QColor &col2)
- void setFirstColor(const QColor &col)
- void setFirstText(const QString &t)
- void setSecondColor(const QColor &col)
- void setSecondText(const QString &t)
- void setStops(const QGradientStops &stops)
- void setText(const QString &t1, const QString &t2)
- QGradientStops stops() const
Protected Functions
Detailed Description
Property Documentation
firstColor : QColor
Access functions:
QColorfirstColor() constvoidsetFirstColor(constQColor&col)
firstText : QString
Access functions:
QStringfirstText() constvoidsetFirstText(constQString&t)
secondColor : QColor
Access functions:
QColorsecondColor() constvoidsetSecondColor(constQColor&col)
secondText : QString
Access functions:
QStringsecondText() constvoidsetSecondText(constQString&t)
Member Function Documentation
[explicit] KGradientSelector::KGradientSelector(QWidget *parent = nullptr)
Constructs a horizontal color selector which contains a gradient between white and black.
[explicit] KGradientSelector::KGradientSelector(Qt::Orientation o, QWidget *parent = nullptr)
Constructs a colors selector with orientation o which contains a gradient between white and black.
QColor KGradientSelector::firstColor() const
Note: Getter function for property firstColor.
See also setFirstColor()
QString KGradientSelector::firstText() const
Note: Getter function for property firstText.
See also setFirstText()
[virtual protected] QSize KGradientSelector::minimumSize() const
QColor KGradientSelector::secondColor() const
Note: Getter function for property secondColor.
See also setSecondColor()
QString KGradientSelector::secondText() const
Note: Getter function for property secondText.
See also setSecondText()
void KGradientSelector::setColors(const QColor &col1, const QColor &col2)
Sets the two colors which span the gradient.
void KGradientSelector::setFirstColor(const QColor &col)
Set each color on its own.
Note: Setter function for property firstColor.
See also firstColor()
void KGradientSelector::setFirstText(const QString &t)
Set each description on its own
Note: Setter function for property firstText.
See also firstText()
void KGradientSelector::setSecondColor(const QColor &col)
Note: Setter function for property secondColor.
See also secondColor()
void KGradientSelector::setSecondText(const QString &t)
Note: Setter function for property secondText.
See also secondText()
void KGradientSelector::setStops(const QGradientStops &stops)
Sets the colors that make up the gradient. Any previously set colors are removed.
See also stops()
void KGradientSelector::setText(const QString &t1, const QString &t2)
QGradientStops KGradientSelector::stops() const
Get the colors that make up the gradient.
See also setStops()