kmmsglist.h
00001
00002
00003
00004
00005 #ifndef kmmsglist_h
00006 #define kmmsglist_h
00007
00008 #include "kmmsgbase.h"
00009
00010 #include <qmemarray.h>
00011
00012 class KMMsgDict;
00013
00014 class KMMsgList: public QMemArray<KMMsgBase*>
00015 {
00016 public:
00018 typedef enum { sfNone=99, sfStatus=0, sfFrom=1, sfSubject=2, sfDate=3 } SortField;
00019
00021 KMMsgList(int initialSize=32);
00022
00024 ~KMMsgList();
00025
00028 void remove(unsigned int idx);
00029
00032 KMMsgBase* take(unsigned int idx);
00033
00036 void insert(unsigned int idx, KMMsgBase* msg, bool syncDict = true);
00037
00041 unsigned int append(KMMsgBase* msg, bool syncDict = true);
00042
00046 void clear(bool autoDelete=TRUE, bool syncDict = false);
00047
00050 bool resize(unsigned int size);
00051
00054 bool reset(unsigned int size);
00055
00059 void set(unsigned int idx, KMMsgBase* msg);
00060
00062 unsigned int high() const { return mHigh; }
00063
00065 unsigned int count() const { return mCount; }
00066
00069 void fillMsgDict(KMMsgDict *dict);
00070
00071 protected:
00073 void rethinkHigh();
00074
00075 unsigned int mHigh, mCount;
00076 };
00077
00078
00079 #endif
This file is part of the documentation for kmail Library Version 3.2.2.