KDE 4.2 PyKDE API Reference
  • KDE's Python API
  • Overview
  • PyKDE Home
  • Sitemap
  • Contact Us
 

KColorButton Class Reference

from PyKDE4.kdeui import *

Inherits: QPushButton → QAbstractButton → QWidget → QObject

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

"KDE Color Button"


Signals

 changed (QColor newColor)

Methods

 __init__ (self, QWidget parent=0)
 __init__ (self, QColor c, QWidget parent=0)
 __init__ (self, QColor c, QColor defaultColor, QWidget parent=0)
 changed (self, QColor newColor)
QColor color (self)
QColor defaultColor (self)
 dragEnterEvent (self, QDragEnterEvent a0)
 dropEvent (self, QDropEvent a0)
 keyPressEvent (self, QKeyEvent e)
QSize minimumSizeHint (self)
 mouseMoveEvent (self, QMouseEvent e)
 mousePressEvent (self, QMouseEvent e)
 paintEvent (self, QPaintEvent pe)
 setColor (self, QColor c)
 setDefaultColor (self, QColor c)
QSize sizeHint (self)

Method Documentation

__init__ (  self,
QWidget  parent=0
)

Creates a color button.

__init__ (  self,
QColor  c,
QWidget  parent=0
)

Creates a color button with an initial color c.

__init__ (  self,
QColor  c,
QColor  defaultColor,
QWidget  parent=0
)

Creates a color button with an initial color c and default color defaultColor.

changed (  self,
QColor  newColor
)

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

Signal syntax:
QObject.connect(source, SIGNAL("changed(const QColor&)"), target_slot)
QColor color (   self )

Returns the currently chosen color.

QColor defaultColor (   self )

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

dragEnterEvent (  self,
QDragEnterEvent  a0
)
dropEvent (  self,
QDropEvent  a0
)
keyPressEvent (  self,
QKeyEvent  e
)
QSize minimumSizeHint (   self )
mouseMoveEvent (  self,
QMouseEvent  e
)
mousePressEvent (  self,
QMouseEvent  e
)
paintEvent (  self,
QPaintEvent  pe
)
setColor (  self,
QColor  c
)

Sets the current color to c.

setDefaultColor (  self,
QColor  c
)

Sets the default color to c.

QSize sizeHint (   self )
  • Full Index

Modules

  • akonadi
  • dnssd
  • kdecore
  • kdeui
  • khtml
  • kio
  • knewstuff
  • kparts
  • kutils
  • nepomuk
  • phonon
  • plasma
  • solid
  • soprano
This documentation is maintained by Simon Edwards.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal