showrecord.h

00001 /***************************************************************************
00002                           showrecord.h  -  description
00003                              -------------------
00004     begin                : Mon Dec 3 2001
00005     copyright            : (C) 2001 by Eggert Ehmke
00006     email                : eggert.ehmke@berlin.de
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00018 #ifndef SHOWRECORD_H
00019 #define SHOWRECORD_H
00020 
00021 //C++ header
00022 #include <iostream>
00023 
00024 //Qt headers
00025 #include <qdom.h>
00026 #include <qptrlist.h>
00027 
00028 //KDE headers
00029 #include <kstandarddirs.h>
00030 #include <kdebug.h>
00031 
00032 //KShowmail headers
00033 #include "kshowmailview.h"
00034 #include "showrecordelem.h"
00035 #include "types.h"
00036 
00037 using namespace Types;
00038 using namespace std;
00039 
00040 //forward class declarations
00041 class ShowRecordElem;
00042 class KshowmailView;
00043 
00054 class ShowRecord: public QPtrList<ShowRecordElem>
00055 {
00056 
00057   public:
00058 
00063     static const int continueShowHeaders;
00064 
00069     static const int cancelShowHeaders;
00070 
00074     ShowRecord();
00075 
00080     ~ShowRecord();
00081 
00088     void saveOptions( QDomDocument& doc, QDomElement& parent );
00089 
00096     void readStoredMails( QDomElement& parent );
00097 
00102     void applyFilters();
00103 
00110     bool hasSelectedMails();
00111 
00116     Types::MailNumberList_Type getSelectedMails();
00117 
00122     void removeMail( int number );
00123 
00128     QStringList getSelectedSubjects() const;
00129 
00135     QString getSenderOf( int number ) const;
00136 
00142     QString getDateOf( int number ) const;
00143 
00149     QString getSizeOf( int number ) const;
00150 
00156     QString getSubjectOf( int number ) const;
00157 
00170     QString decodeMailBody( QByteArray body, int number, bool preferHTML ) const;
00171 
00178     bool hasMail( QString uid );
00179 
00186     bool isNew( QString uid ) const;
00187 
00194     void appendNewMail( int number, QString uid, bool isNew );
00195 
00200     void printMailList();
00201 
00207     void setSize( int number, long size );
00208 
00213     Types::MailNumberList_Type getNewMails();
00214 
00220     void setHeader( int number, QString header );
00221 
00226     QStringList getUIDsOfOldMails();
00227 
00233     QString getHeaderOf( QString uid );
00234 
00240     void setHeader( QString uid, QString header );
00241 
00246     int getNumberNewMails();
00247 
00252     int getNumberMails();
00253 
00258     long getTotalSize();
00259 
00266     void fillMailListView( KshowmailView* view, QString& account );
00267 
00274     int showSelectedHeaders( QString& account );
00275 
00276 
00277 };
00278 
00279 #endif

Generated on Thu Jul 5 19:36:07 2007 for kshowmail by  doxygen 1.5.0