ColourList Class Reference
The ColourList class holds a list of colours, sorted in RGB value order. More...
#include <colourlist.h>
Public Types
Public Member Functions
- ColourList ()
- ColourList (const ColourList &l)
- ColourList (const QValueList< QRgb > &list)
- ColourList (const QColor *list)
- ColourList & operator= (const ColourList &l)
- ColourList & operator= (const QValueList< QRgb > &list)
- void clear ()
- void insert (const QColor &c)
- void remove (const QColor &c)
- ColourList & operator+= (const QColor &c)
- ColourList & operator+= (const ColourList &list)
- bool operator== (const ColourList &l) const
- bool operator!= (const ColourList &l) const
- size_type count () const
- bool isEmpty () const
- const_iterator begin () const
- const_iterator end () const
- const_iterator fromLast () const
- const_iterator at (size_type i) const
- size_type contains (const QColor &c) const
- const_iterator find (const QColor &c) const
- const_iterator find (const_iterator it, const QColor &c) const
- int findIndex (const QColor &c) const
- QColor first () const
- QColor last () const
- QColor operator[] (size_type i) const
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
|
Constructs an empty list.
|
|
Copy constructor.
|
|
Constructs a list whose values are preset to the colours in
|
|
Constructs a list whose values are preset to the colours in the
Terminate |
Member Function Documentation
|
Assignment operator.
|
|
Sets the list to comprise the colours in
|
|
Removes all values from the list.
|
|
Adds the specified colour
|
|
Removes the colour
|
|
Adds the specified colour
|
|
Adds the colours in
|
|
Returns true if the colours in the two lists are the same.
|
|
Returns true if the colours in the two lists differ.
|
|
Returns the number of colours in the list.
|
|
Returns true if the list is empty.
|
|
Returns an iterator pointing to the first colour in the list.
|
|
Returns an iterator pointing past the last colour in the list.
|
|
Returns an iterator pointing to the last colour in the list, or end() if the list is empty.
|
|
Returns an iterator pointing to the colour at position
|
|
Returns true if the list contains the colour
|
|
Returns an iterator pointing to the first occurrence of colour
Returns end() if colour |
|
Returns an iterator pointing to the first occurrence of colour
from position |
|
Returns the index to the first occurrence of colour
Returns -1 if colour |
|
Returns the first colour in the list. If the list is empty, the result is undefined. |
|
Returns the last colour in the list. If the list is empty, the result is undefined. |
|
Returns the colour at position If the item does not exist, the result is undefined. |
The documentation for this class was generated from the following files:
- colourlist.h
- colourlist.cpp