KGradientSelector Class Reference

`#include <kselect.h>`

Inheritance diagram for KGradientSelector:

## Public Member Functions

| KGradientSelector (QWidget *parent=0, const char *name=0)
| KGradientSelector (Orientation o, QWidget *parent=0, const char *name=0)
| ~KGradientSelector ()
void | setColors (const QColor &col1, const QColor &col2)
void | setText (const QString &t1, const QString &t2)
void | setFirstColor (const QColor &col)
void | setSecondColor (const QColor &col)
void | setFirstText (const QString &t)
void | setSecondText (const QString &t)
const QColor | firstColor () const
const QColor | secondColor () const
const QString | firstText () const
const QString | secondText () const
Public Member Functions inherited from KSelector
| KSelector (QWidget *parent=0, const char *name=0)
| KSelector (Orientation o, QWidget *parent=0L, const char *name=0L)
Orientation | orientation () const
QRect | contentsRect () const
void | setIndent (bool i)
bool | indent () const
void | setValue (int value)
int | value () const
void | setMinValue (int value)
int | minValue () const
void | setMaxValue (int value)
int | maxValue () const

## Protected Member Functions

virtual void | drawContents (QPainter *)
virtual QSize | minimumSize () const
virtual void | virtual_hook (int id, void *data)
Protected Member Functions inherited from KSelector
virtual void | drawArrow (QPainter *painter, bool show, const QPoint &pos)
virtual void | valueChange ()
virtual void | paintEvent (QPaintEvent *)
virtual void | mousePressEvent (QMouseEvent *e)
virtual void | mouseMoveEvent (QMouseEvent *e)
virtual void | wheelEvent (QWheelEvent *)

## Properties

QColor | firstColor
QColor | secondColor
QString | firstText
QString | secondText
Properties inherited from KSelector
int | value
int | minValue
int | maxValue

## Additional Inherited Members

Signals inherited from KSelector
void | valueChanged (int value)

## Detailed Description

The KGradientSelector widget 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.

KDE Gradient Selector Widget

Definition at line 293 of file kselect.h.

## Constructor & Destructor Documentation

KGradientSelector::KGradientSelector | ( | QWidget * | parent = `0`,
|  | const char * | name = `0`
| ) |  |

Constructs a horizontal color selector which contains a gradient between white and black.

Definition at line 406 of file kselect.cpp.

KGradientSelector::KGradientSelector | ( | Orientation | o,
|  | QWidget * | parent = `0`,
|  | const char * | name = `0`
| ) |  |

Constructs a colors selector with orientation o which contains a gradient between white and black.

Definition at line 413 of file kselect.cpp.

KGradientSelector::~KGradientSelector | ( |  | ) |

Destructs the widget.

Definition at line 421 of file kselect.cpp.

## Member Function Documentation

void KGradientSelector::drawContents | ( | QPainter * |  | ) |

protected virtual

Override this function to draw the contents of the control.

The default implementation does nothing.

Draw only within contentsRect().

Reimplemented from KSelector.

Definition at line 434 of file kselect.cpp.

void KGradientSelector::setColors | ( | const QColor & | col1,
|  | const QColor & | col2
| ) |  |

inline

Sets the two colors which span the gradient.

Definition at line 320 of file kselect.h.

void KGradientSelector::setFirstColor | ( | const QColor & | col | ) |

inline

Set each color on its own.

Definition at line 328 of file kselect.h.

void KGradientSelector::setFirstText | ( | const QString & | t | ) |

inline

Set each description on its own.

Definition at line 336 of file kselect.h.

The documentation for this class was generated from the following files:

- kselect.h
- kselect.cpp

KDE Home | KDE Accessibility Home | Description of Access Keys