00001 /********************************************************************** 00002 ** Copyright (C) 2001 Trolltech AS. All rights reserved. 00003 ** 00004 ** This file is part of Qt Palmtop Environment. 00005 ** 00006 ** This file may be distributed and/or modified under the terms of the 00007 ** GNU General Public License version 2 as published by the Free Software 00008 ** Foundation and appearing in the file LICENSE.GPL included in the 00009 ** packaging of this file. 00010 ** 00011 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 00012 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 00013 ** 00014 ** See http://www.trolltech.com/gpl/ for GPL licensing information. 00015 ** 00016 ** Contact info@trolltech.com if any conditions of this licensing are 00017 ** not clear to you. 00018 ** 00019 **********************************************************************/ 00020 #ifndef READMAIL_H 00021 #define READMAIL_H 00022 00023 #include <qaction.h> 00024 #include <qmainwindow.h> 00025 #include <qmenubar.h> 00026 #include <qpopupmenu.h> 00027 #include <qlabel.h> 00028 #include <qlistview.h> 00029 #include <qlayout.h> 00030 #include <qtextview.h> 00031 #include <qtoolbutton.h> 00032 00033 #include "emailhandler.h" 00034 #include "emaillistitem.h" 00035 #include "viewatt.h" 00036 00037 class ReadMail : public QMainWindow 00038 { 00039 Q_OBJECT 00040 00041 public: 00042 ReadMail( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); 00043 ~ReadMail(); 00044 void update(QListView *thisView, Email *mailIn); 00045 void updateView(); 00046 void mailUpdated(Email *mailIn); 00047 00048 signals: 00049 void cancelView(); 00050 void replyRequested(Email &, bool &); 00051 void forwardRequested(Email&); 00052 void removeItem(EmailListItem *, bool &); 00053 void viewingMail(Email *); 00054 void download (Email*); 00055 00056 public slots: 00057 void close(); 00058 void next(); 00059 void previous(); 00060 void deleteItem(); 00061 void shiftText(); 00062 void viewAttachments(); 00063 void reply(); 00064 void replyAll(); 00065 void forward(); 00066 void download(); 00067 00068 private: 00069 void init(); 00070 void updateButtons(); 00071 00072 private: 00073 QListView *view; 00074 EmailListItem *item; 00075 bool plainTxt, inbox; 00076 Email *mail; 00077 ViewAtt *viewAtt; 00078 00079 QToolBar *bar; 00080 QMenuBar *menu; 00081 QPopupMenu *viewMenu, *mailMenu; 00082 QAction *deleteButton; 00083 QMimeSourceFactory *mime; 00084 QAction *plainTextButton; 00085 QAction *nextButton; 00086 QTextView *emailView; 00087 QAction *attachmentButton; 00088 QAction *previousButton; 00089 QToolButton *replyButton; 00090 QAction *forwardButton; 00091 QAction *replyAllButton; 00092 QAction *downloadButton; 00093 }; 00094 00095 #endif // READMAIL_H
1.4.2