[KLF Application][KLF Tools][KLF Backend][KLF Home]
KLatexFormula Project
Public Slots | Signals | Public Member Functions | Static Public Member Functions | Protected Slots | Properties

KLFColorChooseWidget Class Reference

#include <klfcolorchooser.h>

Inheritance diagram for KLFColorChooseWidget:
Inheritance graph
[legend]
Collaboration diagram for KLFColorChooseWidget:
Collaboration graph
[legend]

List of all members.

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< QColorrecentColors ()
static QList< QColorcustomColors ()

Protected Slots

virtual void internalColorChanged (const QColor &newcolor)
virtual void internalColorNameSelected (QListWidgetItem *item)
virtual void internalColorNameSet (const QString &colorname)

Properties

QColor color
bool alphaEnabled

Detailed Description

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.


Constructor & Destructor Documentation

KLFColorChooseWidget::KLFColorChooseWidget ( QWidget parent = 0)
virtual KLFColorChooseWidget::~KLFColorChooseWidget ( ) [inline, virtual]

Definition at line 322 of file klfcolorchooser.h.


Member Function Documentation

void KLFColorChooseWidget::addRecentColor ( const QColor col) [static]
bool KLFColorChooseWidget::alphaEnabled ( ) const [inline]

Definition at line 326 of file klfcolorchooser.h.

QColor KLFColorChooseWidget::color ( ) const [inline]

Definition at line 324 of file klfcolorchooser.h.

Referenced by internalColorNameSelected(), and internalColorNameSet().

void KLFColorChooseWidget::colorChanged ( const QColor color) [signal]
QList< QColor > KLFColorChooseWidget::customColors ( ) [static]

Definition at line 432 of file klfcolorchooser.cpp.

References ensureColorListsInstance(), and KLFColorList::list.

void KLFColorChooseWidget::ensureColorListsInstance ( ) [static]
void KLFColorChooseWidget::internalColorChanged ( const QColor newcolor) [protected, virtual, slot]
void KLFColorChooseWidget::internalColorNameSelected ( QListWidgetItem item) [protected, virtual, slot]

Definition at line 544 of file klfcolorchooser.cpp.

References color(), internalColorChanged(), and QListWidgetItem::text().

Referenced by KLFColorChooseWidget().

void KLFColorChooseWidget::internalColorNameSet ( const QString colorname) [protected, virtual, slot]

Definition at line 552 of file klfcolorchooser.cpp.

References color(), QRegExp::exactMatch(), and internalColorChanged().

Referenced by KLFColorChooseWidget().

QList< QColor > KLFColorChooseWidget::recentColors ( ) [static]

Definition at line 427 of file klfcolorchooser.cpp.

References ensureColorListsInstance(), and KLFColorList::list.

void KLFColorChooseWidget::setAlphaEnabled ( bool  alpha_enabled) [slot]

Definition at line 579 of file klfcolorchooser.cpp.

References QColor::setAlpha(), and setColor().

void KLFColorChooseWidget::setColor ( const QColor color) [slot]

Definition at line 569 of file klfcolorchooser.cpp.

References internalColorChanged(), and QColor::rgb().

Referenced by setAlphaEnabled().

void KLFColorChooseWidget::setCurrentToCustomColor ( ) [slot]

Definition at line 611 of file klfcolorchooser.cpp.

References KLFColorList::addColor(), and updatePaletteCustom().

Referenced by KLFColorChooseWidget().

void KLFColorChooseWidget::setRecentCustomColors ( QList< QColor recentcolors,
QList< QColor customcolors 
) [static]
void KLFColorChooseWidget::updatePaletteCustom ( ) [slot]
void KLFColorChooseWidget::updatePaletteRecent ( ) [slot]

Definition at line 624 of file klfcolorchooser.cpp.

Referenced by KLFColorChooseWidget(), and updatePalettes().

void KLFColorChooseWidget::updatePalettes ( ) [slot]
void KLFColorChooseWidget::updatePaletteStandard ( ) [slot]

Definition at line 628 of file klfcolorchooser.cpp.

Referenced by KLFColorChooseWidget(), and updatePalettes().


Property Documentation

bool KLFColorChooseWidget::alphaEnabled [read, write]

Definition at line 319 of file klfcolorchooser.h.

QColor KLFColorChooseWidget::color [read, write]

Definition at line 318 of file klfcolorchooser.h.


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

Generated by doxygen 1.7.3