summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/composemail.cpp1
-rw-r--r--kmicromail/mailistviewitem.cpp1
-rw-r--r--kmicromail/mailistviewitem.h1
-rw-r--r--kmicromail/main.cpp1
-rw-r--r--kmicromail/mainwindow.cpp2
-rw-r--r--kmicromail/mainwindow.h2
-rw-r--r--kmicromail/opiemail.cpp1
-rw-r--r--kmicromail/viewmail.cpp1
-rw-r--r--kmicromail/viewmailbase.cpp1
-rw-r--r--kmicromail/viewmailbase.h1
10 files changed, 12 insertions, 0 deletions
diff --git a/kmicromail/composemail.cpp b/kmicromail/composemail.cpp
index 9060364..654cfc0 100644
--- a/kmicromail/composemail.cpp
+++ b/kmicromail/composemail.cpp
@@ -1,48 +1,49 @@
1// CHANGED 2004-08-06 Lutz Rogowski
1 2
2#include "composemail.h" 3#include "composemail.h"
3 4
4#include <libmailwrapper/smtpwrapper.h> 5#include <libmailwrapper/smtpwrapper.h>
5#include <libmailwrapper/storemail.h> 6#include <libmailwrapper/storemail.h>
6#include <libmailwrapper/abstractmail.h> 7#include <libmailwrapper/abstractmail.h>
7#include <libmailwrapper/mailtypes.h> 8#include <libmailwrapper/mailtypes.h>
8 9
9/* OPIE */ 10/* OPIE */
10//#include <opie2/ofiledialog.h> 11//#include <opie2/ofiledialog.h>
11//#include <opie2/odebug.h> 12//#include <opie2/odebug.h>
12#include <kfiledialog.h> 13#include <kfiledialog.h>
13//#include <qpe/resource.h> 14//#include <qpe/resource.h>
14#include <qpe/config.h> 15#include <qpe/config.h>
15#include <qpe/global.h> 16#include <qpe/global.h>
16//#include <qpe/contact.h> 17//#include <qpe/contact.h>
17 18
18 19
19#include <qcombobox.h> 20#include <qcombobox.h>
20#include <qcheckbox.h> 21#include <qcheckbox.h>
21#include <qtimer.h> 22#include <qtimer.h>
22#include <qmessagebox.h> 23#include <qmessagebox.h>
23#include <qpushbutton.h> 24#include <qpushbutton.h>
24#include <qmultilineedit.h> 25#include <qmultilineedit.h>
25#include <qlabel.h> 26#include <qlabel.h>
26#include <qtabwidget.h> 27#include <qtabwidget.h>
27#include <qlistview.h> 28#include <qlistview.h>
28#include <kabc/addresseedialog.h> 29#include <kabc/addresseedialog.h>
29#include <kabc/stdaddressbook.h> 30#include <kabc/stdaddressbook.h>
30#include <kabc/addressee.h> 31#include <kabc/addressee.h>
31 32
32 33
33 34
34//using namespace Opie::Core; 35//using namespace Opie::Core;
35//using namespace Opie::Ui; 36//using namespace Opie::Ui;
36ComposeMail::ComposeMail( Settings *s, QWidget *parent, const char *name, bool modal, WFlags flags ) 37ComposeMail::ComposeMail( Settings *s, QWidget *parent, const char *name, bool modal, WFlags flags )
37 : ComposeMailUI( parent, name, modal, flags ) 38 : ComposeMailUI( parent, name, modal, flags )
38{ 39{
39 40
40 settings = s; 41 settings = s;
41 m_replyid = ""; 42 m_replyid = "";
42 KABC::Addressee con = KABC::StdAddressBook::self()->whoAmI( ); 43 KABC::Addressee con = KABC::StdAddressBook::self()->whoAmI( );
43 QStringList mails = con.emails(); 44 QStringList mails = con.emails();
44 QString defmail = con.preferredEmail(); 45 QString defmail = con.preferredEmail();
45 if ( mails.count() == 0) 46 if ( mails.count() == 0)
46 QMessageBox::information( 0, tr( "Hint" ), 47 QMessageBox::information( 0, tr( "Hint" ),
47 tr( "Please apply\n\"Set Who Am I\"\nin KA/Pi to get the from\nfield automatically filled out!\n" ), 48 tr( "Please apply\n\"Set Who Am I\"\nin KA/Pi to get the from\nfield automatically filled out!\n" ),
48 tr( "Ok" ) ); 49 tr( "Ok" ) );
diff --git a/kmicromail/mailistviewitem.cpp b/kmicromail/mailistviewitem.cpp
index 1ca0ada..b92b0cf 100644
--- a/kmicromail/mailistviewitem.cpp
+++ b/kmicromail/mailistviewitem.cpp
@@ -1,48 +1,49 @@
1// CHANGED 2004-08-06 Lutz Rogowski
1#include "mailistviewitem.h" 2#include "mailistviewitem.h"
2#include <libmailwrapper/abstractmail.h> 3#include <libmailwrapper/abstractmail.h>
3#include <qtextstream.h> 4#include <qtextstream.h>
4#include <kiconloader.h> 5#include <kiconloader.h>
5//#include <qpe/resource.h> 6//#include <qpe/resource.h>
6 7
7MailListViewItem::MailListViewItem(QListView * parent, MailListViewItem * item ) 8MailListViewItem::MailListViewItem(QListView * parent, MailListViewItem * item )
8 :QListViewItem(parent,item),mail_data() 9 :QListViewItem(parent,item),mail_data()
9{ 10{
10} 11}
11 12
12void MailListViewItem::showEntry() 13void MailListViewItem::showEntry()
13{ 14{
14 if ( mail_data->getFlags().testBit( FLAG_ANSWERED ) == true) { 15 if ( mail_data->getFlags().testBit( FLAG_ANSWERED ) == true) {
15 setPixmap( 0, SmallIcon ( "kmmsgreplied") ); 16 setPixmap( 0, SmallIcon ( "kmmsgreplied") );
16 } else if ( mail_data->getFlags().testBit( FLAG_SEEN ) == true ) { 17 } else if ( mail_data->getFlags().testBit( FLAG_SEEN ) == true ) {
17 /* I think it looks nicer if there are not such a log of icons but only on mails 18 /* I think it looks nicer if there are not such a log of icons but only on mails
18 replied or new - Alwin*/ 19 replied or new - Alwin*/
19 //setPixmap( 0,SmallIcon ("kmmsgunseen") ); 20 //setPixmap( 0,SmallIcon ("kmmsgunseen") );
20 } else { 21 } else {
21 setPixmap( 0,SmallIcon ( "kmmsgnew") ); 22 setPixmap( 0,SmallIcon ( "kmmsgnew") );
22 } 23 }
23 double s = mail_data->Msgsize(); 24 double s = mail_data->Msgsize();
24 int w = 0; 25 int w = 0;
25 s/=1024; 26 s/=1024;
26 if (s>999.0) { 27 if (s>999.0) {
27 s/=1024.0; 28 s/=1024.0;
28 ++w; 29 ++w;
29 } 30 }
30 QString fsort; 31 QString fsort;
31 fsort.sprintf( "%.2f", s ); 32 fsort.sprintf( "%.2f", s );
32 QString fsize = QString::number( s, 'f', 2 ); 33 QString fsize = QString::number( s, 'f', 2 );
33 // 1.23 34 // 1.23
34 // 11.23 35 // 11.23
35 // 111.23 36 // 111.23
36 // 999.23 maxlen 37 // 999.23 maxlen
37 switch(fsize.length() ) { 38 switch(fsize.length() ) {
38 case 4: 39 case 4:
39 fsort = "00" + fsize ; 40 fsort = "00" + fsize ;
40 break; 41 break;
41 case 5: 42 case 5:
42 fsort = "0" + fsize ; 43 fsort = "0" + fsize ;
43 break; 44 break;
44 default: 45 default:
45 fsort = fsize ; 46 fsort = fsize ;
46 break; 47 break;
47 48
48 } 49 }
diff --git a/kmicromail/mailistviewitem.h b/kmicromail/mailistviewitem.h
index cf8040b..0fd44d3 100644
--- a/kmicromail/mailistviewitem.h
+++ b/kmicromail/mailistviewitem.h
@@ -1,26 +1,27 @@
1// CHANGED 2004-08-06 Lutz Rogowski
1#ifndef __MAILLISTVIEWITEM_H 2#ifndef __MAILLISTVIEWITEM_H
2#define __MAILLISTVIEWITEM_H 3#define __MAILLISTVIEWITEM_H
3 4
4#include <qlistview.h> 5#include <qlistview.h>
5#include <libmailwrapper/mailtypes.h> 6#include <libmailwrapper/mailtypes.h>
6#include <libmailwrapper/maildefines.h> 7#include <libmailwrapper/maildefines.h>
7 8
8class MailListViewItem:public QListViewItem 9class MailListViewItem:public QListViewItem
9{ 10{
10public: 11public:
11 MailListViewItem(QListView * parent, MailListViewItem * after ); 12 MailListViewItem(QListView * parent, MailListViewItem * after );
12 virtual ~MailListViewItem(){} 13 virtual ~MailListViewItem(){}
13 14
14 void storeData(const RecMailP&data); 15 void storeData(const RecMailP&data);
15 const RecMailP&data()const; 16 const RecMailP&data()const;
16 void showEntry(); 17 void showEntry();
17 MAILLIB::ATYPE wrapperType(); 18 MAILLIB::ATYPE wrapperType();
18 QString key(int column, bool) const; 19 QString key(int column, bool) const;
19 void setSortKey(int column,const QString &key); 20 void setSortKey(int column,const QString &key);
20protected: 21protected:
21 RecMailP mail_data; 22 RecMailP mail_data;
22 private: 23 private:
23 QMap<int,QString> mKeyMap; 24 QMap<int,QString> mKeyMap;
24}; 25};
25 26
26#endif 27#endif
diff --git a/kmicromail/main.cpp b/kmicromail/main.cpp
index 8a093c6..22f1200 100644
--- a/kmicromail/main.cpp
+++ b/kmicromail/main.cpp
@@ -1,48 +1,49 @@
1// CHANGED 2004-08-06 Lutz Rogowski
1 2
2#ifndef DESKTOP_VERSION 3#ifndef DESKTOP_VERSION
3#include <qpe/qpeapplication.h> 4#include <qpe/qpeapplication.h>
4#include <stdlib.h> 5#include <stdlib.h>
5#else 6#else
6#include <qapplication.h> 7#include <qapplication.h>
7#include <qstring.h> 8#include <qstring.h>
8#include <qwindowsstyle.h> 9#include <qwindowsstyle.h>
9#include <qplatinumstyle.h> 10#include <qplatinumstyle.h>
10#include <qsgistyle.h> 11#include <qsgistyle.h>
11#endif 12#endif
12#include "opiemail.h" 13#include "opiemail.h"
13#include <qdir.h> 14#include <qdir.h>
14#include <kstandarddirs.h> 15#include <kstandarddirs.h>
15#include <kglobal.h> 16#include <kglobal.h>
16#include <stdio.h> 17#include <stdio.h>
17#include "mainwindow.h" 18#include "mainwindow.h"
18 19
19using namespace Opie::Core; 20using namespace Opie::Core;
20int main( int argc, char **argv ) { 21int main( int argc, char **argv ) {
21 22
22#ifndef DESKTOP_VERSION 23#ifndef DESKTOP_VERSION
23 QPEApplication a( argc, argv ); 24 QPEApplication a( argc, argv );
24 a.setKeepRunning (); 25 a.setKeepRunning ();
25#else 26#else
26 QApplication a( argc, argv ); 27 QApplication a( argc, argv );
27 QApplication::setStyle( new QPlatinumStyle ()); 28 QApplication::setStyle( new QPlatinumStyle ());
28#endif 29#endif
29 30
30 KGlobal::setAppName( "kmicromail" ); 31 KGlobal::setAppName( "kmicromail" );
31 QString fileName ; 32 QString fileName ;
32#ifndef DESKTOP_VERSION 33#ifndef DESKTOP_VERSION
33 fileName = getenv("QPEDIR"); 34 fileName = getenv("QPEDIR");
34 if ( QApplication::desktop()->width() > 320 ) 35 if ( QApplication::desktop()->width() > 320 )
35 KGlobal::iconLoader()->setIconPath( fileName +"/pics/kdepim/kmicromail/icons22/"); 36 KGlobal::iconLoader()->setIconPath( fileName +"/pics/kdepim/kmicromail/icons22/");
36 else 37 else
37 KGlobal::iconLoader()->setIconPath( fileName +"/pics/kdepim/kmicromail/"); 38 KGlobal::iconLoader()->setIconPath( fileName +"/pics/kdepim/kmicromail/");
38#else 39#else
39 fileName = qApp->applicationDirPath () + "/kdepim/kmicromail/"; 40 fileName = qApp->applicationDirPath () + "/kdepim/kmicromail/";
40 KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName)); 41 KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName));
41#endif 42#endif
42 KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "kmicromail"))); 43 KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "kmicromail")));
43 OpieMail mw; 44 OpieMail mw;
44#ifndef DESKTOP_VERSION 45#ifndef DESKTOP_VERSION
45 //qDebug("CONNECT "); 46 //qDebug("CONNECT ");
46 QObject::connect( &a, SIGNAL (appMessage ( const QCString &, const QByteArray & )),&mw, SLOT(message( const QCString&, const QByteArray& ))); 47 QObject::connect( &a, SIGNAL (appMessage ( const QCString &, const QByteArray & )),&mw, SLOT(message( const QCString&, const QByteArray& )));
47 a.showMainWidget(&mw ); 48 a.showMainWidget(&mw );
48#else 49#else
diff --git a/kmicromail/mainwindow.cpp b/kmicromail/mainwindow.cpp
index e020297..2de5b40 100644
--- a/kmicromail/mainwindow.cpp
+++ b/kmicromail/mainwindow.cpp
@@ -1,48 +1,50 @@
1
2// CHANGED 2004-08-06 Lutz Rogowski
1#include <qlabel.h> 3#include <qlabel.h>
2#include <qvbox.h> 4#include <qvbox.h>
3#include <qheader.h> 5#include <qheader.h>
4#include <qtimer.h> 6#include <qtimer.h>
5#include <qlayout.h> 7#include <qlayout.h>
6#include <kdialog.h> 8#include <kdialog.h>
7#include <kiconloader.h> 9#include <kiconloader.h>
8#include <kapplication.h> 10#include <kapplication.h>
9 11
10#ifndef DESKTOP_VERSION 12#ifndef DESKTOP_VERSION
11#include <qpe/qpeapplication.h> 13#include <qpe/qpeapplication.h>
12#endif 14#endif
13#include "defines.h" 15#include "defines.h"
14#include "mainwindow.h" 16#include "mainwindow.h"
15#include <KDGanttMinimizeSplitter.h> 17#include <KDGanttMinimizeSplitter.h>
16 18
17 19
18#include <kabc/stdaddressbook.h> 20#include <kabc/stdaddressbook.h>
19 21
20MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) 22MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags )
21 : QMainWindow( parent, name ) //, flags ) 23 : QMainWindow( parent, name ) //, flags )
22{ 24{
23 setCaption( tr( "OpieMail/Pi" ) ); 25 setCaption( tr( "OpieMail/Pi" ) );
24 setToolBarsMovable( false ); 26 setToolBarsMovable( false );
25 KABC::StdAddressBook::self(); 27 KABC::StdAddressBook::self();
26 toolBar = new QToolBar( this ); 28 toolBar = new QToolBar( this );
27 menuBar = new QMenuBar( toolBar ); 29 menuBar = new QMenuBar( toolBar );
28 mailMenu = new QPopupMenu( menuBar ); 30 mailMenu = new QPopupMenu( menuBar );
29 menuBar->insertItem( tr( "Mail" ), mailMenu ); 31 menuBar->insertItem( tr( "Mail" ), mailMenu );
30 settingsMenu = new QPopupMenu( menuBar ); 32 settingsMenu = new QPopupMenu( menuBar );
31 menuBar->insertItem( tr( "Settings" ), settingsMenu ); 33 menuBar->insertItem( tr( "Settings" ), settingsMenu );
32 34
33 addToolBar( toolBar ); 35 addToolBar( toolBar );
34 toolBar->setHorizontalStretchable( true ); 36 toolBar->setHorizontalStretchable( true );
35 37
36 38
37 39
38 composeMail = new QAction( tr( "Compose new mail" ), SmallIcon("composemail"), 40 composeMail = new QAction( tr( "Compose new mail" ), SmallIcon("composemail"),
39 0, 0, this ); 41 0, 0, this );
40 composeMail->addTo( toolBar ); 42 composeMail->addTo( toolBar );
41 composeMail->addTo( mailMenu ); 43 composeMail->addTo( mailMenu );
42 44
43 sendQueued = new QAction( tr( "Send queued mails" ), SmallIcon("sendqueued") , 45 sendQueued = new QAction( tr( "Send queued mails" ), SmallIcon("sendqueued") ,
44 0, 0, this ); 46 0, 0, this );
45 sendQueued->addTo( toolBar ); 47 sendQueued->addTo( toolBar );
46 sendQueued->addTo( mailMenu ); 48 sendQueued->addTo( mailMenu );
47 49
48 /* 50 /*
diff --git a/kmicromail/mainwindow.h b/kmicromail/mainwindow.h
index d6dc6cc..f5b81aa 100644
--- a/kmicromail/mainwindow.h
+++ b/kmicromail/mainwindow.h
@@ -1,48 +1,50 @@
1
2// CHANGED 2004-08-06 Lutz Rogowski
1#ifndef MAINWINDOW_H 3#ifndef MAINWINDOW_H
2#define MAINWINDOW_H 4#define MAINWINDOW_H
3 5
4#include <qmainwindow.h> 6#include <qmainwindow.h>
5#include <qlistview.h> 7#include <qlistview.h>
6#include <qaction.h> 8#include <qaction.h>
7 9
8#include <qtoolbar.h> 10#include <qtoolbar.h>
9#include <qmenubar.h> 11#include <qmenubar.h>
10 12
11#include "accountview.h" 13#include "accountview.h"
12#include "statuswidget.h" 14#include "statuswidget.h"
13 15
14#include <libmailwrapper/mailtypes.h> 16#include <libmailwrapper/mailtypes.h>
15#include <opie2/osmartpointer.h> 17#include <opie2/osmartpointer.h>
16 18
17class RecMail; 19class RecMail;
18 20
19class MainWindow : public QMainWindow 21class MainWindow : public QMainWindow
20{ 22{
21 Q_OBJECT 23 Q_OBJECT
22 24
23public: 25public:
24 MainWindow( QWidget *parent = 0, const char *name = 0, WFlags flags = 0 ); 26 MainWindow( QWidget *parent = 0, const char *name = 0, WFlags flags = 0 );
25 virtual ~MainWindow(); 27 virtual ~MainWindow();
26 28
27public slots: 29public slots:
28 virtual void slotAdjustColumns(); 30 virtual void slotAdjustColumns();
29 virtual void appMessage(const QCString &msg, const QByteArray &data); 31 virtual void appMessage(const QCString &msg, const QByteArray &data);
30 virtual void slotComposeMail(); 32 virtual void slotComposeMail();
31 33
32protected slots: 34protected slots:
33 virtual void slotSendQueued(); 35 virtual void slotSendQueued();
34 virtual void slotEditAccounts(); 36 virtual void slotEditAccounts();
35 virtual void slotShowFolders( bool show ); 37 virtual void slotShowFolders( bool show );
36 virtual void refreshMailView(const QValueList<RecMailP>&); 38 virtual void refreshMailView(const QValueList<RecMailP>&);
37 virtual void displayMail(); 39 virtual void displayMail();
38 virtual void slotDeleteMail(); 40 virtual void slotDeleteMail();
39 virtual void mailHold(int, QListViewItem *,const QPoint&,int); 41 virtual void mailHold(int, QListViewItem *,const QPoint&,int);
40 virtual void slotAdjustLayout(); 42 virtual void slotAdjustLayout();
41 virtual void slotEditSettings(); 43 virtual void slotEditSettings();
42 virtual void mailLeftClicked( QListViewItem * ); 44 virtual void mailLeftClicked( QListViewItem * );
43 void showLicence(); 45 void showLicence();
44 void showAbout(); 46 void showAbout();
45 void showEtpanLicence(); 47 void showEtpanLicence();
46 48
47protected: 49protected:
48 QToolBar *toolBar; 50 QToolBar *toolBar;
diff --git a/kmicromail/opiemail.cpp b/kmicromail/opiemail.cpp
index 70fbcb2..d522ad0 100644
--- a/kmicromail/opiemail.cpp
+++ b/kmicromail/opiemail.cpp
@@ -1,48 +1,49 @@
1// CHANGED 2004-08-06 Lutz Rogowski
1 2
2#include "settingsdialog.h" 3#include "settingsdialog.h"
3#include "opiemail.h" 4#include "opiemail.h"
4#include "editaccounts.h" 5#include "editaccounts.h"
5#include "composemail.h" 6#include "composemail.h"
6#include "mailistviewitem.h" 7#include "mailistviewitem.h"
7#include "viewmail.h" 8#include "viewmail.h"
8#include "selectstore.h" 9#include "selectstore.h"
9#include "selectsmtp.h" 10#include "selectsmtp.h"
10 11
11#include <qmessagebox.h> 12#include <qmessagebox.h>
12 13
13#include <qpe/qpeapplication.h> 14#include <qpe/qpeapplication.h>
14#include <libmailwrapper/smtpwrapper.h> 15#include <libmailwrapper/smtpwrapper.h>
15#include <libmailwrapper/mailtypes.h> 16#include <libmailwrapper/mailtypes.h>
16#include <libmailwrapper/abstractmail.h> 17#include <libmailwrapper/abstractmail.h>
17/* OPIE */ 18/* OPIE */
18//#include <qpe/resource.h> 19//#include <qpe/resource.h>
19#include <qpe/qpeapplication.h> 20#include <qpe/qpeapplication.h>
20 21
21/* QT */ 22/* QT */
22 23
23using namespace Opie::Core; 24using namespace Opie::Core;
24 25
25OpieMail::OpieMail( QWidget *parent, const char *name, WFlags flags ) 26OpieMail::OpieMail( QWidget *parent, const char *name, WFlags flags )
26 : MainWindow( parent, name) //, WStyle_ContextHelp ) 27 : MainWindow( parent, name) //, WStyle_ContextHelp )
27{ 28{
28 settings = new Settings(); 29 settings = new Settings();
29 30
30 folderView->populate( settings->getAccounts() ); 31 folderView->populate( settings->getAccounts() );
31 32
32} 33}
33 34
34OpieMail::~OpieMail() 35OpieMail::~OpieMail()
35{ 36{
36 if (settings) delete settings; 37 if (settings) delete settings;
37} 38}
38 39
39void OpieMail::appMessage(const QCString &msg, const QByteArray &data) 40void OpieMail::appMessage(const QCString &msg, const QByteArray &data)
40{ 41{
41 42
42} 43}
43#include <stdlib.h> 44#include <stdlib.h>
44void OpieMail::message(const QCString &msg, const QByteArray &data) 45void OpieMail::message(const QCString &msg, const QByteArray &data)
45{ 46{
46 // copied from old mail2 47 // copied from old mail2
47 static int ii = 0; 48 static int ii = 0;
48 49
diff --git a/kmicromail/viewmail.cpp b/kmicromail/viewmail.cpp
index 703711d..67b77f8 100644
--- a/kmicromail/viewmail.cpp
+++ b/kmicromail/viewmail.cpp
@@ -1,48 +1,49 @@
1// CHANGED 2004-08-06 Lutz Rogowski
1#include "composemail.h" 2#include "composemail.h"
2#include "viewmail.h" 3#include "viewmail.h"
3 4
4#include <libmailwrapper/settings.h> 5#include <libmailwrapper/settings.h>
5#include <libmailwrapper/abstractmail.h> 6#include <libmailwrapper/abstractmail.h>
6#include <libmailwrapper/mailtypes.h> 7#include <libmailwrapper/mailtypes.h>
7#include <kapplication.h> 8#include <kapplication.h>
8 9
9/* OPIE */ 10/* OPIE */
10//#include <opie2/odebug.h> 11//#include <opie2/odebug.h>
11//#include <opie2/ofiledialog.h> 12//#include <opie2/ofiledialog.h>
12//#include <opie2/oimagescrollview.h> 13//#include <opie2/oimagescrollview.h>
13 14
14#include <kfiledialog.h> 15#include <kfiledialog.h>
15#include <kdialog.h> 16#include <kdialog.h>
16 17
17#include <qpe/config.h> 18#include <qpe/config.h>
18#include <qpe/qpeapplication.h> 19#include <qpe/qpeapplication.h>
19 20
20/* QT */ 21/* QT */
21#include <qtextbrowser.h> 22#include <qtextbrowser.h>
22#include <qmessagebox.h> 23#include <qmessagebox.h>
23#include <qtextstream.h> 24#include <qtextstream.h>
24#include <qaction.h> 25#include <qaction.h>
25#include <qpopupmenu.h> 26#include <qpopupmenu.h>
26#include <qfile.h> 27#include <qfile.h>
27#include <qlayout.h> 28#include <qlayout.h>
28 29
29//using namespace Opie::Ui; 30//using namespace Opie::Ui;
30//using namespace Opie::Core; 31//using namespace Opie::Core;
31 32
32AttachItem::AttachItem(QListView * parent,QListViewItem *after, const QString&mime,const QString&desc,const QString&file, 33AttachItem::AttachItem(QListView * parent,QListViewItem *after, const QString&mime,const QString&desc,const QString&file,
33 const QString&fsize,int num,const QValueList<int>&path) 34 const QString&fsize,int num,const QValueList<int>&path)
34 : QListViewItem(parent,after),_partNum(num) 35 : QListViewItem(parent,after),_partNum(num)
35{ 36{
36 _path=path; 37 _path=path;
37 setText(0, mime); 38 setText(0, mime);
38 setText(1, desc); 39 setText(1, desc);
39 setText(2, file); 40 setText(2, file);
40 setText(3, fsize); 41 setText(3, fsize);
41} 42}
42 43
43AttachItem::AttachItem(QListViewItem * parent,QListViewItem *after, const QString&mime,const QString&desc,const QString&file, 44AttachItem::AttachItem(QListViewItem * parent,QListViewItem *after, const QString&mime,const QString&desc,const QString&file,
44 const QString&fsize,int num,const QValueList<int>&path) 45 const QString&fsize,int num,const QValueList<int>&path)
45 : QListViewItem(parent,after),_partNum(num) 46 : QListViewItem(parent,after),_partNum(num)
46{ 47{
47 _path=path; 48 _path=path;
48 setText(0, mime); 49 setText(0, mime);
diff --git a/kmicromail/viewmailbase.cpp b/kmicromail/viewmailbase.cpp
index 584a0ac..705b57f 100644
--- a/kmicromail/viewmailbase.cpp
+++ b/kmicromail/viewmailbase.cpp
@@ -1,48 +1,49 @@
1// CHANGED 2004-08-06 Lutz Rogowski
1#include <qtextbrowser.h> 2#include <qtextbrowser.h>
2#include <qlistview.h> 3#include <qlistview.h>
3#include <qaction.h> 4#include <qaction.h>
4#include <qlabel.h> 5#include <qlabel.h>
5#include <qvbox.h> 6#include <qvbox.h>
6 7
7#include <qtoolbar.h> 8#include <qtoolbar.h>
8#include <qmenubar.h> 9#include <qmenubar.h>
9#include <kiconloader.h> 10#include <kiconloader.h>
10//#include <qpe/resource.h> 11//#include <qpe/resource.h>
11 12
12#include "viewmailbase.h" 13#include "viewmailbase.h"
13//#include "opendiag.h" 14//#include "opendiag.h"
14 15
15ViewMailBase::ViewMailBase(QWidget *parent, const char *name, WFlags fl) 16ViewMailBase::ViewMailBase(QWidget *parent, const char *name, WFlags fl)
16 : QMainWindow(parent, name, fl) 17 : QMainWindow(parent, name, fl)
17{ 18{
18 19
19 setToolBarsMovable(false); 20 setToolBarsMovable(false);
20 21
21 toolbar = new QToolBar(this); 22 toolbar = new QToolBar(this);
22 menubar = new QMenuBar( toolbar ); 23 menubar = new QMenuBar( toolbar );
23 mailmenu = new QPopupMenu( menubar ); 24 mailmenu = new QPopupMenu( menubar );
24 menubar->insertItem( tr( "Mail" ), mailmenu ); 25 menubar->insertItem( tr( "Mail" ), mailmenu );
25 26
26 toolbar->setHorizontalStretchable(true); 27 toolbar->setHorizontalStretchable(true);
27 addToolBar(toolbar); 28 addToolBar(toolbar);
28 29
29 reply = new QAction(tr("Reply"),SmallIcon("reply"), 0, 0, this); 30 reply = new QAction(tr("Reply"),SmallIcon("reply"), 0, 0, this);
30 reply->addTo(toolbar); 31 reply->addTo(toolbar);
31 reply->addTo(mailmenu); 32 reply->addTo(mailmenu);
32 33
33 forward = new QAction(tr("Forward"),SmallIcon("forward"), 0, 0, this); 34 forward = new QAction(tr("Forward"),SmallIcon("forward"), 0, 0, this);
34 forward->addTo(toolbar); 35 forward->addTo(toolbar);
35 forward->addTo(mailmenu); 36 forward->addTo(mailmenu);
36 37
37 attachbutton = new QAction(tr("Attachments"),SmallIcon("attach"), 0, 0, this, 0, true); 38 attachbutton = new QAction(tr("Attachments"),SmallIcon("attach"), 0, 0, this, 0, true);
38 attachbutton->addTo(toolbar); 39 attachbutton->addTo(toolbar);
39 attachbutton->addTo(mailmenu); 40 attachbutton->addTo(mailmenu);
40 connect(attachbutton, SIGNAL(toggled(bool)), SLOT(slotChangeAttachview(bool))); 41 connect(attachbutton, SIGNAL(toggled(bool)), SLOT(slotChangeAttachview(bool)));
41 42
42 43
43 showHtml = new QAction( tr( "Show Html" ), SmallIcon( "html" ), 0, 0, this, 0, true ); 44 showHtml = new QAction( tr( "Show Html" ), SmallIcon( "html" ), 0, 0, this, 0, true );
44 showHtml->addTo( toolbar ); 45 showHtml->addTo( toolbar );
45 showHtml->addTo( mailmenu ); 46 showHtml->addTo( mailmenu );
46 47
47 deleteMail = new QAction(tr("Delete Mail"),SmallIcon("trash"), 0, 0, this); 48 deleteMail = new QAction(tr("Delete Mail"),SmallIcon("trash"), 0, 0, this);
48 deleteMail->addTo(toolbar); 49 deleteMail->addTo(toolbar);
diff --git a/kmicromail/viewmailbase.h b/kmicromail/viewmailbase.h
index c29d143..1c8948a 100644
--- a/kmicromail/viewmailbase.h
+++ b/kmicromail/viewmailbase.h
@@ -1,38 +1,39 @@
1// CHANGED 2004-08-06 Lutz Rogowski
1#ifndef VIEWMAILBASE_H 2#ifndef VIEWMAILBASE_H
2#define VIEWMAILBASE_H 3#define VIEWMAILBASE_H
3 4
4#include <qmainwindow.h> 5#include <qmainwindow.h>
5 6
6class QAction; 7class QAction;
7class OpenDiag; 8class OpenDiag;
8class QListView; 9class QListView;
9class QToolBar; 10class QToolBar;
10class QTextBrowser; 11class QTextBrowser;
11class QMenuBar; 12class QMenuBar;
12class QPopupMenu; 13class QPopupMenu;
13 14
14class ViewMailBase : public QMainWindow 15class ViewMailBase : public QMainWindow
15{ 16{
16 Q_OBJECT 17 Q_OBJECT
17 18
18public: 19public:
19 ViewMailBase(QWidget *parent = 0, const char *name = 0, WFlags fl = 0); 20 ViewMailBase(QWidget *parent = 0, const char *name = 0, WFlags fl = 0);
20 21
21protected: 22protected:
22 QAction *reply, *forward, *attachbutton, *deleteMail, *showHtml, *closeMail; 23 QAction *reply, *forward, *attachbutton, *deleteMail, *showHtml, *closeMail;
23 QListView *attachments; 24 QListView *attachments;
24 QToolBar *toolbar; 25 QToolBar *toolbar;
25 QTextBrowser *browser; 26 QTextBrowser *browser;
26 OpenDiag *openDiag; 27 OpenDiag *openDiag;
27 QMenuBar *menubar; 28 QMenuBar *menubar;
28 QPopupMenu *mailmenu; 29 QPopupMenu *mailmenu;
29 30
30protected slots: 31protected slots:
31 void slotChangeAttachview(bool state); 32 void slotChangeAttachview(bool state);
32 virtual void keyPressEvent ( QKeyEvent * e ); 33 virtual void keyPressEvent ( QKeyEvent * e );
33 34
34 35
35}; 36};
36 37
37#endif 38#endif
38 39