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

kdeui

KColor Class Reference

A color class that preserves both RGB and HSV values. More...

#include <kcolordialog.h>

Inheritance diagram for KColor:

Inheritance graph
[legend]

List of all members.


Public Member Functions

void hsv (int *_h, int *_s, int *_v) const
 KColor (const QColor &col)
 KColor (const KColor &col)
 KColor ()
KColor & operator= (const KColor &col)
bool operator== (const KColor &col) const
void rgb (int *_r, int *_g, int *_b) const
void setHsv (int _h, int _s, int _v)
void setRgb (int _r, int _g, int _b)

Protected Attributes

int b
int g
int h
int r
int s
int v

Detailed Description

A color class that preserves both RGB and HSV values.

This is unlike QColor which only preserves RGB values and recalculates HSV values. The QColor behavior leads to an accumulation of rounding errors when working in the HSV color space.

Author:
Waldo Bastian <bastian@kde.org>

Definition at line 164 of file kcolordialog.h.


Constructor & Destructor Documentation

KColor::KColor (  ) 

Definition at line 116 of file kcolordialog.cpp.

KColor::KColor ( const KColor &  col  ) 

Definition at line 122 of file kcolordialog.cpp.

KColor::KColor ( const QColor &  col  ) 

Definition at line 129 of file kcolordialog.cpp.


Member Function Documentation

void KColor::hsv ( int *  _h,
int *  _s,
int *  _v 
) const

Definition at line 173 of file kcolordialog.cpp.

KColor & KColor::operator= ( const KColor &  col  ) 

Definition at line 142 of file kcolordialog.cpp.

bool KColor::operator== ( const KColor &  col  )  const

Definition at line 136 of file kcolordialog.cpp.

void KColor::rgb ( int *  _r,
int *  _g,
int *  _b 
) const

Definition at line 167 of file kcolordialog.cpp.

void KColor::setHsv ( int  _h,
int  _s,
int  _v 
)

Reimplemented from QColor.

Definition at line 151 of file kcolordialog.cpp.

void KColor::setRgb ( int  _r,
int  _g,
int  _b 
)

Reimplemented from QColor.

Definition at line 159 of file kcolordialog.cpp.


Member Data Documentation

int KColor::b [protected]

Definition at line 186 of file kcolordialog.h.

int KColor::g [protected]

Definition at line 185 of file kcolordialog.h.

int KColor::h [protected]

Definition at line 181 of file kcolordialog.h.

int KColor::r [protected]

Definition at line 184 of file kcolordialog.h.

int KColor::s [protected]

Definition at line 182 of file kcolordialog.h.

int KColor::v [protected]

Definition at line 183 of file kcolordialog.h.


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

kdeui

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

API Reference

Skip menu "API Reference"
  • dcop
  • DNSSD
  • interfaces
  • Kate
  • kconf_update
  • KDECore
  • KDED
  • kdefx
  • KDEsu
  • kdeui
  • KDocTools
  • KHTML
  • KImgIO
  • KInit
  • kio
  • kioslave
  • KJS
  • KNewStuff
  • KParts
  • KUtils
Generated for API Reference by doxygen 1.5.9
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