From 7be55ffa061c026e35e2d6a0effe1161ddb0d41f Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:53:50 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kalarm/lib/colourlist.h | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'kalarm/lib/colourlist.h') 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 -#include -#include +#include +#include +#include /** @@ -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 */ @@ -40,30 +40,30 @@ class ColourList { public: typedef size_t size_type; - typedef QValueListConstIterator const_iterator; + typedef TQValueListConstIterator 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& list) : mList(list) { qHeapSort(mList); } + ColourList(const TQValueList& 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& list) { mList = list; qHeapSort(mList); return *this; } + ColourList& operator=(const TQValueList& 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 mList; + TQValueList mList; }; #endif // COLOURLIST_H -- cgit v1.2.1