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

#include <klfcolorchooser.h>

Inheritance diagram for KLFColorChooser:
Collaboration diagram for KLFColorChooser:

Public Slots

void setColor (const QColor &color)
 
void setAllowDefaultState (bool allow)
 
void setDefaultStateString (const QString &str)
 
void setAutoAddToList (bool autoadd)
 
void setShowSize (const QSize &size)
 
void setPixXAlignFactor (float xalignfactor)
 
void setPixYAlignFactor (float yalignfactor)
 
void setAlphaEnabled (bool alpha_enabled)
 
void setDefaultColor ()
 
void requestColor ()
 

Signals

void colorChanged (const QColor &newcolor)
 

Public Member Functions

 KLFColorChooser (QWidget *parent)
 
 ~KLFColorChooser ()
 
QSize showSize () const
 
bool allowDefaultState () const
 Allow the "default color" state.
 
QString defaultStateString () const
 
bool autoAddToList () const
 
QColor color () const
 
float pixXAlignFactor () const
 
float pixYAlignFactor () const
 
bool alphaEnabled () const
 TRUE if the user can also select opacity (alpha) with this widget.
 
virtual QSize sizeHint () const
 

Static Public Member Functions

static void setUserMaxColors (int maxcolors)
 
static void setColorList (const QList< QColor > &colorlist)
 
static QList< QColorcolorList ()
 

Protected Slots

void setSenderPropertyColor ()
 
void _makemenu ()
 

Protected Member Functions

void paintEvent (QPaintEvent *event)
 

Properties

QSize showSize
 
bool allowDefaultState
 
QString defaultStateString
 
bool autoAddToList
 
QColor color
 
float pixXAlignFactor
 
float pixYAlignFactor
 
bool alphaEnabled
 

Detailed Description

Definition at line 440 of file klfcolorchooser.h.

Constructor & Destructor Documentation

◆ KLFColorChooser()

KLFColorChooser::KLFColorChooser ( QWidget * parent)

Definition at line 929 of file klfcolorchooser.cpp.

References _makemenu().

◆ ~KLFColorChooser()

KLFColorChooser::~KLFColorChooser ( )

Definition at line 949 of file klfcolorchooser.cpp.

Member Function Documentation

◆ _makemenu

◆ allowDefaultState()

bool KLFColorChooser::allowDefaultState ( ) const
inline

Allow the "default color" state.

This is NOT a default color in the sense that it's a normal color that will be returned by default; it is a special state that can mean for ex. "no color", "full transparency" or "don't change"; it is represented by a red slash on a gray background. It is internally represented by an invalid QColor.

Definition at line 463 of file klfcolorchooser.h.

◆ alphaEnabled()

bool KLFColorChooser::alphaEnabled ( ) const
inline

TRUE if the user can also select opacity (alpha) with this widget.

Definition at line 470 of file klfcolorchooser.h.

◆ autoAddToList()

bool KLFColorChooser::autoAddToList ( ) const
inline

Definition at line 465 of file klfcolorchooser.h.

◆ color()

QColor KLFColorChooser::color ( ) const

Definition at line 954 of file klfcolorchooser.cpp.

◆ colorChanged

◆ colorList()

QList< QColor > KLFColorChooser::colorList ( )
static

Definition at line 1251 of file klfcolorchooser.cpp.

◆ defaultStateString()

QString KLFColorChooser::defaultStateString ( ) const
inline

Definition at line 464 of file klfcolorchooser.h.

◆ paintEvent()

void KLFColorChooser::paintEvent ( QPaintEvent * event)
protected

Definition at line 1114 of file klfcolorchooser.cpp.

References QPainter::drawPixmap(), QPaintEvent::rect(), and QPainter::setClipRect().

Referenced by colorChanged().

◆ pixXAlignFactor()

float KLFColorChooser::pixXAlignFactor ( ) const
inline

Definition at line 467 of file klfcolorchooser.h.

◆ pixYAlignFactor()

float KLFColorChooser::pixYAlignFactor ( ) const
inline

Definition at line 468 of file klfcolorchooser.h.

◆ requestColor

void KLFColorChooser::requestColor ( )
slot

Definition at line 1049 of file klfcolorchooser.cpp.

References KLFColorDialog::getColor(), QColor::isValid(), and setColor().

Referenced by _makemenu(), and colorChanged().

◆ setAllowDefaultState

