kalarm/lib
ColourList Class Reference
#include <colourlist.h>
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.
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] |
| ColourList::ColourList | ( | const ColourList & | l | ) | [inline] |
| 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] |
| bool ColourList::contains | ( | const QColor & | c | ) | const [inline] |
| int ColourList::count | ( | ) | const [inline] |
| 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 ifcis 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] |
| bool ColourList::operator!= | ( | const ColourList & | l | ) | const [inline] |
| ColourList& ColourList::operator+= | ( | const ColourList & | list | ) | [inline] |
| ColourList& ColourList::operator+= | ( | const QColor & | c | ) | [inline] |
| 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 | ) |
| ColourList& ColourList::operator= | ( | const QList< QRgb > & | list | ) | [inline] |
| ColourList& ColourList::operator= | ( | const ColourList & | l | ) | [inline] |
| 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.
| void ColourList::remove | ( | const QColor & | c | ) | [inline] |
The documentation for this class was generated from the following files:
KDE 4.2 API Reference