kmail Library API Documentation

kmmsglist.h

00001 /* List of basic messages. Used in the KMFolder class.
00002  * Author: Stefan Taferner <taferner@kde.org>
00003  * This code is under GPL.
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 /*kmmsglist_h*/
KDE Logo
This file is part of the documentation for kmail Library Version 3.2.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sat May 1 11:37:33 2004 by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2003