-rw-r--r-- | kmicromail/mainwindow.cpp | 2 | ||||
-rw-r--r-- | kmicromail/mainwindow.h | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/kmicromail/mainwindow.cpp b/kmicromail/mainwindow.cpp index 6df95c6..5793a58 100644 --- a/kmicromail/mainwindow.cpp +++ b/kmicromail/mainwindow.cpp | |||
@@ -1,77 +1,77 @@ | |||
1 | 1 | ||
2 | // CHANGED 2004-08-06 Lutz Rogowski | 2 | // CHANGED 2004-08-06 Lutz Rogowski |
3 | #include <qlabel.h> | 3 | #include <qlabel.h> |
4 | #include <qvbox.h> | 4 | #include <qvbox.h> |
5 | #include <qheader.h> | 5 | #include <qheader.h> |
6 | #include <qtimer.h> | 6 | #include <qtimer.h> |
7 | #include <qlayout.h> | 7 | #include <qlayout.h> |
8 | #include <kdialog.h> | 8 | #include <kdialog.h> |
9 | #include <kiconloader.h> | 9 | #include <kiconloader.h> |
10 | #include <kapplication.h> | 10 | #include <kapplication.h> |
11 | 11 | ||
12 | #ifndef DESKTOP_VERSION | 12 | #ifndef DESKTOP_VERSION |
13 | #include <qpe/qpeapplication.h> | 13 | #include <qpe/qpeapplication.h> |
14 | #endif | 14 | #endif |
15 | #include "defines.h" | 15 | #include "defines.h" |
16 | #include "mainwindow.h" | 16 | #include "mainwindow.h" |
17 | #include <KDGanttMinimizeSplitter.h> | 17 | #include <KDGanttMinimizeSplitter.h> |
18 | 18 | ||
19 | 19 | ||
20 | #include <kabc/stdaddressbook.h> | 20 | #include <kabc/stdaddressbook.h> |
21 | 21 | ||
22 | MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) | 22 | MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) |
23 | : QMainWindow( parent, name ) //, flags ) | 23 | : QMainWindow( parent, name ) //, flags ) |
24 | { | 24 | { |
25 | setCaption( tr( "KOpieMail/Pi" ) ); | 25 | setCaption( tr( "KOpieMail/Pi" ) ); |
26 | setToolBarsMovable( false ); | 26 | setToolBarsMovable( false ); |
27 | //KABC::StdAddressBook::self(); | 27 | //KABC::StdAddressBook::self(); |
28 | toolBar = new QToolBar( this ); | 28 | toolBar = new QToolBar( this ); |
29 | menuBar = new QMenuBar( toolBar ); | 29 | menuBar = new QPEMenuBar( toolBar ); |
30 | mailMenu = new QPopupMenu( menuBar ); | 30 | mailMenu = new QPopupMenu( menuBar ); |
31 | menuBar->insertItem( tr( "Mail" ), mailMenu ); | 31 | menuBar->insertItem( tr( "Mail" ), mailMenu ); |
32 | settingsMenu = new QPopupMenu( menuBar ); | 32 | settingsMenu = new QPopupMenu( menuBar ); |
33 | menuBar->insertItem( tr( "Settings" ), settingsMenu ); | 33 | menuBar->insertItem( tr( "Settings" ), settingsMenu ); |
34 | 34 | ||
35 | addToolBar( toolBar ); | 35 | addToolBar( toolBar ); |
36 | toolBar->setHorizontalStretchable( true ); | 36 | toolBar->setHorizontalStretchable( true ); |
37 | 37 | ||
38 | 38 | ||
39 | 39 | ||
40 | composeMail = new QAction( tr( "Compose new mail" ), SmallIcon("composemail"), | 40 | composeMail = new QAction( tr( "Compose new mail" ), SmallIcon("composemail"), |
41 | 0, 0, this ); | 41 | 0, 0, this ); |
42 | composeMail->addTo( toolBar ); | 42 | composeMail->addTo( toolBar ); |
43 | composeMail->addTo( mailMenu ); | 43 | composeMail->addTo( mailMenu ); |
44 | 44 | ||
45 | sendQueued = new QAction( tr( "Send queued mails" ), SmallIcon("sendqueued") , | 45 | sendQueued = new QAction( tr( "Send queued mails" ), SmallIcon("sendqueued") , |
46 | 0, 0, this ); | 46 | 0, 0, this ); |
47 | sendQueued->addTo( toolBar ); | 47 | sendQueued->addTo( toolBar ); |
48 | sendQueued->addTo( mailMenu ); | 48 | sendQueued->addTo( mailMenu ); |
49 | 49 | ||
50 | /* | 50 | /* |
51 | syncFolders = new QAction( tr( "Sync mailfolders" ), ICON_SYNC, | 51 | syncFolders = new QAction( tr( "Sync mailfolders" ), ICON_SYNC, |
52 | 0, 0, this ); | 52 | 0, 0, this ); |
53 | syncFolders->addTo( toolBar ); | 53 | syncFolders->addTo( toolBar ); |
54 | syncFolders->addTo( mailMenu ); | 54 | syncFolders->addTo( mailMenu ); |
55 | */ | 55 | */ |
56 | 56 | ||
57 | showFolders = new QAction( tr( "Show/Hide folders" ), SmallIcon("showfolders") , | 57 | showFolders = new QAction( tr( "Show/Hide folders" ), SmallIcon("showfolders") , |
58 | 0, 0, this, 0, true ); | 58 | 0, 0, this, 0, true ); |
59 | showFolders->addTo( toolBar ); | 59 | showFolders->addTo( toolBar ); |
60 | showFolders->addTo( mailMenu ); | 60 | showFolders->addTo( mailMenu ); |
61 | showFolders->setOn( true ); | 61 | showFolders->setOn( true ); |
62 | connect(showFolders, SIGNAL( toggled(bool) ), | 62 | connect(showFolders, SIGNAL( toggled(bool) ), |
63 | SLOT( slotShowFolders(bool) ) ); | 63 | SLOT( slotShowFolders(bool) ) ); |
64 | 64 | ||
65 | /* | 65 | /* |
66 | searchMails = new QAction( tr( "Search mails" ), SmallIcon("find") ), | 66 | searchMails = new QAction( tr( "Search mails" ), SmallIcon("find") ), |
67 | 0, 0, this ); | 67 | 0, 0, this ); |
68 | searchMails->addTo( toolBar ); | 68 | searchMails->addTo( toolBar ); |
69 | searchMails->addTo( mailMenu ); | 69 | searchMails->addTo( mailMenu ); |
70 | */ | 70 | */ |
71 | 71 | ||
72 | deleteMails = new QAction(tr("Delete Mail"), SmallIcon("trash"), 0, 0, this); | 72 | deleteMails = new QAction(tr("Delete Mail"), SmallIcon("trash"), 0, 0, this); |
73 | deleteMails->addTo( toolBar ); | 73 | deleteMails->addTo( toolBar ); |
74 | deleteMails->addTo( mailMenu ); | 74 | deleteMails->addTo( mailMenu ); |
75 | connect( deleteMails, SIGNAL( activated() ), | 75 | connect( deleteMails, SIGNAL( activated() ), |
76 | SLOT( slotDeleteMail() ) ); | 76 | SLOT( slotDeleteMail() ) ); |
77 | 77 | ||
diff --git a/kmicromail/mainwindow.h b/kmicromail/mainwindow.h index f5b81aa..680f0a9 100644 --- a/kmicromail/mainwindow.h +++ b/kmicromail/mainwindow.h | |||
@@ -1,61 +1,65 @@ | |||
1 | 1 | ||
2 | // CHANGED 2004-08-06 Lutz Rogowski | 2 | // CHANGED 2004-08-06 Lutz Rogowski |
3 | #ifndef MAINWINDOW_H | 3 | #ifndef MAINWINDOW_H |
4 | #define MAINWINDOW_H | 4 | #define MAINWINDOW_H |
5 | 5 | ||
6 | #include <qmainwindow.h> | 6 | #include <qmainwindow.h> |
7 | #include <qlistview.h> | 7 | #include <qlistview.h> |
8 | #include <qaction.h> | 8 | #include <qaction.h> |
9 | 9 | ||
10 | #include <qtoolbar.h> | 10 | #include <qtoolbar.h> |
11 | #ifdef DESKTOP_VERSION | ||
11 | #include <qmenubar.h> | 12 | #include <qmenubar.h> |
13 | #else | ||
14 | #include <qpe/qpemenubar.h> | ||
15 | #endif | ||
12 | 16 | ||
13 | #include "accountview.h" | 17 | #include "accountview.h" |
14 | #include "statuswidget.h" | 18 | #include "statuswidget.h" |
15 | 19 | ||
16 | #include <libmailwrapper/mailtypes.h> | 20 | #include <libmailwrapper/mailtypes.h> |
17 | #include <opie2/osmartpointer.h> | 21 | #include <opie2/osmartpointer.h> |
18 | 22 | ||
19 | class RecMail; | 23 | class RecMail; |
20 | 24 | ||
21 | class MainWindow : public QMainWindow | 25 | class MainWindow : public QMainWindow |
22 | { | 26 | { |
23 | Q_OBJECT | 27 | Q_OBJECT |
24 | 28 | ||
25 | public: | 29 | public: |
26 | MainWindow( QWidget *parent = 0, const char *name = 0, WFlags flags = 0 ); | 30 | MainWindow( QWidget *parent = 0, const char *name = 0, WFlags flags = 0 ); |
27 | virtual ~MainWindow(); | 31 | virtual ~MainWindow(); |
28 | 32 | ||
29 | public slots: | 33 | public slots: |
30 | virtual void slotAdjustColumns(); | 34 | virtual void slotAdjustColumns(); |
31 | virtual void appMessage(const QCString &msg, const QByteArray &data); | 35 | virtual void appMessage(const QCString &msg, const QByteArray &data); |
32 | virtual void slotComposeMail(); | 36 | virtual void slotComposeMail(); |
33 | 37 | ||
34 | protected slots: | 38 | protected slots: |
35 | virtual void slotSendQueued(); | 39 | virtual void slotSendQueued(); |
36 | virtual void slotEditAccounts(); | 40 | virtual void slotEditAccounts(); |
37 | virtual void slotShowFolders( bool show ); | 41 | virtual void slotShowFolders( bool show ); |
38 | virtual void refreshMailView(const QValueList<RecMailP>&); | 42 | virtual void refreshMailView(const QValueList<RecMailP>&); |
39 | virtual void displayMail(); | 43 | virtual void displayMail(); |
40 | virtual void slotDeleteMail(); | 44 | virtual void slotDeleteMail(); |
41 | virtual void mailHold(int, QListViewItem *,const QPoint&,int); | 45 | virtual void mailHold(int, QListViewItem *,const QPoint&,int); |
42 | virtual void slotAdjustLayout(); | 46 | virtual void slotAdjustLayout(); |
43 | virtual void slotEditSettings(); | 47 | virtual void slotEditSettings(); |
44 | virtual void mailLeftClicked( QListViewItem * ); | 48 | virtual void mailLeftClicked( QListViewItem * ); |
45 | void showLicence(); | 49 | void showLicence(); |
46 | void showAbout(); | 50 | void showAbout(); |
47 | void showEtpanLicence(); | 51 | void showEtpanLicence(); |
48 | 52 | ||
49 | protected: | 53 | protected: |
50 | QToolBar *toolBar; | 54 | QToolBar *toolBar; |
51 | StatusWidget *statusWidget; | 55 | StatusWidget *statusWidget; |
52 | QMenuBar *menuBar; | 56 | QPEMenuBar *menuBar; |
53 | QPopupMenu *mailMenu, *settingsMenu; | 57 | QPopupMenu *mailMenu, *settingsMenu; |
54 | QAction *composeMail, *sendQueued, *showFolders, *searchMails, *deleteMails, | 58 | QAction *composeMail, *sendQueued, *showFolders, *searchMails, *deleteMails, |
55 | *editSettings, *editAccounts, *syncFolders; | 59 | *editSettings, *editAccounts, *syncFolders; |
56 | AccountView *folderView; | 60 | AccountView *folderView; |
57 | QListView *mailView; | 61 | QListView *mailView; |
58 | //QBoxLayout *layout; | 62 | //QBoxLayout *layout; |
59 | }; | 63 | }; |
60 | 64 | ||
61 | #endif | 65 | #endif |