• Skip to content
  • Skip to link menu
KDE 4.3 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

KDEUI

KColorCombo Class Reference

Combobox for colors. More...

#include <kcolorcombo.h>

Inheritance diagram for KColorCombo:
QComboBox

List of all members.

Signals

void activated (const QColor &col)
void highlighted (const QColor &col)

Public Member Functions

QColor color () const
QList< QColor > colors () const
bool isCustomColor () const
 KColorCombo (QWidget *parent=0)
void setColor (const QColor &col)
void setColors (const QList< QColor > &colors)
void showEmptyList ()
 ~KColorCombo ()

Protected Member Functions

virtual void paintEvent (QPaintEvent *event)

Properties

QColor color
QList< QColor > colors

Detailed Description

Combobox for colors.

The combobox provides some preset colors to be selected, and an entry to select a custom color using a color dialog.

Definition at line 43 of file kcolorcombo.h.


Constructor & Destructor Documentation

KColorCombo::KColorCombo ( QWidget *  parent = 0  )  [explicit]

Constructs a color combo box.

Definition at line 232 of file kcolorcombo.cpp.

KColorCombo::~KColorCombo (  ) 

Definition at line 249 of file kcolorcombo.cpp.


Member Function Documentation

void KColorCombo::activated ( const QColor &  col  )  [signal]

Emitted when a new color box has been selected.

QColor KColorCombo::color (  )  const

Returns the currently selected color.

QList<QColor> KColorCombo::colors (  )  const

Return the list of colors available for selection.

Returns:
list of colors
void KColorCombo::highlighted ( const QColor &  col  )  [signal]

Emitted when a new item has been highlighted.

bool KColorCombo::isCustomColor (  )  const

Find whether the currently selected color is a custom color selected using a color dialog.

Definition at line 298 of file kcolorcombo.cpp.

void KColorCombo::paintEvent ( QPaintEvent *  event  )  [protected, virtual]

Definition at line 303 of file kcolorcombo.cpp.

void KColorCombo::setColor ( const QColor &  col  ) 

Selects the color col.

Sets the current color.

Definition at line 277 of file kcolorcombo.cpp.

void KColorCombo::setColors ( const QList< QColor > &  colors  ) 

Set a custom list of colors to choose from, in place of the standard list.

Parameters:
cols list of colors. If empty, the selection list reverts to the standard list.

Definition at line 254 of file kcolorcombo.cpp.

void KColorCombo::showEmptyList (  ) 

Clear the color list and don't show it, till the next setColor() call.

Show an empty list, till the next color is set with setColor.

Definition at line 320 of file kcolorcombo.cpp.


Property Documentation

QColor KColorCombo::color [read, write]

Returns the currently selected color.

Definition at line 46 of file kcolorcombo.h.

QList< QColor > KColorCombo::colors [read, write]

Definition at line 47 of file kcolorcombo.h.


The documentation for this class was generated from the following files:
  • kcolorcombo.h
  • kcolorcombo.cpp

KDEUI

Skip menu "KDEUI"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.6.1
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal