#include <klfcolorchooser.h>
Public Slots | |
void | setColor (const QColor &color) |
void | setAlphaEnabled (bool alpha_enabled) |
void | setCurrentToCustomColor () |
void | updatePalettes () |
void | updatePaletteRecent () |
void | updatePaletteStandard () |
void | updatePaletteCustom () |
Signals | |
void | colorChanged (const QColor &color) |
Public Member Functions | |
KLFColorChooseWidget (QWidget *parent=0) | |
virtual | ~KLFColorChooseWidget () |
QColor | color () const |
bool | alphaEnabled () const |
Static Public Member Functions | |
static void | ensureColorListsInstance () |
static void | setRecentCustomColors (QList< QColor > recentcolors, QList< QColor > customcolors) |
static void | addRecentColor (const QColor &col) |
static QList< QColor > | recentColors () |
static QList< QColor > | customColors () |
Protected Slots | |
virtual void | internalColorChanged (const QColor &newcolor) |
virtual void | internalColorNameSelected (QListWidgetItem *item) |
virtual void | internalColorNameSet (const QString &colorname) |
Properties | |
QColor | color |
bool | alphaEnabled |
A widget that displays a full-featured selection of sliders, spin boxes and standard color controls that prompts the user to select a color.
Set the color with setColor(), and retrieve it with color(). When the user changes the color, a colorChanged() signal is emitted.
You can allow or forbid the user to select transparent colors with setAlphaEnabled().
For the "recent colors" and "custom colors" feature to work, you will have to manually save those color lists into your application settings:
Definition at line 328 of file klfcolorchooser.h.
KLFColorChooseWidget::KLFColorChooseWidget | ( | QWidget * | parent = 0 | ) |
Definition at line 595 of file klfcolorchooser.cpp.
References QList::append(), colorChanged(), QColor::colorNames(), ensureColorListsInstance(), QPixmap::fill(), KLFFlowLayout::FlushBegin, QVariant::fromValue(), internalColorChanged(), internalColorNameSelected(), internalColorNameSet(), QPalette::setColor(), setCurrentToCustomColor(), KLFFlowLayout::setFlush(), QList::size(), updatePaletteCustom(), updatePaletteRecent(), updatePalettes(), and updatePaletteStandard().
Referenced by ~KLFColorChooseWidget().
|
inlinevirtual |
Definition at line 336 of file klfcolorchooser.h.
References KLFColorChooseWidget().
|
static |
Definition at line 875 of file klfcolorchooser.cpp.
References ensureColorListsInstance().
|
inline |
Definition at line 340 of file klfcolorchooser.h.
|
inline |
Definition at line 338 of file klfcolorchooser.h.
|
signal |
References color, internalColorChanged(), internalColorNameSelected(), internalColorNameSet(), setAlphaEnabled(), setColor(), setCurrentToCustomColor(), updatePaletteCustom(), updatePaletteRecent(), updatePalettes(), and updatePaletteStandard().
Referenced by internalColorChanged(), and KLFColorChooseWidget().
Definition at line 588 of file klfcolorchooser.cpp.
References ensureColorListsInstance().
|
static |
Definition at line 864 of file klfcolorchooser.cpp.
Referenced by addRecentColor(), customColors(), KLFColorChooseWidget(), recentColors(), and setRecentCustomColors().
|
protectedvirtualslot |
Definition at line 694 of file klfcolorchooser.cpp.
References colorChanged(), QColor::name(), and QColor::setAlpha().
Referenced by colorChanged(), internalColorNameSelected(), internalColorNameSet(), KLFColorChooseWidget(), and setColor().
|
protectedvirtualslot |
Definition at line 718 of file klfcolorchooser.cpp.
References color, and internalColorChanged().
Referenced by colorChanged(), and KLFColorChooseWidget().
|
protectedvirtualslot |
Definition at line 726 of file klfcolorchooser.cpp.
References color, QRegExp::exactMatch(), internalColorChanged(), klfDbg, and QString::startsWith().
Referenced by colorChanged(), and KLFColorChooseWidget().
Definition at line 582 of file klfcolorchooser.cpp.
References ensureColorListsInstance().
|
slot |
Definition at line 792 of file klfcolorchooser.cpp.
References setColor().
Referenced by colorChanged().
|
slot |
Definition at line 782 of file klfcolorchooser.cpp.
References color, and internalColorChanged().
Referenced by colorChanged(), and setAlphaEnabled().
|
slot |
Definition at line 835 of file klfcolorchooser.cpp.
References updatePaletteCustom().
Referenced by colorChanged(), and KLFColorChooseWidget().
|
static |
Definition at line 573 of file klfcolorchooser.cpp.
References ensureColorListsInstance().
|
slot |
Definition at line 856 of file klfcolorchooser.cpp.
Referenced by colorChanged(), KLFColorChooseWidget(), setCurrentToCustomColor(), and updatePalettes().
|
slot |
Definition at line 848 of file klfcolorchooser.cpp.
Referenced by colorChanged(), KLFColorChooseWidget(), and updatePalettes().
|
slot |
Definition at line 841 of file klfcolorchooser.cpp.
References updatePaletteCustom(), updatePaletteRecent(), and updatePaletteStandard().
Referenced by colorChanged(), and KLFColorChooseWidget().
|
slot |
Definition at line 852 of file klfcolorchooser.cpp.
Referenced by colorChanged(), KLFColorChooseWidget(), and updatePalettes().
|
readwrite |
Definition at line 333 of file klfcolorchooser.h.
|
readwrite |
Definition at line 332 of file klfcolorchooser.h.
Referenced by colorChanged(), internalColorNameSelected(), internalColorNameSet(), and setColor().