• Skip to content
  • Skip to link menu
KDE 3.5 API Reference
  • KDE API Reference
  • @topname@
  • Sitemap
  • Contact Us
 

kdeui

KColorButton Class Reference

#include <kcolorbutton.h>

Inheritance diagram for KColorButton:

QPushButton

List of all members.


Detailed Description

A pushbutton to display or allow user selection of a color.

This widget can be used to display or allow user selection of a color.

See also:
KColorDialog
kcolorbutton.png

KDE Color Button

Definition at line 37 of file kcolorbutton.h.


Signals

void changed (const QColor &newColor)

Public Member Functions

 KColorButton (QWidget *parent, const char *name=0L)
 KColorButton (const QColor &c, QWidget *parent, const char *name=0L)
 KColorButton (const QColor &c, const QColor &defaultColor, QWidget *parent, const char *name=0L)
QColor color () const
void setColor (const QColor &c)
QColor defaultColor () const
void setDefaultColor (const QColor &c)
QSize sizeHint () const

Protected Slots

void chooseColor ()

Protected Member Functions

virtual void drawButtonLabel (QPainter *p)
virtual void dragEnterEvent (QDragEnterEvent *)
virtual void dropEvent (QDropEvent *)
virtual void mousePressEvent (QMouseEvent *e)
virtual void mouseMoveEvent (QMouseEvent *e)
virtual void keyPressEvent (QKeyEvent *e)
virtual void virtual_hook (int id, void *data)

Properties

QColor color
QColor defaultColor

Constructor & Destructor Documentation

KColorButton::KColorButton ( QWidget *  parent,
const char *  name = 0L 
)

Creates a color button.

Definition at line 41 of file kcolorbutton.cpp.

KColorButton::KColorButton ( const QColor &  c,
QWidget *  parent,
const char *  name = 0L 
)

Creates a color button with an initial color c.

Definition at line 53 of file kcolorbutton.cpp.

KColorButton::KColorButton ( const QColor &  c,
const QColor &  defaultColor,
QWidget *  parent,
const char *  name = 0L 
)

Since:
3.1

Definition at line 66 of file kcolorbutton.cpp.


Member Function Documentation

QColor KColorButton::color (  )  const [inline]

Returns the currently chosen color.

Definition at line 62 of file kcolorbutton.h.

void KColorButton::setColor ( const QColor &  c  ) 

Sets the current color to c.

Definition at line 84 of file kcolorbutton.cpp.

QColor KColorButton::defaultColor (  )  const

Returns the default color or an invalid color if no default color is set.

Since:
3.4

void KColorButton::setDefaultColor ( const QColor &  c  ) 

Sets the default color to c.

Since:
3.4

Definition at line 98 of file kcolorbutton.cpp.

void KColorButton::changed ( const QColor &  newColor  )  [signal]

Emitted when the color of the widget is changed, either with setColor() or via user selection.


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

kdeui

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

@topname@

Skip menu "@topname@"
  •     kdnssd-avahi
  • arts
  • dcop
  • dnssd
  • interfaces
  •     interface
  •     library
  •   kspeech
  •   ktexteditor
  • kabc
  • kate
  • kcmshell
  • kdecore
  • kded
  • kdefx
  • kdeprint
  • kdesu
  • kdeui
  • kdoctools
  • khtml
  • kimgio
  • kinit
  • kio
  •   bookmarks
  •   httpfilter
  •   kfile
  •   kio
  •   kioexec
  •   kpasswdserver
  •   kssl
  • kioslave
  •   http
  • kjs
  • kmdi
  •   kmdi
  • knewstuff
  • kparts
  • kresources
  • kspell2
  • kunittest
  • kutils
  • kwallet
  • libkmid
  • libkscreensaver
Generated for @topname@ by doxygen 1.5.5
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