Pages
API Documentation
On this page

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

Protected Functions

Detailed Description

Property Documentation

firstColor : QColor

Access functions:

firstText : QString

Access functions:

secondColor : QColor

Access functions:

secondText : QString

Access functions:

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()

We use cookies to personalize content and to analyze our traffic. Please decide if you are willing to accept cookies from our website.