diff options
Diffstat (limited to 'kalarm/lib/colourlist.h')
-rw-r--r-- | kalarm/lib/colourlist.h | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/kalarm/lib/colourlist.h b/kalarm/lib/colourlist.h index ef641c04a..a20a44d6a 100644 --- a/kalarm/lib/colourlist.h +++ b/kalarm/lib/colourlist.h @@ -21,9 +21,9 @@ #ifndef COLOURLIST_H #define COLOURLIST_H -#include <qtl.h> -#include <qcolor.h> -#include <qvaluelist.h> +#include <tqtl.h> +#include <tqcolor.h> +#include <tqvaluelist.h> /** @@ -31,8 +31,8 @@ * * 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. + * It provides a sorted TQValueList of colours in RGB value order, with iterators + * and other access methods which return either QRgb or TQColor objects. * * @author David Jarvie <software@astrojar.org.uk> */ @@ -40,30 +40,30 @@ class ColourList { public: typedef size_t size_type; - typedef QValueListConstIterator<QRgb> const_iterator; + typedef TQValueListConstIterator<QRgb> const_iterator; /** Constructs an empty list. */ ColourList() { } /** Copy constructor. */ ColourList(const ColourList& l) : mList(l.mList) { } /** Constructs a list whose values are preset to the colours in @p list. */ - ColourList(const QValueList<QRgb>& list) : mList(list) { qHeapSort(mList); } + ColourList(const TQValueList<QRgb>& list) : mList(list) { qHeapSort(mList); } /** Constructs a list whose values are preset to the colours in the @p list. * Terminate @p list by an invalid colour. */ - ColourList(const QColor* list); + ColourList(const TQColor* list); /** Assignment operator. */ ColourList& operator=(const ColourList& l) { mList = l.mList; return *this; } /** Sets the list to comprise the colours in @p list. */ - ColourList& operator=(const QValueList<QRgb>& list) { mList = list; qHeapSort(mList); return *this; } + ColourList& operator=(const TQValueList<QRgb>& list) { mList = list; qHeapSort(mList); return *this; } /** Removes all values from the list. */ void clear() { mList.clear(); } /** Adds the specified colour @p c to the list. */ - void insert(const QColor& c); + void insert(const TQColor& c); /** Removes the colour @p c from the list. */ - void remove(const QColor& c) { mList.remove(c.rgb()); } + void remove(const TQColor& c) { mList.remove(c.rgb()); } /** Adds the specified colour @p c to the list. */ - ColourList& operator+=(const QColor& c) { insert(c); return *this; } + ColourList& operator+=(const TQColor& c) { insert(c); return *this; } /** Adds the colours in @p list to this list. */ ColourList& operator+=(const ColourList& list) { mList += list.mList; qHeapSort(mList); return *this; } /** Returns true if the colours in the two lists are the same. */ @@ -83,28 +83,28 @@ class ColourList /** Returns an iterator pointing to the colour at position @p i in the list. */ const_iterator at(size_type i) const { return mList.at(i); } /** Returns true if the list contains the colour @p c. */ - size_type contains(const QColor& c) const { return mList.contains(c.rgb()); } + size_type contains(const TQColor& c) const { return mList.contains(c.rgb()); } /** Returns an iterator pointing to the first occurrence of colour @p c in the list. * Returns end() if colour @p c is not in the list. */ - const_iterator find(const QColor& c) const { return mList.find(c.rgb()); } + const_iterator find(const TQColor& c) const { return mList.find(c.rgb()); } /** Returns an iterator pointing to the first occurrence of colour @p c in the list, starting. * from position @p it. Returns end() if colour @p c is not in the list. */ - const_iterator find(const_iterator it, const QColor& c) const { return mList.find(it, c.rgb()); } + const_iterator find(const_iterator it, const TQColor& c) const { return mList.find(it, c.rgb()); } /** Returns the index to the first occurrence of colour @p c in the list. * Returns -1 if colour @p c is not in the list. */ - int findIndex(const QColor& c) const { return mList.findIndex(c.rgb()); } + int findIndex(const TQColor& c) const { return mList.findIndex(c.rgb()); } /** Returns the first colour in the list. If the list is empty, the result is undefined. */ - QColor first() const { return QColor(mList.first()); } + TQColor first() const { return TQColor(mList.first()); } /** Returns the last colour in the list. If the list is empty, the result is undefined. */ - QColor last() const { return QColor(mList.last()); } + TQColor last() const { return TQColor(mList.last()); } /** Returns the colour at position @p i in the list. If the item does not exist, the result is undefined. */ - QColor operator[](size_type i) const { return QColor(mList[i]); } + TQColor operator[](size_type i) const { return TQColor(mList[i]); } private: void sort(); - QValueList<QRgb> mList; + TQValueList<QRgb> mList; }; #endif // COLOURLIST_H |