summaryrefslogtreecommitdiffabout
path: root/kmicromail/mainwindow.cpp
Unidiff
Diffstat (limited to 'kmicromail/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/mainwindow.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/kmicromail/mainwindow.cpp b/kmicromail/mainwindow.cpp
index e020297..2de5b40 100644
--- a/kmicromail/mainwindow.cpp
+++ b/kmicromail/mainwindow.cpp
@@ -1,96 +1,98 @@
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 /*
49 syncFolders = new QAction( tr( "Sync mailfolders" ), ICON_SYNC, 51 syncFolders = new QAction( tr( "Sync mailfolders" ), ICON_SYNC,
50 0, 0, this ); 52 0, 0, this );
51 syncFolders->addTo( toolBar ); 53 syncFolders->addTo( toolBar );
52 syncFolders->addTo( mailMenu ); 54 syncFolders->addTo( mailMenu );
53 */ 55 */
54 56
55 showFolders = new QAction( tr( "Show/Hide folders" ), SmallIcon("showfolders") , 57 showFolders = new QAction( tr( "Show/Hide folders" ), SmallIcon("showfolders") ,
56 0, 0, this, 0, true ); 58 0, 0, this, 0, true );
57 showFolders->addTo( toolBar ); 59 showFolders->addTo( toolBar );
58 showFolders->addTo( mailMenu ); 60 showFolders->addTo( mailMenu );
59 showFolders->setOn( true ); 61 showFolders->setOn( true );
60 connect(showFolders, SIGNAL( toggled(bool) ), 62 connect(showFolders, SIGNAL( toggled(bool) ),
61 SLOT( slotShowFolders(bool) ) ); 63 SLOT( slotShowFolders(bool) ) );
62 64
63 /* 65 /*
64 searchMails = new QAction( tr( "Search mails" ), SmallIcon("find") ), 66 searchMails = new QAction( tr( "Search mails" ), SmallIcon("find") ),
65 0, 0, this ); 67 0, 0, this );
66 searchMails->addTo( toolBar ); 68 searchMails->addTo( toolBar );
67 searchMails->addTo( mailMenu ); 69 searchMails->addTo( mailMenu );
68 */ 70 */
69 71
70 deleteMails = new QAction(tr("Delete Mail"), SmallIcon("trash"), 0, 0, this); 72 deleteMails = new QAction(tr("Delete Mail"), SmallIcon("trash"), 0, 0, this);
71 deleteMails->addTo( toolBar ); 73 deleteMails->addTo( toolBar );
72 deleteMails->addTo( mailMenu ); 74 deleteMails->addTo( mailMenu );
73 connect( deleteMails, SIGNAL( activated() ), 75 connect( deleteMails, SIGNAL( activated() ),
74 SLOT( slotDeleteMail() ) ); 76 SLOT( slotDeleteMail() ) );
75 77
76 editSettings = new QAction( tr( "Edit settings" ), SmallIcon("SettingsIcon") , 78 editSettings = new QAction( tr( "Edit settings" ), SmallIcon("SettingsIcon") ,
77 0, 0, this ); 79 0, 0, this );
78 editSettings->addTo( settingsMenu ); 80 editSettings->addTo( settingsMenu );
79 connect( editSettings, SIGNAL( activated() ), 81 connect( editSettings, SIGNAL( activated() ),
80 SLOT( slotEditSettings() ) ); 82 SLOT( slotEditSettings() ) );
81 editAccounts = new QAction( tr( "Configure accounts" ), SmallIcon("editaccounts") , 83 editAccounts = new QAction( tr( "Configure accounts" ), SmallIcon("editaccounts") ,
82 0, 0, this ); 84 0, 0, this );
83 editAccounts->addTo( settingsMenu ); 85 editAccounts->addTo( settingsMenu );
84 86
85 //setCentralWidget( view ); 87 //setCentralWidget( view );
86 88
87 QVBox* wrapperBox = new QVBox( this ); 89 QVBox* wrapperBox = new QVBox( this );
88 setCentralWidget( wrapperBox ); 90 setCentralWidget( wrapperBox );
89 91
90 // QWidget *view = new QWidget( wrapperBox ); 92 // QWidget *view = new QWidget( wrapperBox );
91 KDGanttMinimizeSplitter* split = new KDGanttMinimizeSplitter( Qt::Horizontal, wrapperBox); 93 KDGanttMinimizeSplitter* split = new KDGanttMinimizeSplitter( Qt::Horizontal, wrapperBox);
92 split->setMinimizeDirection( KDGanttMinimizeSplitter::Left); 94 split->setMinimizeDirection( KDGanttMinimizeSplitter::Left);
93 //layout = new QBoxLayout ( split, QBoxLayout::LeftToRight ); 95 //layout = new QBoxLayout ( split, QBoxLayout::LeftToRight );
94 96
95 folderView = new AccountView( split ); 97 folderView = new AccountView( split );
96 folderView->header()->hide(); 98 folderView->header()->hide();