From 38240090027bd68d8dd15d7d46ecf17792edb732 Mon Sep 17 00:00:00 2001 From: zecke Date: Wed, 25 Sep 2002 11:59:24 +0000 Subject: Add a sort function and filter function to TodoAccess This would allow us todo a paint hack in QTable --- (limited to 'libopie2/opiepim/orecordlist.h') diff --git a/libopie2/opiepim/orecordlist.h b/libopie2/opiepim/orecordlist.h index c63d813..1fd0741 100644 --- a/libopie2/opiepim/orecordlist.h +++ b/libopie2/opiepim/orecordlist.h @@ -46,17 +46,17 @@ public: bool operator==( const ORecordListIterator& it ); bool operator!=( const ORecordListIterator& it ); - + /** * the current item */ uint current()const; - + /** * the number of items */ uint count()const; - + /** * sets the current item */ @@ -101,12 +101,13 @@ public: * the end */ Iterator end(); - + /** * the number of items in the list */ uint count()const; - + + T operator[]( uint i ); // FIXME implemenent remove /* ConstIterator begin()const; @@ -146,7 +147,7 @@ ORecordListIterator &ORecordListIterator::operator=( const ORecordListIter m_current = it.m_current; m_temp = it.m_temp; m_end = it.m_end; -// m_record = it.m_record; + m_record = it.m_record; return *this; } @@ -252,4 +253,8 @@ template uint ORecordList::count()const { return m_ids.count(); } +template +T ORecordList::operator[]( uint i ) { + return m_acc->find( m_ids[i] ); +} #endif -- cgit v0.9.0.2