summaryrefslogtreecommitdiffabout
path: root/kmicromail/mainwindow.cpp
Unidiff
Diffstat (limited to 'kmicromail/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/mainwindow.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/kmicromail/mainwindow.cpp b/kmicromail/mainwindow.cpp
index d130317..2a67e39 100644
--- a/kmicromail/mainwindow.cpp
+++ b/kmicromail/mainwindow.cpp
@@ -1,102 +1,107 @@
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
22MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) 22MainWindow::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 QPEMenuBar( 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 QAction* getMail = new QAction( tr( "Get all new mails" ), SmallIcon("add"),
38 0, 0, this );
39 connect(getMail, SIGNAL( activated() ),
40 SLOT( slotGetAllMail() ) );
41 getMail->addTo( mailMenu );
37 42
38 QAction* getMail = new QAction( tr( "Get new mail" ), SmallIcon("add"), 43 getMail = new QAction( tr( "Get new messages" ), SmallIcon("add"),
39 0, 0, this ); 44 0, 0, this );
40 getMail->addTo( toolBar ); 45 getMail->addTo( toolBar );
41 getMail->addTo( mailMenu ); 46 getMail->addTo( mailMenu );
42 connect(getMail, SIGNAL( activated() ), 47 connect(getMail, SIGNAL( activated() ),
43 SLOT( slotGetMail() ) ); 48 SLOT( slotGetMail() ) );
44 49
45 composeMail = new QAction( tr( "Compose new mail" ), SmallIcon("composemail"), 50 composeMail = new QAction( tr( "Compose new mail" ), SmallIcon("composemail"),
46 0, 0, this ); 51 0, 0, this );
47 composeMail->addTo( toolBar ); 52 composeMail->addTo( toolBar );
48 composeMail->addTo( mailMenu ); 53 composeMail->addTo( mailMenu );
49 54
50 sendQueued = new QAction( tr( "Send queued mails" ), SmallIcon("sendqueued") , 55 sendQueued = new QAction( tr( "Send queued mails" ), SmallIcon("sendqueued") ,
51 0, 0, this ); 56 0, 0, this );
52 sendQueued->addTo( toolBar ); 57 sendQueued->addTo( toolBar );
53 sendQueued->addTo( mailMenu ); 58 sendQueued->addTo( mailMenu );
54 59
55 /* 60 /*
56 syncFolders = new QAction( tr( "Sync mailfolders" ), ICON_SYNC, 61 syncFolders = new QAction( tr( "Sync mailfolders" ), ICON_SYNC,
57 0, 0, this ); 62 0, 0, this );
58 syncFolders->addTo( toolBar ); 63 syncFolders->addTo( toolBar );
59 syncFolders->addTo( mailMenu ); 64 syncFolders->addTo( mailMenu );
60 */ 65 */
61 66
62 showFolders = new QAction( tr( "Show/Hide folders" ), SmallIcon("showfolders") , 67 showFolders = new QAction( tr( "Show/Hide folders" ), SmallIcon("showfolders") ,
63 0, 0, this, 0, true ); 68 0, 0, this, 0, true );
64 showFolders->addTo( toolBar ); 69 showFolders->addTo( toolBar );
65 showFolders->addTo( mailMenu ); 70 showFolders->addTo( mailMenu );
66 showFolders->setOn( true ); 71 showFolders->setOn( true );
67 connect(showFolders, SIGNAL( toggled(bool) ), 72 connect(showFolders, SIGNAL( toggled(bool) ),
68 SLOT( slotShowFolders(bool) ) ); 73 SLOT( slotShowFolders(bool) ) );
69 74
70 /* 75 /*
71 searchMails = new QAction( tr( "Search mails" ), SmallIcon("find") ), 76 searchMails = new QAction( tr( "Search mails" ), SmallIcon("find") ),
72 0, 0, this ); 77 0, 0, this );
73 searchMails->addTo( toolBar ); 78 searchMails->addTo( toolBar );
74 searchMails->addTo( mailMenu ); 79 searchMails->addTo( mailMenu );
75 */ 80 */
76 81
77 deleteMails = new QAction(tr("Delete Mail"), SmallIcon("trash"), 0, 0, this); 82 deleteMails = new QAction(tr("Delete Mail"), SmallIcon("trash"), 0, 0, this);
78 deleteMails->addTo( toolBar ); 83 deleteMails->addTo( toolBar );
79 deleteMails->addTo( mailMenu ); 84 deleteMails->addTo( mailMenu );
80 connect( deleteMails, SIGNAL( activated() ), 85 connect( deleteMails, SIGNAL( activated() ),
81 SLOT( slotDeleteMail() ) ); 86 SLOT( slotDeleteMail() ) );
82 87
83 editSettings = new QAction( tr( "Edit settings" ), SmallIcon("SettingsIcon") , 88 editSettings = new QAction( tr( "Edit settings" ), SmallIcon("SettingsIcon") ,
84 0, 0, this ); 89 0, 0, this );
85 editSettings->addTo( settingsMenu ); 90 editSettings->addTo( settingsMenu );
86 connect( editSettings, SIGNAL( activated() ), 91 connect( editSettings, SIGNAL( activated() ),
87 SLOT( slotEditSettings() ) ); 92 SLOT( slotEditSettings() ) );
88 editAccounts = new QAction( tr( "Configure accounts" ), SmallIcon("editaccounts") , 93 editAccounts = new QAction( tr( "Configure accounts" ), SmallIcon("editaccounts") ,
89 0, 0, this ); 94 0, 0, this );
90 editAccounts->addTo( settingsMenu ); 95 editAccounts->addTo( settingsMenu );
91 96
92 //setCentralWidget( view ); 97 //setCentralWidget( view );
93 98
94 QVBox* wrapperBox = new QVBox( this ); 99 QVBox* wrapperBox = new QVBox( this );
95 setCentralWidget( wrapperBox ); 100 setCentralWidget( wrapperBox );
96 101
97 // QWidget *view = new QWidget( wrapperBox ); 102 // QWidget *view = new QWidget( wrapperBox );
98 KDGanttMinimizeSplitter* split = new KDGanttMinimizeSplitter( Qt::Horizontal, wrapperBox); 103 KDGanttMinimizeSplitter* split = new KDGanttMinimizeSplitter( Qt::Horizontal, wrapperBox);
99 split->setMinimizeDirection( KDGanttMinimizeSplitter::Left); 104 split->setMinimizeDirection( KDGanttMinimizeSplitter::Left);
100 //layout = new QBoxLayout ( split, QBoxLayout::LeftToRight ); 105 //layout = new QBoxLayout ( split, QBoxLayout::LeftToRight );
101 106
102 folderView = new AccountView( split ); 107 folderView = new AccountView( split );