summaryrefslogtreecommitdiffabout
path: root/kmicromail/mainwindow.cpp
Unidiff
Diffstat (limited to 'kmicromail/mainwindow.cpp') (more/less context) (show whitespace changes)
-rw-r--r--kmicromail/mainwindow.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/kmicromail/mainwindow.cpp b/kmicromail/mainwindow.cpp
index c77345b..b19dbbe 100644
--- a/kmicromail/mainwindow.cpp
+++ b/kmicromail/mainwindow.cpp
@@ -1,108 +1,110 @@
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#ifdef DESKTOP_VERSION
13#include <qapplication.h>
14#else
13#include <qpe/qpeapplication.h> 15#include <qpe/qpeapplication.h>
14#endif 16#endif
15#include "defines.h" 17#include "defines.h"
16#include "mainwindow.h" 18#include "mainwindow.h"
17#include <KDGanttMinimizeSplitter.h> 19#include <KDGanttMinimizeSplitter.h>
18 20
19 21
20#include <kabc/stdaddressbook.h> 22#include <kabc/stdaddressbook.h>
21 23
22MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) 24MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags )
23 : QMainWindow( parent, name ) //, flags ) 25 : QMainWindow( parent, name ) //, flags )
24{ 26{
25 setCaption( i18n( "KOpieMail/Pi" ) ); 27 setCaption( i18n( "KOpieMail/Pi" ) );
26 setToolBarsMovable( false ); 28 setToolBarsMovable( false );
27 //KABC::StdAddressBook::self(); 29 //KABC::StdAddressBook::self();
28 toolBar = new QToolBar( this ); 30 toolBar = new QToolBar( this );
29 menuBar = new QPEMenuBar( toolBar ); 31 menuBar = new QPEMenuBar( toolBar );
30 mailMenu = new QPopupMenu( menuBar ); 32 mailMenu = new QPopupMenu( menuBar );
31 menuBar->insertItem( i18n( "Mail" ), mailMenu ); 33 menuBar->insertItem( i18n( "Mail" ), mailMenu );
32 settingsMenu = new QPopupMenu( menuBar ); 34 settingsMenu = new QPopupMenu( menuBar );
33 menuBar->insertItem( i18n( "Settings" ), settingsMenu ); 35 menuBar->insertItem( i18n( "Settings" ), settingsMenu );
34 36
35 addToolBar( toolBar ); 37 addToolBar( toolBar );
36 toolBar->setHorizontalStretchable( true ); 38 toolBar->setHorizontalStretchable( true );
37 QAction* getMail = new QAction( i18n( "Get all new mails" ), SmallIcon("enter"), 39 QAction* getMail = new QAction( i18n( "Get all new mails" ), SmallIcon("enter"),
38 0, 0, this ); 40 0, 0, this );
39 connect(getMail, SIGNAL( activated() ), 41 connect(getMail, SIGNAL( activated() ),
40 SLOT( slotGetAllMail() ) ); 42 SLOT( slotGetAllMail() ) );
41 getMail->addTo( mailMenu ); 43 getMail->addTo( mailMenu );
42 44
43 getMail = new QAction( i18n( "Get new messages" ), SmallIcon("add"), 45 getMail = new QAction( i18n( "Get new messages" ), SmallIcon("add"),
44 0, 0, this ); 46 0, 0, this );
45 getMail->addTo( toolBar ); 47 getMail->addTo( toolBar );
46 getMail->addTo( mailMenu ); 48 getMail->addTo( mailMenu );
47 connect(getMail, SIGNAL( activated() ), 49 connect(getMail, SIGNAL( activated() ),
48 SLOT( slotGetMail() ) ); 50 SLOT( slotGetMail() ) );
49 51
50 composeMail = new QAction( i18n( "Compose new mail" ), SmallIcon("composemail"), 52 composeMail = new QAction( i18n( "Compose new mail" ), SmallIcon("composemail"),
51 0, 0, this ); 53 0, 0, this );
52 composeMail->addTo( toolBar ); 54 composeMail->addTo( toolBar );
53 composeMail->addTo( mailMenu ); 55 composeMail->addTo( mailMenu );
54 56
55 sendQueued = new QAction( i18n( "Send queued mails" ), SmallIcon("sendqueued") , 57 sendQueued = new QAction( i18n( "Send queued mails" ), SmallIcon("sendqueued") ,
56 0, 0, this ); 58 0, 0, this );
57 sendQueued->addTo( toolBar ); 59 sendQueued->addTo( toolBar );
58 sendQueued->addTo( mailMenu ); 60 sendQueued->addTo( mailMenu );
59 61
60 /* 62 /*
61 syncFolders = new QAction( i18n( "Sync mailfolders" ), ICON_SYNC, 63 syncFolders = new QAction( i18n( "Sync mailfolders" ), ICON_SYNC,
62 0, 0, this ); 64 0, 0, this );
63 syncFolders->addTo( toolBar ); 65 syncFolders->addTo( toolBar );
64 syncFolders->addTo( mailMenu ); 66 syncFolders->addTo( mailMenu );
65 */ 67 */
66 68
67 showFolders = new QAction( i18n( "Show/Hide folders" ), SmallIcon("showfolders") , 69 showFolders = new QAction( i18n( "Show/Hide folders" ), SmallIcon("showfolders") ,
68 0, 0, this, 0, true ); 70 0, 0, this, 0, true );
69 showFolders->addTo( toolBar ); 71 showFolders->addTo( toolBar );
70 showFolders->addTo( mailMenu ); 72 showFolders->addTo( mailMenu );
71 showFolders->setOn( true ); 73 showFolders->setOn( true );
72 connect(showFolders, SIGNAL( toggled(bool) ), 74 connect(showFolders, SIGNAL( toggled(bool) ),
73 SLOT( slotShowFolders(bool) ) ); 75 SLOT( slotShowFolders(bool) ) );
74 76
75 /* 77 /*
76 searchMails = new QAction( i18n( "Search mails" ), SmallIcon("find") ), 78 searchMails = new QAction( i18n( "Search mails" ), SmallIcon("find") ),
77 0, 0, this ); 79 0, 0, this );
78 searchMails->addTo( toolBar ); 80 searchMails->addTo( toolBar );
79 searchMails->addTo( mailMenu ); 81 searchMails->addTo( mailMenu );
80 */ 82 */
81 83
82 deleteMails = new QAction(i18n("Delete Mail"), SmallIcon("trash"), 0, 0, this); 84 deleteMails = new QAction(i18n("Delete Mail"), SmallIcon("trash"), 0, 0, this);
83 deleteMails->addTo( toolBar ); 85 deleteMails->addTo( toolBar );
84 deleteMails->addTo( mailMenu ); 86 deleteMails->addTo( mailMenu );
85 connect( deleteMails, SIGNAL( activated() ), 87 connect( deleteMails, SIGNAL( activated() ),
86 SLOT( slotDeleteMail() ) ); 88 SLOT( slotDeleteMail() ) );
87 89
88 editSettings = new QAction( i18n( "Edit settings" ), SmallIcon("SettingsIcon") , 90 editSettings = new QAction( i18n( "Edit settings" ), SmallIcon("SettingsIcon") ,
89 0, 0, this ); 91 0, 0, this );
90 editSettings->addTo( settingsMenu ); 92 editSettings->addTo( settingsMenu );
91 connect( editSettings, SIGNAL( activated() ), 93 connect( editSettings, SIGNAL( activated() ),
92 SLOT( slotEditSettings() ) ); 94 SLOT( slotEditSettings() ) );
93 editAccounts = new QAction( i18n( "Configure accounts" ), SmallIcon("editaccounts") , 95 editAccounts = new QAction( i18n( "Configure accounts" ), SmallIcon("editaccounts") ,
94 0, 0, this ); 96 0, 0, this );
95 editAccounts->addTo( settingsMenu ); 97 editAccounts->addTo( settingsMenu );
96 98
97 //setCentralWidget( view ); 99 //setCentralWidget( view );
98 100
99 QVBox* wrapperBox = new QVBox( this ); 101 QVBox* wrapperBox = new QVBox( this );
100 setCentralWidget( wrapperBox ); 102 setCentralWidget( wrapperBox );
101 103
102 // QWidget *view = new QWidget( wrapperBox ); 104 // QWidget *view = new QWidget( wrapperBox );
103 KDGanttMinimizeSplitter* split = new KDGanttMinimizeSplitter( Qt::Horizontal, wrapperBox); 105 KDGanttMinimizeSplitter* split = new KDGanttMinimizeSplitter( Qt::Horizontal, wrapperBox);
104 split->setMinimizeDirection( KDGanttMinimizeSplitter::Left); 106 split->setMinimizeDirection( KDGanttMinimizeSplitter::Left);
105 //layout = new QBoxLayout ( split, QBoxLayout::LeftToRight ); 107 //layout = new QBoxLayout ( split, QBoxLayout::LeftToRight );
106 108
107 folderView = new AccountView( split ); 109 folderView = new AccountView( split );
108 folderView->header()->hide(); 110 folderView->header()->hide();