26 #include <tqvaluelist.h>
42 typedef size_t size_type;
43 typedef TQValueListConstIterator<TQRgb> const_iterator;
50 ColourList( const TQValueList<TQRgb>& list) : mList(list) { qHeapSort(mList); }
58 ColourList& operator=( const TQValueList<TQRgb>& list) { mList = list; qHeapSort(mList); return * this; }
62 void insert( const TQColor& c);
64 void remove( const TQColor& c) { mList.remove(c.rgb()); }
74 size_type count() const { return mList.count(); }
76 bool isEmpty() const { return mList.isEmpty(); }
78 const_iterator begin() const { return mList.begin(); }
80 const_iterator end() const { return mList.end(); }
82 const_iterator fromLast() const { return mList.fromLast(); }
84 const_iterator at(size_type i) const { return mList.at(i); }
86 size_type contains( const TQColor& c) const { return mList.contains(c.rgb()); }
90 const_iterator find( const TQColor& c) const { return mList.find(c.rgb()); }
94 const_iterator find(const_iterator it, const TQColor& c) const { return mList.find(it, c.rgb()); }
98 int findIndex( const TQColor& c) const { return mList.findIndex(c.rgb()); }
100 TQColor first() const { return TQColor(mList.first()); }
102 TQColor last() const { return TQColor(mList.last()); }
104 TQColor operator[](size_type i) const { return TQColor(mList[i]); }
107 TQValueList<TQRgb> mList;
110 #endif // COLOURLIST_H
|