• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.14.38 API Reference
  • KDE Home
  • Contact Us
 

KDEUI

Signals | Public Member Functions | Protected Member Functions | Properties | List of all members
KColorCombo Class Reference

#include <kcolorcombo.h>

Inheritance diagram for KColorCombo:
QComboBox

Signals

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

Public Member Functions

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

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.

KDE Color Combo Box

Definition at line 45 of file kcolorcombo.h.

Constructor & Destructor Documentation

◆ KColorCombo()

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

Constructs a color combo box.

Definition at line 226 of file kcolorcombo.cpp.

◆ ~KColorCombo()

KColorCombo::~KColorCombo ( )

Definition at line 243 of file kcolorcombo.cpp.

Member Function Documentation

◆ activated

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

Emitted when a new color box has been selected.

◆ color()

QColor KColorCombo::color ( ) const

Returns the currently selected color.

Definition at line 288 of file kcolorcombo.cpp.

◆ colors()

QList< QColor > KColorCombo::colors ( ) const

Return the list of colors available for selection.

Returns
list of colors

Definition at line 255 of file kcolorcombo.cpp.

◆ highlighted

void KColorCombo::highlighted ( const QColor &  col)
signal

Emitted when a new item has been highlighted.

◆ isCustomColor()

bool KColorCombo::isCustomColor ( ) const

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

Definition at line 292 of file kcolorcombo.cpp.

◆ paintEvent()

void KColorCombo::paintEvent ( QPaintEvent *  event)
protectedvirtual

Definition at line 297 of file kcolorcombo.cpp.

◆ setColor()

void KColorCombo::setColor ( const QColor &  col)

Selects the color col.

Sets the current color.

Definition at line 271 of file kcolorcombo.cpp.

◆ setColors()

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

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

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

Definition at line 248 of file kcolorcombo.cpp.

◆ showEmptyList()

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 317 of file kcolorcombo.cpp.

Property Documentation

◆ color

QColor KColorCombo::color
readwrite

Definition at line 1 of file kcolorcombo.h.

◆ colors

QList<QColor> KColorCombo::colors
readwrite

Definition at line 1 of file kcolorcombo.h.


The documentation for this class was generated from the following files:
  • kcolorcombo.h
  • kcolorcombo.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDEUI

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

kdelibs-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal