KDE PIM / Developers / API Docs / kalarm

ColourList Class Reference

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

#include <colourlist.h>

List of all members.

Public Types

Public Member Functions


Detailed Description

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

It provides a sorted QValueList 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>


Constructor & Destructor Documentation

ColourList::ColourList  )  [inline]
 

Constructs an empty list.

ColourList::ColourList const ColourList l  )  [inline]
 

Copy constructor.

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

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

ColourList::ColourList const QColor *  list  ) 
 

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

Terminate list by an invalid colour.


Member Function Documentation

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

Assignment operator.

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

Sets the list to comprise the colours in list.

void ColourList::clear  )  [inline]
 

Removes all values from the list.

void ColourList::insert const QColor &  c  ) 
 

Adds the specified colour c to the list.

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

Removes the colour c from the list.

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

Adds the specified colour c to the list.

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

Adds the colours in list to this list.

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

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

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

Returns true if the colours in the two lists differ.

size_type ColourList::count  )  const [inline]
 

Returns the number of colours in the list.

bool ColourList::isEmpty  )  const [inline]
 

Returns true if the list is empty.

const_iterator ColourList::begin  )  const [inline]
 

Returns an iterator pointing to the first colour in the list.

const_iterator ColourList::end  )  const [inline]
 

Returns an iterator pointing past the last colour in the list.

const_iterator ColourList::fromLast  )  const [inline]
 

Returns an iterator pointing to the last colour in the list, or end() if the list is empty.

const_iterator ColourList::at size_type  i  )  const [inline]
 

Returns an iterator pointing to the colour at position i in the list.

size_type ColourList::contains const QColor &  c  )  const [inline]
 

Returns true if the list contains the colour c.

const_iterator ColourList::find const QColor &  c  )  const [inline]
 

Returns an iterator pointing to the first occurrence of colour c in the list.

Returns end() if colour c is not in the list.

const_iterator ColourList::find const_iterator  it,
const QColor &  c
const [inline]
 

Returns an iterator pointing to the first occurrence of colour c in the list, starting.

from position it. Returns end() if colour c is not in the list.

int ColourList::findIndex const QColor &  c  )  const [inline]
 

Returns the index to the first occurrence of colour c in the list.

Returns -1 if colour c is not in the list.

QColor ColourList::first  )  const [inline]
 

Returns the first colour in the list.

If the list is empty, the result is undefined.

QColor ColourList::last  )  const [inline]
 

Returns the last colour in the list.

If the list is empty, the result is undefined.

QColor ColourList::operator[] size_type  i  )  const [inline]
 

Returns the colour at position i in the list.

If the item does not exist, the result is undefined.


The documentation for this class was generated from the following files: