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

kalarm/lib

ColourList Class Reference

#include <colourlist.h>

List of all members.


Detailed Description

Represents a sorted list of colours.

The ColourList class holds a list of colours, sorted in RGB value order.

It provides a sorted QList of colours in RGB value order, with iterators and other access methods which return either QRgb or QColor objects.

Author:
David Jarvie <software@astrojar.org.uk>

Definition at line 39 of file colourlist.h.


Public Member Functions

void clear ()
 ColourList (const QColor *list)
 ColourList (const QList< QRgb > &list)
 ColourList (const ColourList &l)
 ColourList ()
bool contains (const QColor &c) const
int count () const
int indexOf (const QColor &c, int from=0) const
void insert (const QColor &c)
bool isEmpty () const
bool operator!= (const ColourList &l) const
ColourList & operator+= (const ColourList &list)
ColourList & operator+= (const QColor &c)
ColourList & operator<< (const ColourList &list)
ColourList & operator<< (const QColor &c)
ColourList & operator= (const QList< QColor > &list)
ColourList & operator= (const QList< QRgb > &list)
ColourList & operator= (const ColourList &l)
bool operator== (const ColourList &l) const
QColor operator[] (int i) const
QList< QColor > qcolorList () const
void remove (const QColor &c)

Constructor & Destructor Documentation

ColourList::ColourList (  )  [inline]

Constructs an empty list.

Definition at line 43 of file colourlist.h.

ColourList::ColourList ( const ColourList &  l  )  [inline]

Copy constructor.

Definition at line 45 of file colourlist.h.

ColourList::ColourList ( const QList< QRgb > &  list  )  [inline]

Constructs a list whose values are preset to the colours in list.

Definition at line 47 of file colourlist.h.

ColourList::ColourList ( const QColor *  list  ) 

Constructs a list whose values are preset to the colours in the list.

Terminate list by an invalid colour.

Definition at line 24 of file colourlist.cpp.


Member Function Documentation

void ColourList::clear (  )  [inline]

Removes all values from the list.

Definition at line 59 of file colourlist.h.

bool ColourList::contains ( const QColor &  c  )  const [inline]

Returns true if the list contains the colour c.

Definition at line 79 of file colourlist.h.

int ColourList::count (  )  const [inline]

Returns the number of colours in the list.

Definition at line 75 of file colourlist.h.

int ColourList::indexOf ( const QColor &  c,
int  from = 0 
) const [inline]

Finds the first occurrence of colour c in the list.

Returns:
index to first occurrence of c, or -1 if c is not in the list

Definition at line 83 of file colourlist.h.

void ColourList::insert ( const QColor &  c  ) 

Adds the specified colour c to the list, in the correct sorted position.

Definition at line 31 of file colourlist.cpp.

bool ColourList::isEmpty (  )  const [inline]

Returns true if the list is empty.

Definition at line 77 of file colourlist.h.

bool ColourList::operator!= ( const ColourList &  l  )  const [inline]

Returns true if the colours in the two lists differ.

Definition at line 73 of file colourlist.h.

ColourList& ColourList::operator+= ( const ColourList &  list  )  [inline]

Adds the colours in list to this list.

Definition at line 68 of file colourlist.h.

ColourList& ColourList::operator+= ( const QColor &  c  )  [inline]

Adds the specified colour c to the list.

Definition at line 65 of file colourlist.h.

ColourList& ColourList::operator<< ( const ColourList &  list  )  [inline]

Definition at line 69 of file colourlist.h.

ColourList& ColourList::operator<< ( const QColor &  c  )  [inline]

Definition at line 66 of file colourlist.h.

ColourList & ColourList::operator= ( const QList< QColor > &  list  ) 

Sets the list to comprise the colours in list.

Definition at line 46 of file colourlist.cpp.

ColourList& ColourList::operator= ( const QList< QRgb > &  list  )  [inline]

Sets the list to comprise the colours in list.

Definition at line 55 of file colourlist.h.

ColourList& ColourList::operator= ( const ColourList &  l  )  [inline]

Assignment operator.

Definition at line 53 of file colourlist.h.

bool ColourList::operator== ( const ColourList &  l  )  const [inline]

Returns true if the colours in the two lists are the same.

Definition at line 71 of file colourlist.h.

QColor ColourList::operator[] ( int  i  )  const [inline]

Returns the colour at position i in the list.

The item must exist.

Definition at line 85 of file colourlist.h.

QList< QColor > ColourList::qcolorList (  )  const

Returns the list as a list of QColor objects.

Definition at line 55 of file colourlist.cpp.

void ColourList::remove ( const QColor &  c  )  [inline]

Removes the colour c from the list.

Definition at line 63 of file colourlist.h.


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

kalarm/lib

Skip menu "kalarm/lib"
  • Main Page
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members

kdepim

Skip menu "kdepim"
  • akonadi
  •   clients
  •   kabc
  •   kcal
  •   kcm
  • akregator
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt
  • kdgantt1
  • kjots
  • kleopatra
  • kmail
  • kmobiletools
  • knode
  • knotes
  • kontact
  • kontactinterfaces
  • korganizer
  •   korgac
  • kpilot
  • ktimetracker
  •   doc
  • libkdepim
  • libkholidays
  • libkleo
  • libkpgp
  • maildir
Generated for kdepim by doxygen 1.5.4
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