#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) |
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) |
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 314 of file klfcolorchooser.h.
KLFColorChooseWidget::KLFColorChooseWidget | ( | QWidget * | parent = 0 | ) |
Definition at line 437 of file klfcolorchooser.cpp.
References QList::append(), colorChanged(), QColor::colorNames(), ensureColorListsInstance(), QPixmap::fill(), internalColorChanged(), internalColorNameSelected(), internalColorNameSet(), KLFColorList::list, setCurrentToCustomColor(), QGridLayout::setSpacing(), QList::size(), updatePaletteCustom(), updatePaletteRecent(), updatePalettes(), and updatePaletteStandard().
|
inlinevirtual |
Definition at line 322 of file klfcolorchooser.h.
|
static |
Definition at line 651 of file klfcolorchooser.cpp.
References QList::append(), QList::begin(), QList::end(), ensureColorListsInstance(), QList::erase(), KLFColorList::list, MAX_RECENT_COLORS, KLFColorList::notifyListChanged(), QList::removeAt(), and QList::size().
Referenced by KLFColorDialog::getColor().
|
inline |
Definition at line 326 of file klfcolorchooser.h.
|
inline |
Definition at line 324 of file klfcolorchooser.h.
Referenced by internalColorNameSelected(), and internalColorNameSet().
|
signal |
Referenced by internalColorChanged(), and KLFColorChooseWidget().
Definition at line 432 of file klfcolorchooser.cpp.
References ensureColorListsInstance(), and KLFColorList::list.
|
static |
Definition at line 640 of file klfcolorchooser.cpp.
Referenced by addRecentColor(), customColors(), KLFColorChooseWidget(), recentColors(), and setRecentCustomColors().
|
protectedvirtualslot |
Definition at line 520 of file klfcolorchooser.cpp.
References colorChanged(), QColor::name(), QColor::setAlpha(), and QList::size().
Referenced by internalColorNameSelected(), internalColorNameSet(), KLFColorChooseWidget(), and setColor().
|
protectedvirtualslot |
Definition at line 544 of file klfcolorchooser.cpp.
References color(), internalColorChanged(), and QListWidgetItem::text().
Referenced by KLFColorChooseWidget().
|
protectedvirtualslot |
Definition at line 552 of file klfcolorchooser.cpp.
References color(), QRegExp::exactMatch(), and internalColorChanged().
Referenced by KLFColorChooseWidget().
Definition at line 427 of file klfcolorchooser.cpp.
References ensureColorListsInstance(), and KLFColorList::list.
|
slot |
Definition at line 579 of file klfcolorchooser.cpp.
References QColor::setAlpha(), and setColor().
|
slot |
Definition at line 569 of file klfcolorchooser.cpp.
References internalColorChanged(), and QColor::rgb().
Referenced by setAlphaEnabled().
|
slot |
Definition at line 611 of file klfcolorchooser.cpp.
References KLFColorList::addColor(), and updatePaletteCustom().
Referenced by KLFColorChooseWidget().
|
static |
Definition at line 418 of file klfcolorchooser.cpp.
References ensureColorListsInstance(), KLFColorList::list, and KLFColorList::notifyListChanged().
|
slot |
Definition at line 632 of file klfcolorchooser.cpp.
Referenced by KLFColorChooseWidget(), setCurrentToCustomColor(), and updatePalettes().
|
slot |
Definition at line 624 of file klfcolorchooser.cpp.
Referenced by KLFColorChooseWidget(), and updatePalettes().
|
slot |
Definition at line 617 of file klfcolorchooser.cpp.
References updatePaletteCustom(), updatePaletteRecent(), and updatePaletteStandard().
Referenced by KLFColorChooseWidget().
|
slot |
Definition at line 628 of file klfcolorchooser.cpp.
Referenced by KLFColorChooseWidget(), and updatePalettes().