-rw-r--r-- | kmicromail/mainwindow.cpp | 45 |
1 files changed, 43 insertions, 2 deletions
diff --git a/kmicromail/mainwindow.cpp b/kmicromail/mainwindow.cpp index 98eb9a5..3013931 100644 --- a/kmicromail/mainwindow.cpp +++ b/kmicromail/mainwindow.cpp | |||
@@ -1,312 +1,353 @@ | |||
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 | #ifdef DESKTOP_VERSION | 12 | #ifdef DESKTOP_VERSION |
13 | #include <qapplication.h> | 13 | #include <qapplication.h> |
14 | #include <qstatusbar.h> | 14 | #include <qstatusbar.h> |
15 | #include <kabc/stdaddressbook.h> | ||
15 | extern QStatusBar* globalSstatusBarMainWindow; | 16 | extern QStatusBar* globalSstatusBarMainWindow; |
16 | #else | 17 | #else |
17 | #include <qpe/qpeapplication.h> | 18 | #include <qpe/qpeapplication.h> |
18 | #endif | 19 | #endif |
19 | #include "defines.h" | 20 | #include "defines.h" |
20 | #include "mainwindow.h" | 21 | #include "mainwindow.h" |
21 | #include <KDGanttMinimizeSplitter.h> | 22 | #include <KDGanttMinimizeSplitter.h> |
22 | 23 | ||
23 | #include <kabc/stdaddressbook.h> | 24 | #include "koprefs.h" |
24 | 25 | ||
25 | MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) | 26 | MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) |
26 | : QMainWindow( parent, name ) //, flags ) | 27 | : QMainWindow( parent, name ) //, flags ) |
27 | { | 28 | { |
28 | #ifdef DESKTOP_VERSION | 29 | #ifdef DESKTOP_VERSION |
29 | globalSstatusBarMainWindow = statusBar(); | 30 | globalSstatusBarMainWindow = statusBar(); |
30 | #endif | 31 | #endif |
31 | setCaption( i18n( "KOpieMail/Pi" ) ); | 32 | setCaption( i18n( "KOpieMail/Pi" ) ); |
32 | setToolBarsMovable( false ); | 33 | setToolBarsMovable( false ); |
33 | //KABC::StdAddressBook::self(); | 34 | //KABC::StdAddressBook::self(); |
34 | toolBar = new QToolBar( this ); | 35 | toolBar = new QToolBar( this ); |
35 | menuBar = new QPEMenuBar( toolBar ); | 36 | menuBar = new QPEMenuBar( toolBar ); |
36 | mailMenu = new QPopupMenu( menuBar ); | 37 | mailMenu = new QPopupMenu( menuBar ); |
37 | menuBar->insertItem( i18n( "Mail" ), mailMenu ); | 38 | menuBar->insertItem( i18n( "Mail" ), mailMenu ); |
38 | settingsMenu = new QPopupMenu( menuBar ); | 39 | settingsMenu = new QPopupMenu( menuBar ); |
39 | menuBar->insertItem( i18n( "Settings" ), settingsMenu ); | 40 | menuBar->insertItem( i18n( "Settings" ), settingsMenu ); |
40 | 41 | ||
41 | addToolBar( toolBar ); | 42 | addToolBar( toolBar ); |
42 | toolBar->setHorizontalStretchable( true ); | 43 | toolBar->setHorizontalStretchable( true ); |
43 | QAction* getMail = new QAction( i18n( "Get all new mails" ), SmallIcon("enter"), | 44 | QAction* getMail = new QAction( i18n( "Get all new mails" ), SmallIcon("enter"), |
44 | 0, 0, this ); | 45 | 0, 0, this ); |
45 | connect(getMail, SIGNAL( activated() ), | 46 | connect(getMail, SIGNAL( activated() ), |
46 | SLOT( slotGetAllMail() ) ); | 47 | SLOT( slotGetAllMail() ) ); |
47 | getMail->addTo( mailMenu ); | 48 | getMail->addTo( mailMenu ); |
48 | 49 | ||
49 | getMail = new QAction( i18n( "Get new messages" ), SmallIcon("add"), | 50 | getMail = new QAction( i18n( "Get new messages" ), SmallIcon("add"), |
50 | 0, 0, this ); | 51 | 0, 0, this ); |
51 | getMail->addTo( toolBar ); | 52 | getMail->addTo( toolBar ); |
52 | getMail->addTo( mailMenu ); | 53 | getMail->addTo( mailMenu ); |
53 | connect(getMail, SIGNAL( activated() ), | 54 | connect(getMail, SIGNAL( activated() ), |
54 | SLOT( slotGetMail() ) ); | 55 | SLOT( slotGetMail() ) ); |
55 | 56 | ||
56 | composeMail = new QAction( i18n( "Compose new mail" ), SmallIcon("composemail"), | 57 | composeMail = new QAction( i18n( "Compose new mail" ), SmallIcon("composemail"), |
57 | 0, 0, this ); | 58 | 0, 0, this ); |
58 | composeMail->addTo( toolBar ); | 59 | composeMail->addTo( toolBar ); |
59 | composeMail->addTo( mailMenu ); | 60 | composeMail->addTo( mailMenu ); |
60 | 61 | ||
61 | sendQueued = new QAction( i18n( "Send queued mails" ), SmallIcon("sendqueued") , | 62 | sendQueued = new QAction( i18n( "Send queued mails" ), SmallIcon("sendqueued") , |
62 | 0, 0, this ); | 63 | 0, 0, this ); |
63 | sendQueued->addTo( toolBar ); | 64 | sendQueued->addTo( toolBar ); |
64 | sendQueued->addTo( mailMenu ); | 65 | sendQueued->addTo( mailMenu ); |
65 | 66 | ||
66 | /* | 67 | /* |
67 | syncFolders = new QAction( i18n( "Sync mailfolders" ), ICON_SYNC, | 68 | syncFolders = new QAction( i18n( "Sync mailfolders" ), ICON_SYNC, |
68 | 0, 0, this ); | 69 | 0, 0, this ); |
69 | syncFolders->addTo( toolBar ); | 70 | syncFolders->addTo( toolBar ); |
70 | syncFolders->addTo( mailMenu ); | 71 | syncFolders->addTo( mailMenu ); |
71 | */ | 72 | */ |
72 | 73 | ||
73 | showFolders = new QAction( i18n( "Show/Hide folders" ), SmallIcon("showfolders") , | 74 | showFolders = new QAction( i18n( "Show/Hide folders" ), SmallIcon("showfolders") , |
74 | 0, 0, this, 0, true ); | 75 | 0, 0, this, 0, true ); |
75 | showFolders->addTo( toolBar ); | 76 | showFolders->addTo( toolBar ); |
76 | showFolders->addTo( mailMenu ); | 77 | showFolders->addTo( mailMenu ); |
77 | showFolders->setOn( true ); | 78 | showFolders->setOn( true ); |
78 | connect(showFolders, SIGNAL( toggled(bool) ), | 79 | connect(showFolders, SIGNAL( toggled(bool) ), |
79 | SLOT( slotShowFolders(bool) ) ); | 80 | SLOT( slotShowFolders(bool) ) ); |
80 | 81 | ||
81 | /* | 82 | /* |
82 | searchMails = new QAction( i18n( "Search mails" ), SmallIcon("find") ), | 83 | searchMails = new QAction( i18n( "Search mails" ), SmallIcon("find") ), |
83 | 0, 0, this ); | 84 | 0, 0, this ); |
84 | searchMails->addTo( toolBar ); | 85 | searchMails->addTo( toolBar ); |
85 | searchMails->addTo( mailMenu ); | 86 | searchMails->addTo( mailMenu ); |
86 | */ | 87 | */ |
87 | 88 | ||
88 | deleteMails = new QAction(i18n("Delete Mail"), SmallIcon("trash"), 0, 0, this); | 89 | deleteMails = new QAction(i18n("Delete Mail"), SmallIcon("trash"), 0, 0, this); |
89 | deleteMails->addTo( toolBar ); | 90 | deleteMails->addTo( toolBar ); |
90 | deleteMails->addTo( mailMenu ); | 91 | deleteMails->addTo( mailMenu ); |
91 | connect( deleteMails, SIGNAL( activated() ), | 92 | connect( deleteMails, SIGNAL( activated() ), |
92 | SLOT( slotDeleteMail() ) ); | 93 | SLOT( slotDeleteMail() ) ); |
93 | 94 | ||
94 | editSettings = new QAction( i18n( "Edit settings" ), SmallIcon("SettingsIcon") , | 95 | editSettings = new QAction( i18n( "Edit settings" ), SmallIcon("SettingsIcon") , |
95 | 0, 0, this ); | 96 | 0, 0, this ); |
96 | editSettings->addTo( settingsMenu ); | 97 | editSettings->addTo( settingsMenu ); |
97 | connect( editSettings, SIGNAL( activated() ), | 98 | connect( editSettings, SIGNAL( activated() ), |
98 | SLOT( slotEditSettings() ) ); | 99 | SLOT( slotEditSettings() ) ); |
99 | editAccounts = new QAction( i18n( "Configure accounts" ), SmallIcon("editaccounts") , | 100 | editAccounts = new QAction( i18n( "Configure accounts" ), SmallIcon("editaccounts") , |
100 | 0, 0, this ); | 101 | 0, 0, this ); |
101 | editAccounts->addTo( settingsMenu ); | 102 | editAccounts->addTo( settingsMenu ); |
102 | 103 | codecMenu = new QPopupMenu( menuBar ); | |
104 | codecMenu->insertItem( "Western (iso-8859-1)",0,0); | ||
105 | codecMenu->insertItem( "Cyrillic (iso-8859-5)",1,1); | ||
106 | codecMenu->insertItem( "Western (iso-8859-15)",2,2); | ||
107 | codecMenu->insertItem( "Chinese (big-5)",3,3); | ||
108 | codecMenu->insertItem( "Unicode (utf-8)",4,4); | ||
109 | codecMenu->insertItem( "Userdefined ("+KOPrefs::instance()->mSendCodec+")",5,5); | ||
110 | settingsMenu->insertItem( i18n("Codec for new mails"), codecMenu); | ||
103 | //setCentralWidget( view ); | 111 | //setCentralWidget( view ); |
104 | 112 | ||
105 | QVBox* wrapperBox = new QVBox( this ); | 113 | QVBox* wrapperBox = new QVBox( this ); |
106 | setCentralWidget( wrapperBox ); | 114 | setCentralWidget( wrapperBox ); |
107 | 115 | ||
108 | // QWidget *view = new QWidget( wrapperBox ); | 116 | // QWidget *view = new QWidget( wrapperBox ); |
109 | KDGanttMinimizeSplitter* split = new KDGanttMinimizeSplitter( Qt::Horizontal, wrapperBox); | 117 | KDGanttMinimizeSplitter* split = new KDGanttMinimizeSplitter( Qt::Horizontal, wrapperBox); |
110 | split->setMinimizeDirection( KDGanttMinimizeSplitter::Left); | 118 | split->setMinimizeDirection( KDGanttMinimizeSplitter::Left); |
111 | //layout = new QBoxLayout ( split, QBoxLayout::LeftToRight ); | 119 | //layout = new QBoxLayout ( split, QBoxLayout::LeftToRight ); |
112 | 120 | ||
113 | folderView = new AccountView( split ); | 121 | folderView = new AccountView( split ); |
114 | folderView->header()->hide(); | 122 | folderView->header()->hide(); |
115 | folderView->setRootIsDecorated( false ); | 123 | folderView->setRootIsDecorated( false ); |
116 | folderView->addColumn( i18n( "Mailbox" ) ); | 124 | folderView->addColumn( i18n( "Mailbox" ) ); |
117 | 125 | ||
118 | //layout->addWidget( folderView ); | 126 | //layout->addWidget( folderView ); |
119 | 127 | ||
120 | mailView = new QListView( split ); | 128 | mailView = new QListView( split ); |
121 | mailView->addColumn( i18n( " " ) ); | 129 | mailView->addColumn( i18n( " " ) ); |
122 | mailView->addColumn( i18n( "Subject" ),QListView::Manual ); | 130 | mailView->addColumn( i18n( "Subject" ),QListView::Manual ); |
123 | mailView->addColumn( i18n( "Sender" ),QListView::Manual ); | 131 | mailView->addColumn( i18n( "Sender" ),QListView::Manual ); |
124 | mailView->addColumn( i18n( "Size" ),QListView::Manual); | 132 | mailView->addColumn( i18n( "Size" ),QListView::Manual); |
125 | mailView->addColumn( i18n( "Date" ),QListView::Manual); | 133 | mailView->addColumn( i18n( "Date" ),QListView::Manual); |
126 | mailView->setAllColumnsShowFocus(true); | 134 | mailView->setAllColumnsShowFocus(true); |
127 | //mailView->setSorting(-1); | 135 | //mailView->setSorting(-1); |
128 | mailView->setRootIsDecorated( false ); | 136 | mailView->setRootIsDecorated( false ); |
129 | statusWidget = new StatusWidget( wrapperBox ); | 137 | statusWidget = new StatusWidget( wrapperBox ); |
130 | statusWidget->hide(); | 138 | statusWidget->hide(); |
131 | 139 | ||
132 | //layout->addWidget( mailView ); | 140 | //layout->addWidget( mailView ); |
133 | //layout->setStretchFactor( folderView, 1 ); | 141 | //layout->setStretchFactor( folderView, 1 ); |
134 | //layout->setStretchFactor( mailView, 2 ); | 142 | //layout->setStretchFactor( mailView, 2 ); |
135 | 143 | ||
136 | slotAdjustLayout(); | 144 | slotAdjustLayout(); |
137 | #ifndef DESKTOP_VERSION | 145 | #ifndef DESKTOP_VERSION |
138 | QPEApplication::setStylusOperation( mailView->viewport(),QPEApplication::RightOnHold); | 146 | QPEApplication::setStylusOperation( mailView->viewport(),QPEApplication::RightOnHold); |
139 | QPEApplication::setStylusOperation( folderView->viewport(),QPEApplication::RightOnHold); | 147 | QPEApplication::setStylusOperation( folderView->viewport(),QPEApplication::RightOnHold); |
140 | #endif | 148 | #endif |
141 | connect( mailView, SIGNAL( doubleClicked (QListViewItem* )),this, | 149 | connect( mailView, SIGNAL( doubleClicked (QListViewItem* )),this, |
142 | SLOT( mailLeftClicked(QListViewItem*) ) ); | 150 | SLOT( mailLeftClicked(QListViewItem*) ) ); |
143 | connect( mailView, SIGNAL( returnPressed (QListViewItem* )),this, | 151 | connect( mailView, SIGNAL( returnPressed (QListViewItem* )),this, |
144 | SLOT( mailLeftClicked(QListViewItem*) ) ); | 152 | SLOT( mailLeftClicked(QListViewItem*) ) ); |
145 | connect( mailView, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int) ),this, | 153 | connect( mailView, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int) ),this, |
146 | SLOT( mailHold(int,QListViewItem*,const QPoint&,int) ) ); | 154 | SLOT( mailHold(int,QListViewItem*,const QPoint&,int) ) ); |
147 | connect(folderView, SIGNAL(refreshMailview(const QValueList<RecMailP>&)), | 155 | connect(folderView, SIGNAL(refreshMailview(const QValueList<RecMailP>&)), |
148 | this,SLOT(refreshMailView(const QValueList<RecMailP>&))); | 156 | this,SLOT(refreshMailView(const QValueList<RecMailP>&))); |
149 | connect( composeMail, SIGNAL( activated() ), SLOT( slotComposeMail() ) ); | 157 | connect( composeMail, SIGNAL( activated() ), SLOT( slotComposeMail() ) ); |
150 | connect( sendQueued, SIGNAL( activated() ), SLOT( slotSendQueued() ) ); | 158 | connect( sendQueued, SIGNAL( activated() ), SLOT( slotSendQueued() ) ); |
151 | // connect( searchMails, SIGNAL( activated() ), SLOT( slotSearchMails() ) ); | 159 | // connect( searchMails, SIGNAL( activated() ), SLOT( slotSearchMails() ) ); |
152 | connect( editAccounts, SIGNAL( activated() ), SLOT( slotEditAccounts() ) ); | 160 | connect( editAccounts, SIGNAL( activated() ), SLOT( slotEditAccounts() ) ); |
153 | //mailView->setMultiSelection ( true ); | 161 | //mailView->setMultiSelection ( true ); |
154 | mailView->setSelectionMode( QListView::Extended ); | 162 | mailView->setSelectionMode( QListView::Extended ); |
155 | QValueList<int> list; | 163 | QValueList<int> list; |
156 | int fw = 100; | 164 | int fw = 100; |
157 | if ( QApplication::desktop()->width() > 320 ) | 165 | if ( QApplication::desktop()->width() > 320 ) |
158 | fw = 50; | 166 | fw = 50; |
159 | list.append( fw ); | 167 | list.append( fw ); |
160 | list.append( 100 ); | 168 | list.append( 100 ); |
161 | split->setSizes( list ); | 169 | split->setSizes( list ); |
162 | QTimer::singleShot( 1000, this, SLOT( slotAdjustColumns() ) ); | 170 | QTimer::singleShot( 1000, this, SLOT( slotAdjustColumns() ) ); |
163 | mailView->setShowSortIndicator ( true ); | 171 | mailView->setShowSortIndicator ( true ); |
164 | QLabel *spacer = new QLabel( toolBar ); | 172 | QLabel *spacer = new QLabel( toolBar ); |
165 | spacer->setBackgroundMode( QWidget::PaletteButton ); | 173 | spacer->setBackgroundMode( QWidget::PaletteButton ); |
166 | toolBar->setStretchableWidget( spacer ); | 174 | toolBar->setStretchableWidget( spacer ); |
167 | 175 | ||
168 | QAction* closeMail = new QAction(i18n("Close"),SmallIcon("exit"), 0, 0, this); | 176 | QAction* closeMail = new QAction(i18n("Close"),SmallIcon("exit"), 0, 0, this); |
169 | connect( closeMail, SIGNAL( activated() ), SLOT( close() ) ); | 177 | connect( closeMail, SIGNAL( activated() ), SLOT( close() ) ); |
170 | if ( QApplication::desktop()->width() > 320 ) | 178 | if ( QApplication::desktop()->width() > 320 ) |
171 | closeMail->addTo(toolBar); | 179 | closeMail->addTo(toolBar); |
172 | closeMail->addTo(mailMenu); | 180 | closeMail->addTo(mailMenu); |
173 | 181 | ||
174 | 182 | ||
175 | QPopupMenu* helpMenu = new QPopupMenu( menuBar ); | 183 | QPopupMenu* helpMenu = new QPopupMenu( menuBar ); |
176 | menuBar->insertItem( i18n( "Help" ), helpMenu ); | 184 | menuBar->insertItem( i18n( "Help" ), helpMenu ); |
177 | QAction* li = new QAction(i18n("About"), QPixmap(), 0, 0, this); | 185 | QAction* li = new QAction(i18n("About"), QPixmap(), 0, 0, this); |
178 | connect( li, SIGNAL( activated() ), SLOT( showAbout()) ); | 186 | connect( li, SIGNAL( activated() ), SLOT( showAbout()) ); |
179 | li->addTo(helpMenu); | 187 | li->addTo(helpMenu); |
180 | li = new QAction(i18n("Licence"),QPixmap(), 0, 0, this); | 188 | li = new QAction(i18n("Licence"),QPixmap(), 0, 0, this); |
181 | connect( li, SIGNAL( activated() ), SLOT( showLicence()) ); | 189 | connect( li, SIGNAL( activated() ), SLOT( showLicence()) ); |
182 | li->addTo(helpMenu); | 190 | li->addTo(helpMenu); |
183 | li = new QAction(i18n("LibEtPan Licence"), QPixmap(), 0, 0, this); | 191 | li = new QAction(i18n("LibEtPan Licence"), QPixmap(), 0, 0, this); |
184 | connect( li, SIGNAL( activated() ), SLOT( showEtpanLicence()) ); | 192 | connect( li, SIGNAL( activated() ), SLOT( showEtpanLicence()) ); |
185 | li->addTo(helpMenu); | 193 | li->addTo(helpMenu); |
194 | connect( codecMenu, SIGNAL( activated(int) ), this, SLOT( slotSetCodec( int )) ); | ||
195 | slotSetCodec( KOPrefs::instance()->mCurrentCodec ); | ||
186 | #ifdef DESKTOP_VERSION | 196 | #ifdef DESKTOP_VERSION |
187 | resize ( 640, 480 ); | 197 | resize ( 640, 480 ); |
188 | #endif | 198 | #endif |
189 | } | 199 | } |
190 | 200 | ||
191 | MainWindow::~MainWindow() | 201 | MainWindow::~MainWindow() |
192 | { | 202 | { |
193 | } | 203 | } |
194 | 204 | ||
205 | void MainWindow::slotSetCodec( int codec ) | ||
206 | { | ||
207 | codecMenu->setItemChecked(KOPrefs::instance()->mCurrentCodec, false ); | ||
208 | //qDebug("codec %d ", codec); | ||
209 | KOPrefs::instance()->mCurrentCodec = codec; | ||
210 | KOPrefs::instance()->isDirty = true; | ||
211 | QString name; | ||
212 | switch ( codec ) { | ||
213 | case 0: | ||
214 | name = "iso-8859-1"; | ||
215 | break; | ||
216 | case 1: | ||
217 | name = "iso-8859-5"; | ||
218 | break; | ||
219 | case 2: | ||
220 | name = "iso-8859-15"; | ||
221 | break; | ||
222 | case 3: | ||
223 | name = "big-5"; | ||
224 | break; | ||
225 | case 4: | ||
226 | name = "utf-8"; | ||
227 | break; | ||
228 | case 5: | ||
229 | name = KOPrefs::instance()->mSendCodec.lower(); | ||
230 | break; | ||
231 | } | ||
232 | KOPrefs::instance()->mCurrentCodeName = name ; | ||
233 | codecMenu->changeItem ( 5, "Userdefined ("+KOPrefs::instance()->mSendCodec+")"); | ||
234 | codecMenu->setItemChecked(KOPrefs::instance()->mCurrentCodec, true ); | ||
235 | } | ||
195 | void MainWindow::showLicence() | 236 | void MainWindow::showLicence() |
196 | { | 237 | { |
197 | KApplication::showLicence(); | 238 | KApplication::showLicence(); |
198 | } | 239 | } |
199 | void MainWindow::showAbout() | 240 | void MainWindow::showAbout() |
200 | { | 241 | { |
201 | QString version; | 242 | QString version; |
202 | #include <../version> | 243 | #include <../version> |
203 | 244 | ||
204 | QString cap = "About KOpieMail/Pi"; | 245 | QString cap = "About KOpieMail/Pi"; |
205 | QString text =i18n("KOpieMail/Platform-independent\n") + | 246 | QString text =i18n("KOpieMail/Platform-independent\n") + |
206 | "(OM/Pi) " + version + " - " | 247 | "(OM/Pi) " + version + " - " |
207 | 248 | ||
208 | #ifdef DESKTOP_VERSION | 249 | #ifdef DESKTOP_VERSION |
209 | "Desktop Edition\n" | 250 | "Desktop Edition\n" |
210 | #else | 251 | #else |
211 | "PDA-Edition\nfor: Zaurus 5x00 / 7x0 / 8x0\n" | 252 | "PDA-Edition\nfor: Zaurus 5x00 / 7x0 / 8x0\n" |
212 | #endif | 253 | #endif |
213 | "www.pi-sync.net\n\n" | 254 | "www.pi-sync.net\n\n" |
214 | 255 | ||
215 | 256 | ||
216 | 257 | ||
217 | "Copyright (c) 2004 Lutz Rogowski <lutz@pi-sync.net>\n" | 258 | "Copyright (c) 2004 Lutz Rogowski <lutz@pi-sync.net>\n" |
218 | "KOpieMail/Pi is based on Opie Mail\n" | 259 | "KOpieMail/Pi is based on Opie Mail\n" |
219 | "Copyright (c) Rajko Albrecht and the Opie team\n" | 260 | "Copyright (c) Rajko Albrecht and the Opie team\n" |
220 | "KOpieMail/Pi is licensed under the GPL\n" | 261 | "KOpieMail/Pi is licensed under the GPL\n" |
221 | "\n" | 262 | "\n" |
222 | "KOpieMail/Pi uses LibEtPan - a mail stuff library\n" | 263 | "KOpieMail/Pi uses LibEtPan - a mail stuff library\n" |
223 | "Copyright (C) 2001, 2002 - DINH Viet Hoa\n" | 264 | "Copyright (C) 2001, 2002 - DINH Viet Hoa\n" |
224 | "libEtPan has its own licence - see LibEtPan licence\n"; | 265 | "libEtPan has its own licence - see LibEtPan licence\n"; |
225 | 266 | ||
226 | KApplication::showText( cap, text ); | 267 | KApplication::showText( cap, text ); |
227 | } | 268 | } |
228 | void MainWindow::showEtpanLicence() | 269 | void MainWindow::showEtpanLicence() |
229 | { | 270 | { |
230 | KApplication::showFile( "LibEtPan licence", "kdepim/kopiemail/COPYRIGHTlibetpan" ); | 271 | KApplication::showFile( "LibEtPan licence", "kdepim/kopiemail/COPYRIGHTlibetpan" ); |
231 | 272 | ||
232 | } | 273 | } |
233 | void MainWindow::appMessage(const QCString &, const QByteArray &) | 274 | void MainWindow::appMessage(const QCString &, const QByteArray &) |
234 | { | 275 | { |
235 | qDebug("appMessage implemented by subclass"); | 276 | qDebug("appMessage implemented by subclass"); |
236 | } | 277 | } |
237 | 278 | ||
238 | void MainWindow::slotAdjustLayout() { | 279 | void MainWindow::slotAdjustLayout() { |
239 | 280 | ||
240 | /* | 281 | /* |
241 | QWidget *d = QApplication::desktop(); | 282 | QWidget *d = QApplication::desktop(); |
242 | 283 | ||
243 | if ( d->width() < d->height() ) { | 284 | if ( d->width() < d->height() ) { |
244 | layout->setDirection( QBoxLayout::TopToBottom ); | 285 | layout->setDirection( QBoxLayout::TopToBottom ); |
245 | } else { | 286 | } else { |
246 | layout->setDirection( QBoxLayout::LeftToRight ); | 287 | layout->setDirection( QBoxLayout::LeftToRight ); |
247 | } | 288 | } |
248 | */ | 289 | */ |
249 | } | 290 | } |
250 | 291 | ||
251 | void MainWindow::slotAdjustColumns() | 292 | void MainWindow::slotAdjustColumns() |
252 | { | 293 | { |
253 | bool hidden = folderView->isHidden(); | 294 | bool hidden = folderView->isHidden(); |
254 | if ( hidden ) folderView->show(); | 295 | if ( hidden ) folderView->show(); |
255 | folderView->setColumnWidth( 0, folderView->visibleWidth() ); | 296 | folderView->setColumnWidth( 0, folderView->visibleWidth() ); |
256 | if ( hidden ) folderView->hide(); | 297 | if ( hidden ) folderView->hide(); |
257 | 298 | ||
258 | mailView->setColumnWidth( 0, 10 ); | 299 | mailView->setColumnWidth( 0, 10 ); |
259 | mailView->setColumnWidth( 1, 100 ); | 300 | mailView->setColumnWidth( 1, 100 ); |
260 | mailView->setColumnWidth( 2, 100 ); | 301 | mailView->setColumnWidth( 2, 100 ); |
261 | mailView->setColumnWidth( 3, 50 ); | 302 | mailView->setColumnWidth( 3, 50 ); |
262 | mailView->setColumnWidth( 4, 120 ); | 303 | mailView->setColumnWidth( 4, 120 ); |
263 | } | 304 | } |
264 | 305 | ||
265 | void MainWindow::slotEditSettings() | 306 | void MainWindow::slotEditSettings() |
266 | { | 307 | { |
267 | } | 308 | } |
268 | 309 | ||
269 | void MainWindow::slotShowFolders( bool ) | 310 | void MainWindow::slotShowFolders( bool ) |
270 | { | 311 | { |
271 | qDebug("not implemented: "); | 312 | qDebug("not implemented: "); |
272 | } | 313 | } |
273 | 314 | ||
274 | void MainWindow::refreshMailView(const QValueList<RecMailP>&) | 315 | void MainWindow::refreshMailView(const QValueList<RecMailP>&) |
275 | { | 316 | { |
276 | qDebug("not implemented: "); | 317 | qDebug("not implemented: "); |
277 | } | 318 | } |
278 | 319 | ||
279 | void MainWindow::mailLeftClicked(QListViewItem * ) | 320 | void MainWindow::mailLeftClicked(QListViewItem * ) |
280 | { | 321 | { |
281 | qDebug("not implemented: "); | 322 | qDebug("not implemented: "); |
282 | } | 323 | } |
283 | 324 | ||
284 | void MainWindow::displayMail() | 325 | void MainWindow::displayMail() |
285 | { | 326 | { |
286 | qDebug("not implemented: "); | 327 | qDebug("not implemented: "); |
287 | } | 328 | } |
288 | 329 | ||
289 | void MainWindow::slotDeleteMail() | 330 | void MainWindow::slotDeleteMail() |
290 | { | 331 | { |
291 | qDebug("not implemented: "); | 332 | qDebug("not implemented: "); |
292 | } | 333 | } |
293 | 334 | ||
294 | void MainWindow::mailHold(int, QListViewItem *,const QPoint&,int ) | 335 | void MainWindow::mailHold(int, QListViewItem *,const QPoint&,int ) |
295 | { | 336 | { |
296 | qDebug("not implemented: "); | 337 | qDebug("not implemented: "); |
297 | } | 338 | } |
298 | 339 | ||
299 | void MainWindow::slotSendQueued() | 340 | void MainWindow::slotSendQueued() |
300 | { | 341 | { |
301 | qDebug("not implemented: "); | 342 | qDebug("not implemented: "); |
302 | } | 343 | } |
303 | 344 | ||
304 | void MainWindow::slotEditAccounts() | 345 | void MainWindow::slotEditAccounts() |
305 | { | 346 | { |
306 | qDebug("not implemented: "); | 347 | qDebug("not implemented: "); |
307 | } | 348 | } |
308 | 349 | ||
309 | void MainWindow::slotComposeMail() | 350 | void MainWindow::slotComposeMail() |
310 | { | 351 | { |
311 | qDebug("not implemented: "); | 352 | qDebug("not implemented: "); |
312 | } | 353 | } |