KGradientSelector Class Reference
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. More...
#include <kselect.h>
Inheritance diagram for KGradientSelector:

Public Member Functions | |
KGradientSelector (QWidget *parent=0, const char *name=0) | |
Constructs a horizontal color selector which contains a gradient between white and black. | |
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. | |
~KGradientSelector () | |
Destructs the widget. | |
void | setColors (const QColor &col1, const QColor &col2) |
Sets the two colors which span the gradient. | |
void | setText (const QString &t1, const QString &t2) |
void | setFirstColor (const QColor &col) |
Set each color on its own. | |
void | setSecondColor (const QColor &col) |
void | setFirstText (const QString &t) |
Set each description on its own. | |
void | setSecondText (const QString &t) |
const QColor | firstColor () const |
const QColor | secondColor () const |
const QString | firstText () const |
const QString | secondText () const |
Protected Member Functions | |
virtual void | drawContents (QPainter *) |
Override this function to draw the contents of the control. | |
virtual QSize | minimumSize () const |
virtual void | virtual_hook (int id, void *data) |
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.
Definition at line 284 of file kselect.h.
Constructor & Destructor Documentation
|
Constructs a horizontal color selector which contains a gradient between white and black.
Definition at line 350 of file kselect.cpp. References KStdAccel::name(). |
|
Constructs a colors selector with orientation o which contains a gradient between white and black.
Definition at line 357 of file kselect.cpp. References KStdAccel::name(). |
|
Destructs the widget.
Definition at line 365 of file kselect.cpp. |
Member Function Documentation
|
Sets the two colors which span the gradient.
Definition at line 311 of file kselect.h. References QWidget::update(). |
|
Set each color on its own.
Definition at line 319 of file kselect.h. References QWidget::update(). |
|
Set each description on its own.
Definition at line 327 of file kselect.h. References QWidget::update(). |
|
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 378 of file kselect.cpp. References QColor::blue(), QRect::bottom(), KSelector::contentsRect(), QPixmap::convertFromImage(), KImageEffect::dither(), QPainter::drawPixmap(), QPainter::drawText(), QPainter::fontMetrics(), QColor::green(), QImage::height(), QWidget::height(), QRect::left(), KSelector::orientation(), QColor::red(), QColor::rgb(), QImage::scanLine(), QPen::setColor(), QPainter::setPen(), QColor::setRgb(), QRect::top(), QRect::width(), QImage::width(), QWidget::width(), QWidget::x(), and QWidget::y(). |
The documentation for this class was generated from the following files: