[KLF Backend][KLF Tools][KLF Home]
KLatexFormula Project
KLFColorChooseWidget Class Reference

#include <klfcolorchooser.h>

Inheritance diagram for KLFColorChooseWidget:
Collaboration diagram for KLFColorChooseWidget:

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 328 of file klfcolorchooser.h.

Constructor & Destructor Documentation

◆ KLFColorChooseWidget()

◆ ~KLFColorChooseWidget()

virtual KLFColorChooseWidget::~KLFColorChooseWidget ( )
inlinevirtual

Definition at line 336 of file klfcolorchooser.h.

References KLFColorChooseWidget().

Member Function Documentation

◆ addRecentColor()

void KLFColorChooseWidget::addRecentColor ( const QColor & col)
static

Definition at line 875 of file klfcolorchooser.cpp.

References ensureColorListsInstance().

◆ alphaEnabled()

bool KLFColorChooseWidget::alphaEnabled ( ) const
inline

Definition at line 340 of file klfcolorchooser.h.

◆ color()

QColor KLFColorChooseWidget::color ( ) const
inline

Definition at line 338 of file klfcolorchooser.h.

◆ colorChanged

◆ customColors()

QList< QColor > KLFColorChooseWidget::customColors ( )
static

Definition at line 588 of file klfcolorchooser.cpp.

References ensureColorListsInstance().

◆ ensureColorListsInstance()

void KLFColorChooseWidget::ensureColorListsInstance ( )
static

◆ internalColorChanged

void KLFColorChooseWidget::internalColorChanged ( const QColor & newcolor)
protectedvirtualslot

◆ internalColorNameSelected

void KLFColorChooseWidget::internalColorNameSelected ( QListWidgetItem * item)
protectedvirtualslot

Definition at line 718 of file klfcolorchooser.cpp.

References color, and internalColorChanged().

Referenced by colorChanged(), and KLFColorChooseWidget().

◆ internalColorNameSet

void KLFColorChooseWidget::internalColorNameSet ( const QString & colorname)
protectedvirtualslot

◆ recentColors()

QList< QColor > KLFColorChooseWidget::recentColors ( )
static

Definition at line 582 of file klfcolorchooser.cpp.

References ensureColorListsInstance().

◆ setAlphaEnabled

void KLFColorChooseWidget::setAlphaEnabled ( bool alpha_enabled)
slot

Definition at line 792 of file klfcolorchooser.cpp.

References setColor().

Referenced by colorChanged().

◆ setColor

void KLFColorChooseWidget::setColor ( const QColor & color)
slot

Definition at line 782 of file klfcolorchooser.cpp.

References color, and internalColorChanged().

Referenced by colorChanged(), and setAlphaEnabled().

◆ setCurrentToCustomColor

void KLFColorChooseWidget::setCurrentToCustomColor ( )
slot

Definition at line 835 of file klfcolorchooser.cpp.

References updatePaletteCustom().

Referenced by colorChanged(), and KLFColorChooseWidget().

◆ setRecentCustomColors()

void KLFColorChooseWidget::setRecentCustomColors ( QList< QColor > recentcolors,
QList< QColor > customcolors )
static

Definition at line 573 of file klfcolorchooser.cpp.

References ensureColorListsInstance().

◆ updatePaletteCustom

void KLFColorChooseWidget::updatePaletteCustom ( )
slot

◆ updatePaletteRecent

void KLFColorChooseWidget::updatePaletteRecent ( )
slot

Definition at line 848 of file klfcolorchooser.cpp.

Referenced by colorChanged(), KLFColorChooseWidget(), and updatePalettes().

◆ updatePalettes

void KLFColorChooseWidget::updatePalettes ( )
slot

◆ updatePaletteStandard

void KLFColorChooseWidget::updatePaletteStandard ( )
slot

Definition at line 852 of file klfcolorchooser.cpp.

Referenced by colorChanged(), KLFColorChooseWidget(), and updatePalettes().

Property Documentation

◆ alphaEnabled

bool KLFColorChooseWidget::alphaEnabled
readwrite

Definition at line 333 of file klfcolorchooser.h.

◆ color

QColor KLFColorChooseWidget::color
readwrite

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

Generated by doxygen 1.14.0