void KLFColorChooser::setAllowDefaultState ( bool allow)
slot

Definition at line 1011 of file klfcolorchooser.cpp.

References _makemenu().

Referenced by colorChanged().

◆ setAlphaEnabled

void KLFColorChooser::setAlphaEnabled ( bool alpha_enabled)
slot

Definition at line 1043 of file klfcolorchooser.cpp.

References _makemenu().

Referenced by colorChanged().

◆ setAutoAddToList

void KLFColorChooser::setAutoAddToList ( bool autoadd)
slot

Definition at line 1022 of file klfcolorchooser.cpp.

Referenced by colorChanged().

◆ setColor

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

Sets the current color to color. If the allowDefaultState() property is TRUE, then the "default color" can be set with setDefaultColor() or

void setColor(const QColor &color)

Definition at line 989 of file klfcolorchooser.cpp.

References colorChanged(), and QColor::isValid().

Referenced by colorChanged(), requestColor(), setDefaultColor(), and setSenderPropertyColor().

◆ setColorList()

void KLFColorChooser::setColorList ( const QList< QColor > & colorlist)
static

Definition at line 1243 of file klfcolorchooser.cpp.

◆ setDefaultColor

void KLFColorChooser::setDefaultColor ( )
slot

equivalent to

Definition at line 1006 of file klfcolorchooser.cpp.

References setColor().

Referenced by _makemenu(), and colorChanged().

◆ setDefaultStateString

void KLFColorChooser::setDefaultStateString ( const QString & str)
slot

Definition at line 1016 of file klfcolorchooser.cpp.

References _makemenu().

Referenced by colorChanged().

◆ setPixXAlignFactor

void KLFColorChooser::setPixXAlignFactor ( float xalignfactor)
slot

Definition at line 1035 of file klfcolorchooser.cpp.

Referenced by colorChanged().

◆ setPixYAlignFactor

void KLFColorChooser::setPixYAlignFactor ( float yalignfactor)
slot

Definition at line 1039 of file klfcolorchooser.cpp.

Referenced by colorChanged().

◆ setSenderPropertyColor

void KLFColorChooser::setSenderPropertyColor ( )
protectedslot

Definition at line 1060 of file klfcolorchooser.cpp.

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

Referenced by _makemenu(), and colorChanged().

◆ setShowSize

void KLFColorChooser::setShowSize ( const QSize & size)
slot

Definition at line 1026 of file klfcolorchooser.cpp.

References QSize::isValid(), and sizeHint().

Referenced by colorChanged().

◆ setUserMaxColors()

void KLFColorChooser::setUserMaxColors ( int maxcolors)
static

This function must be called before any instance is created, and before calling setColorList() and/or colorList(), otherwise it has no effect.

Definition at line 1231 of file klfcolorchooser.cpp.

◆ showSize()

QSize KLFColorChooser::showSize ( ) const
inline

Definition at line 457 of file klfcolorchooser.h.

References showSize.

◆ sizeHint()

QSize KLFColorChooser::sizeHint ( ) const
virtual

Definition at line 959 of file klfcolorchooser.cpp.

References QSize::expandedTo(), KLF_DEBUG_TEE, and style.

Referenced by setShowSize().

Property Documentation

◆ allowDefaultState

bool KLFColorChooser::allowDefaultState
readwrite

Definition at line 445 of file klfcolorchooser.h.

◆ alphaEnabled

bool KLFColorChooser::alphaEnabled
readwrite

Definition at line 451 of file klfcolorchooser.h.

◆ autoAddToList

bool KLFColorChooser::autoAddToList
readwrite

Definition at line 447 of file klfcolorchooser.h.

◆ color

QColor KLFColorChooser::color
readwrite

Definition at line 448 of file klfcolorchooser.h.

Referenced by colorChanged().

◆ defaultStateString

QString KLFColorChooser::defaultStateString
readwrite

Definition at line 446 of file klfcolorchooser.h.

◆ pixXAlignFactor

float KLFColorChooser::pixXAlignFactor
readwrite

Definition at line 449 of file klfcolorchooser.h.

◆ pixYAlignFactor

float KLFColorChooser::pixYAlignFactor
readwrite

Definition at line 450 of file klfcolorchooser.h.

◆ showSize

QSize KLFColorChooser::showSize
readwrite

Definition at line 444 of file klfcolorchooser.h.

Referenced by showSize().


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

Generated by doxygen 1.13.1