summaryrefslogtreecommitdiffabout
path: root/kmicromail/mainwindow.cpp
Unidiff
Diffstat (limited to 'kmicromail/mainwindow.cpp') (more/less context) (show whitespace changes)
-rw-r--r--kmicromail/mainwindow.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/kmicromail/mainwindow.cpp b/kmicromail/mainwindow.cpp
index e3c5ec3..82a915e 100644
--- a/kmicromail/mainwindow.cpp
+++ b/kmicromail/mainwindow.cpp
@@ -1,73 +1,74 @@
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#include <kabc/stdaddressbook.h>
16extern QStatusBar* globalSstatusBarMainWindow; 16extern QStatusBar* globalSstatusBarMainWindow;
17#else 17#else
18#include <qpe/qpeapplication.h> 18#include <qpe/qpeapplication.h>
19#include <klocale.h> 19#include <klocale.h>
20#endif 20#endif
21#include "defines.h" 21#include "defines.h"
22#include "koprefs.h" 22#include "koprefs.h"
23#include "mainwindow.h" 23#include "mainwindow.h"
24#include "mailistviewitem.h" 24#include "mailistviewitem.h"
25#include <KDGanttMinimizeSplitter.h> 25#include <KDGanttMinimizeSplitter.h>
26#include <libkdepim/kpimglobalprefs.h>
26 27
27#include "koprefs.h" 28#include "koprefs.h"
28 29
29MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) 30MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags )
30 : QMainWindow( parent, name ) //, flags ) 31 : QMainWindow( parent, name ) //, flags )
31{ 32{
32#ifdef DESKTOP_VERSION 33#ifdef DESKTOP_VERSION
33 globalSstatusBarMainWindow = statusBar(); 34 globalSstatusBarMainWindow = statusBar();
34#endif 35#endif
35 setCaption( i18n( "KOpieMail/Pi" ) ); 36 setCaption( i18n( "KOpieMail/Pi" ) );
36 setToolBarsMovable( false ); 37 setToolBarsMovable( false );
37 //KABC::StdAddressBook::self(); 38 //KABC::StdAddressBook::self();
38 toolBar = new QToolBar( this ); 39 toolBar = new QToolBar( this );
39 menuBar = new QPEMenuBar( toolBar ); 40 menuBar = new QPEMenuBar( toolBar );
40 mailMenu = new QPopupMenu( menuBar ); 41 mailMenu = new QPopupMenu( menuBar );
41 menuBar->insertItem( i18n( "Mail" ), mailMenu ); 42 menuBar->insertItem( i18n( "Mail" ), mailMenu );
42 settingsMenu = new QPopupMenu( menuBar ); 43 settingsMenu = new QPopupMenu( menuBar );
43 menuBar->insertItem( i18n( "Settings" ), settingsMenu ); 44 menuBar->insertItem( i18n( "Settings" ), settingsMenu );
44 45
45 addToolBar( toolBar ); 46 addToolBar( toolBar );
46 toolBar->setHorizontalStretchable( true ); 47 toolBar->setHorizontalStretchable( true );
47 QAction* getMail = new QAction( i18n( "Get all new mails" ), SmallIcon("enter"), 48 QAction* getMail = new QAction( i18n( "Get all new mails" ), SmallIcon("enter"),
48 0, 0, this ); 49 0, 0, this );
49 connect(getMail, SIGNAL( activated() ), 50 connect(getMail, SIGNAL( activated() ),
50 SLOT( slotGetAllMail() ) ); 51 SLOT( slotGetAllMail() ) );
51 getMail->addTo( mailMenu ); 52 getMail->addTo( mailMenu );
52 53
53 getMail = new QAction( i18n( "Get new messages" ), SmallIcon("add"), 54 getMail = new QAction( i18n( "Get new messages" ), SmallIcon("add"),
54 0, 0, this ); 55 0, 0, this );
55 getMail->addTo( toolBar ); 56 getMail->addTo( toolBar );
56 getMail->addTo( mailMenu ); 57 getMail->addTo( mailMenu );
57 connect(getMail, SIGNAL( activated() ), 58 connect(getMail, SIGNAL( activated() ),
58 SLOT( slotGetMail() ) ); 59 SLOT( slotGetMail() ) );
59 60
60 composeMail = new QAction( i18n( "Compose new mail" ), SmallIcon("composemail"), 61 composeMail = new QAction( i18n( "Compose new mail" ), SmallIcon("composemail"),
61 0, 0, this ); 62 0, 0, this );
62 composeMail->addTo( toolBar ); 63 composeMail->addTo( toolBar );
63 composeMail->addTo( mailMenu ); 64 composeMail->addTo( mailMenu );
64 65
65 sendQueued = new QAction( i18n( "Send queued mails" ), SmallIcon("sendqueued") , 66 sendQueued = new QAction( i18n( "Send queued mails" ), SmallIcon("sendqueued") ,
66 0, 0, this ); 67 0, 0, this );
67 sendQueued->addTo( toolBar ); 68 sendQueued->addTo( toolBar );
68 sendQueued->addTo( mailMenu ); 69 sendQueued->addTo( mailMenu );
69 70
70 /* 71 /*
71 syncFolders = new QAction( i18n( "Sync mailfolders" ), ICON_SYNC, 72 syncFolders = new QAction( i18n( "Sync mailfolders" ), ICON_SYNC,
72 0, 0, this ); 73 0, 0, this );
73 syncFolders->addTo( toolBar ); 74 syncFolders->addTo( toolBar );
@@ -120,151 +121,153 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags )
120 codecMenu->insertItem( "Chinese (big-5)",3,3); 121 codecMenu->insertItem( "Chinese (big-5)",3,3);
121 codecMenu->insertItem( "Unicode (utf-8)",4,4); 122 codecMenu->insertItem( "Unicode (utf-8)",4,4);
122 codecMenu->insertItem( "Userdefined ("+KOPrefs::instance()->mSendCodec+")",5,5); 123 codecMenu->insertItem( "Userdefined ("+KOPrefs::instance()->mSendCodec+")",5,5);
123 //disabled 124 //disabled
124 //settingsMenu->insertItem( i18n("Codec for new mails"), codecMenu); 125 //settingsMenu->insertItem( i18n("Codec for new mails"), codecMenu);
125 //setCentralWidget( view ); 126 //setCentralWidget( view );
126 127
127 QVBox* wrapperBox = new QVBox( this ); 128 QVBox* wrapperBox = new QVBox( this );
128 setCentralWidget( wrapperBox ); 129 setCentralWidget( wrapperBox );
129 130
130 // QWidget *view = new QWidget( wrapperBox ); 131 // QWidget *view = new QWidget( wrapperBox );
131 KDGanttMinimizeSplitter* splithor = new KDGanttMinimizeSplitter( Qt::Vertical, wrapperBox); 132 KDGanttMinimizeSplitter* splithor = new KDGanttMinimizeSplitter( Qt::Vertical, wrapperBox);
132 splithor->setMinimizeDirection( KDGanttMinimizeSplitter::Down); 133 splithor->setMinimizeDirection( KDGanttMinimizeSplitter::Down);
133 KDGanttMinimizeSplitter* split = new KDGanttMinimizeSplitter( Qt::Horizontal, splithor); 134 KDGanttMinimizeSplitter* split = new KDGanttMinimizeSplitter( Qt::Horizontal, splithor);
134 split->setMinimizeDirection( KDGanttMinimizeSplitter::Left); 135 split->setMinimizeDirection( KDGanttMinimizeSplitter::Left);
135 //layout = new QBoxLayout ( split, QBoxLayout::LeftToRight ); 136 //layout = new QBoxLayout ( split, QBoxLayout::LeftToRight );
136 subLE = 0; 137 subLE = 0;
137 fromLE = 0; 138 fromLE = 0;
138 toLE = 0; 139 toLE = 0;
139 if ( KOPrefs::instance()->mShowInfoSub || KOPrefs::instance()->mShowInfoFrom || KOPrefs::instance()->mShowInfoTo ) { 140 if ( KOPrefs::instance()->mShowInfoSub || KOPrefs::instance()->mShowInfoFrom || KOPrefs::instance()->mShowInfoTo ) {
140 QWidget* infoBox = new QWidget( splithor ); 141 QWidget* infoBox = new QWidget( splithor );
141 QGridLayout *griLay = new QGridLayout( infoBox, 2,2); 142 QGridLayout *griLay = new QGridLayout( infoBox, 2,2);
142 if ( KOPrefs::instance()->mShowInfoSub ) { 143 if ( KOPrefs::instance()->mShowInfoSub ) {
143 griLay->addWidget( new QLabel ( i18n("Su:"), infoBox ),0,0 ); 144 griLay->addWidget( new QLabel ( i18n("Su:"), infoBox ),0,0 );
144 griLay->addWidget( subLE = new QLineEdit( infoBox ),0,1) ; 145 griLay->addWidget( subLE = new QLineEdit( infoBox ),0,1) ;
145 } 146 }
146 if ( KOPrefs::instance()->mShowInfoFrom ) { 147 if ( KOPrefs::instance()->mShowInfoFrom ) {
147 griLay->addWidget( new QLabel ( i18n("Fr:"), infoBox ),1,0 ); 148 griLay->addWidget( new QLabel ( i18n("Fr:"), infoBox ),1,0 );
148 griLay->addWidget( fromLE = new QLineEdit( infoBox ),1,1) ; 149 griLay->addWidget( fromLE = new QLineEdit( infoBox ),1,1) ;
149 } 150 }
150 if ( KOPrefs::instance()->mShowInfoTo ) { 151 if ( KOPrefs::instance()->mShowInfoTo ) {
151 griLay->addWidget( new QLabel ( i18n("To:"), infoBox ),2,0 ); 152 griLay->addWidget( new QLabel ( i18n("To:"), infoBox ),2,0 );
152 griLay->addWidget( toLE = new QLineEdit( infoBox ),2,1) ; 153 griLay->addWidget( toLE = new QLineEdit( infoBox ),2,1) ;
153 } 154 }
154 infoBox->setMaximumHeight( infoBox->sizeHint().height() ); 155 infoBox->setMaximumHeight( infoBox->sizeHint().height() );
155 if ( !KOPrefs::instance()->mShowInfoStart ) { 156 if ( !KOPrefs::instance()->mShowInfoStart ) {
156 QTimer::singleShot( 1,splithor, SLOT ( toggle() ) ); 157 QTimer::singleShot( 1,splithor, SLOT ( toggle() ) );
157 } 158 }
158 } 159 }
159 160
160 161
161 folderView = new AccountView( split ); 162 folderView = new AccountView( split );
162 folderView->header()->hide(); 163 folderView->header()->hide();
163 folderView->setRootIsDecorated( false ); 164 folderView->setRootIsDecorated( false );
164 folderView->addColumn( i18n( "Mailbox" ) ); 165 folderView->addColumn( i18n( "Mailbox" ) );
165 166
166 //layout->addWidget( folderView ); 167 //layout->addWidget( folderView );
167 168
168 mailView = new QListView( split ); 169 mailView = new KListView( split );
169 mailView->addColumn( i18n( " " ) ); 170 mailView->addColumn( i18n( " " ) );
170 mailView->addColumn( i18n( "Subject" ),QListView::Manual ); 171 mailView->addColumn( i18n( "Subject" ),QListView::Manual );
171 mailView->addColumn( i18n( "Sender" ),QListView::Manual ); 172 mailView->addColumn( i18n( "Sender" ),QListView::Manual );
172 mailView->addColumn( i18n( "Size" ),QListView::Manual); 173 mailView->addColumn( i18n( "Size" ),QListView::Manual);
173 mailView->addColumn( i18n( "Date" ),QListView::Manual); 174 mailView->addColumn( i18n( "Date" ),QListView::Manual);
174 if ( KOPrefs::instance()->mShowToField ) 175 if ( KOPrefs::instance()->mShowToField )
175 mailView->addColumn( i18n( "To" ),QListView::Manual); 176 mailView->addColumn( i18n( "To" ),QListView::Manual);
176 mailView->setAllColumnsShowFocus(true); 177 mailView->setAllColumnsShowFocus(true);
177 //mailView->setSorting(-1); 178 //mailView->setSorting(-1);
178 mailView->setRootIsDecorated( false ); 179 mailView->setRootIsDecorated( false );
179 statusWidget = new StatusWidget( wrapperBox ); 180 statusWidget = new StatusWidget( wrapperBox );
180 statusWidget->hide(); 181 statusWidget->hide();
181 182 mailView->setSelectionMode( QListView::Multi );
183 mailView->setMultiSelection( true);
184 mailView->setAlternateBackground(KPimGlobalPrefs::instance()->mAlternateColor );
182 //layout->addWidget( mailView ); 185 //layout->addWidget( mailView );
183 //layout->setStretchFactor( folderView, 1 ); 186 //layout->setStretchFactor( folderView, 1 );
184 //layout->setStretchFactor( mailView, 2 ); 187 //layout->setStretchFactor( mailView, 2 );
185 188
186 slotAdjustLayout(); 189 slotAdjustLayout();
187#ifndef DESKTOP_VERSION 190#ifndef DESKTOP_VERSION
188 QPEApplication::setStylusOperation( mailView->viewport(),QPEApplication::RightOnHold); 191 QPEApplication::setStylusOperation( mailView->viewport(),QPEApplication::RightOnHold);
189 QPEApplication::setStylusOperation( folderView->viewport(),QPEApplication::RightOnHold); 192 QPEApplication::setStylusOperation( folderView->viewport(),QPEApplication::RightOnHold);
190 if ( subLE ) 193 if ( subLE )
191 QPEApplication::setStylusOperation( subLE ,QPEApplication::RightOnHold); 194 QPEApplication::setStylusOperation( subLE ,QPEApplication::RightOnHold);
192 if ( fromLE ) 195 if ( fromLE )
193 QPEApplication::setStylusOperation( fromLE ,QPEApplication::RightOnHold); 196 QPEApplication::setStylusOperation( fromLE ,QPEApplication::RightOnHold);
194 if ( toLE ) 197 if ( toLE )
195 QPEApplication::setStylusOperation( toLE ,QPEApplication::RightOnHold); 198 QPEApplication::setStylusOperation( toLE ,QPEApplication::RightOnHold);
196#endif 199#endif
197 connect( mailView, SIGNAL( doubleClicked (QListViewItem* )),this, 200 connect( mailView, SIGNAL( doubleClicked (QListViewItem* )),this,
198 SLOT( mailLeftClicked(QListViewItem*) ) ); 201 SLOT( mailLeftClicked(QListViewItem*) ) );
199 connect( mailView, SIGNAL( returnPressed (QListViewItem* )),this, 202 connect( mailView, SIGNAL( returnPressed (QListViewItem* )),this,
200 SLOT( mailLeftClicked(QListViewItem*) ) ); 203 SLOT( mailLeftClicked(QListViewItem*) ) );
201 connect( mailView, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int) ),this, 204 connect( mailView, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int) ),this,
202 SLOT( mailHold(int,QListViewItem*,const QPoint&,int) ) ); 205 SLOT( mailHold(int,QListViewItem*,const QPoint&,int) ) );
203 connect(folderView, SIGNAL(refreshMailview(const QValueList<RecMailP>&)), 206 connect(folderView, SIGNAL(refreshMailview(const QValueList<RecMailP>&)),
204 this,SLOT(refreshMailView(const QValueList<RecMailP>&))); 207 this,SLOT(refreshMailView(const QValueList<RecMailP>&)));
205 208
206 connect( mailView, SIGNAL( currentChanged (QListViewItem* )),this, 209 connect( mailView, SIGNAL( currentChanged (QListViewItem* )),this,
207 SLOT( setInfoFields(QListViewItem*) ) ); 210 SLOT( setInfoFields(QListViewItem*) ) );
208 211
209 connect( composeMail, SIGNAL( activated() ), SLOT( slotComposeMail() ) ); 212 connect( composeMail, SIGNAL( activated() ), SLOT( slotComposeMail() ) );
210 connect( sendQueued, SIGNAL( activated() ), SLOT( slotSendQueued() ) ); 213 connect( sendQueued, SIGNAL( activated() ), SLOT( slotSendQueued() ) );
211// connect( searchMails, SIGNAL( activated() ), SLOT( slotSearchMails() ) ); 214// connect( searchMails, SIGNAL( activated() ), SLOT( slotSearchMails() ) );
212 connect( editAccounts, SIGNAL( activated() ), SLOT( slotEditAccounts() ) ); 215 connect( editAccounts, SIGNAL( activated() ), SLOT( slotEditAccounts() ) );
213 //mailView->setMultiSelection ( true ); 216 //mailView->setMultiSelection ( true );
214 mailView->setSelectionMode( QListView::Extended ); 217 //mailView->setSelectionMode( QListView::Extended );
215 QValueList<int> list; 218 QValueList<int> list;
216 int fw = 100; 219 int fw = 100;
217 if ( QApplication::desktop()->width() > 320 ) 220 if ( QApplication::desktop()->width() > 320 )
218 fw = 50; 221 fw = 50;
219 list.append( fw ); 222 list.append( fw );
220 list.append( 100 ); 223 list.append( 100 );
221 split->setSizes( list ); 224 split->setSizes( list );
222 QTimer::singleShot( 1000, this, SLOT( slotAdjustColumns() ) ); 225 QTimer::singleShot( 100, this, SLOT( slotAdjustColumns() ) );
223 mailView->setShowSortIndicator ( true ); 226 mailView->setShowSortIndicator ( true );
224 QLabel *spacer = new QLabel( toolBar ); 227 QLabel *spacer = new QLabel( toolBar );
225 spacer->setBackgroundMode( QWidget::PaletteButton ); 228 spacer->setBackgroundMode( QWidget::PaletteButton );
226 toolBar->setStretchableWidget( spacer ); 229 toolBar->setStretchableWidget( spacer );
227 230
228 QAction* closeMail = new QAction(i18n("Close"),SmallIcon("exit"), 0, 0, this); 231 QAction* closeMail = new QAction(i18n("Close"),SmallIcon("exit"), 0, 0, this);
229 connect( closeMail, SIGNAL( activated() ), SLOT( close() ) ); 232 connect( closeMail, SIGNAL( activated() ), SLOT( close() ) );
230 if ( QApplication::desktop()->width() > 320 ) 233 if ( QApplication::desktop()->width() > 320 )
231 closeMail->addTo(toolBar); 234 closeMail->addTo(toolBar);
232 closeMail->addTo(mailMenu); 235 closeMail->addTo(mailMenu);
233 236
234 237
235 QPopupMenu* helpMenu = new QPopupMenu( menuBar ); 238 QPopupMenu* helpMenu = new QPopupMenu( menuBar );
236 menuBar->insertItem( i18n( "Help" ), helpMenu ); 239 menuBar->insertItem( i18n( "Help" ), helpMenu );
237 QAction* li = new QAction(i18n("About"), QPixmap(), 0, 0, this); 240 QAction* li = new QAction(i18n("About"), QPixmap(), 0, 0, this);
238 connect( li, SIGNAL( activated() ), SLOT( showAbout()) ); 241 connect( li, SIGNAL( activated() ), SLOT( showAbout()) );
239 li->addTo(helpMenu); 242 li->addTo(helpMenu);
240 li = new QAction(i18n("Licence"),QPixmap(), 0, 0, this); 243 li = new QAction(i18n("Licence"),QPixmap(), 0, 0, this);
241 connect( li, SIGNAL( activated() ), SLOT( showLicence()) ); 244 connect( li, SIGNAL( activated() ), SLOT( showLicence()) );
242 li->addTo(helpMenu); 245 li->addTo(helpMenu);
243 li = new QAction(i18n("LibEtPan Licence"), QPixmap(), 0, 0, this); 246 li = new QAction(i18n("LibEtPan Licence"), QPixmap(), 0, 0, this);
244 connect( li, SIGNAL( activated() ), SLOT( showEtpanLicence()) ); 247 connect( li, SIGNAL( activated() ), SLOT( showEtpanLicence()) );
245 li->addTo(helpMenu); 248 li->addTo(helpMenu);
246 connect( codecMenu, SIGNAL( activated(int) ), this, SLOT( slotSetCodec( int )) ); 249 connect( codecMenu, SIGNAL( activated(int) ), this, SLOT( slotSetCodec( int )) );
247 slotSetCodec( KOPrefs::instance()->mCurrentCodec ); 250 slotSetCodec( KOPrefs::instance()->mCurrentCodec );
248 menuBar->setMaximumWidth( menuBar->sizeHint().width()); 251 menuBar->setMaximumWidth( menuBar->sizeHint().width());
249 //menuBar->setMaximumSize( menuBar->sizeHint()); 252 //menuBar->setMaximumSize( menuBar->sizeHint());
250#ifdef DESKTOP_VERSION 253#ifdef DESKTOP_VERSION
251 resize ( 640, 480 ); 254 resize ( 640, 480 );
252#endif 255#endif
253} 256}
254 257
255MainWindow::~MainWindow() 258MainWindow::~MainWindow()
256{ 259{
257} 260}
258 261
259void MainWindow::setInfoFields(QListViewItem* item ) 262void MainWindow::setInfoFields(QListViewItem* item )
260{ 263{
261 if ( item == 0) { 264 if ( item == 0) {
262 if ( subLE ) subLE->setText(""); 265 if ( subLE ) subLE->setText("");
263 if ( fromLE ) fromLE->setText(""); 266 if ( fromLE ) fromLE->setText("");
264 if ( toLE ) toLE->setText(""); 267 if ( toLE ) toLE->setText("");
265 return; 268 return;
266 } 269 }
267 RecMailP mail = ((MailListViewItem*)item)->data(); 270 RecMailP mail = ((MailListViewItem*)item)->data();
268 if ( subLE ) subLE->setText(mail->getSubject()); 271 if ( subLE ) subLE->setText(mail->getSubject());
269 if ( fromLE ) fromLE->setText(mail->getFrom()); 272 if ( fromLE ) fromLE->setText(mail->getFrom());
270 if ( toLE ) toLE->setText(mail->To().join(";" )); 273 if ( toLE ) toLE->setText(mail->To().join(";" ));
@@ -325,100 +328,101 @@ void MainWindow::showAbout()
325 "www.pi-sync.info\n\n" 328 "www.pi-sync.info\n\n"
326 329
327 330
328 331
329"Copyright (c) 2004 Lutz Rogowski <lutz@pi-sync.info>\n" 332"Copyright (c) 2004 Lutz Rogowski <lutz@pi-sync.info>\n"
330 "KOpieMail/Pi is based on Opie Mail\n" 333 "KOpieMail/Pi is based on Opie Mail\n"
331 "Copyright (c) Rajko Albrecht and the Opie team\n" 334 "Copyright (c) Rajko Albrecht and the Opie team\n"
332 "KOpieMail/Pi is licensed under the GPL\n" 335 "KOpieMail/Pi is licensed under the GPL\n"
333 "\n" 336 "\n"
334 "KOpieMail/Pi uses LibEtPan - a mail stuff library\n" 337 "KOpieMail/Pi uses LibEtPan - a mail stuff library\n"
335 "Copyright (C) 2001, 2002 - DINH Viet Hoa\n" 338 "Copyright (C) 2001, 2002 - DINH Viet Hoa\n"
336 "libEtPan has its own licence - see LibEtPan licence\n"; 339 "libEtPan has its own licence - see LibEtPan licence\n";
337 340
338 KApplication::showText( cap, text ); 341 KApplication::showText( cap, text );
339} 342}
340void MainWindow::showEtpanLicence() 343void MainWindow::showEtpanLicence()
341{ 344{
342 KApplication::showFile( "LibEtPan licence", "kdepim/kopiemail/COPYRIGHTlibetpan" ); 345 KApplication::showFile( "LibEtPan licence", "kdepim/kopiemail/COPYRIGHTlibetpan" );
343 346
344} 347}
345void MainWindow::appMessage(const QCString &, const QByteArray &) 348void MainWindow::appMessage(const QCString &, const QByteArray &)
346{ 349{
347 qDebug("appMessage implemented by subclass"); 350 qDebug("appMessage implemented by subclass");
348} 351}
349 352
350void MainWindow::slotAdjustLayout() { 353void MainWindow::slotAdjustLayout() {
351 354
352 /* 355 /*
353 QWidget *d = QApplication::desktop(); 356 QWidget *d = QApplication::desktop();
354 357
355 if ( d->width() < d->height() ) { 358 if ( d->width() < d->height() ) {
356 layout->setDirection( QBoxLayout::TopToBottom ); 359 layout->setDirection( QBoxLayout::TopToBottom );
357 } else { 360 } else {
358 layout->setDirection( QBoxLayout::LeftToRight ); 361 layout->setDirection( QBoxLayout::LeftToRight );
359 } 362 }
360 */ 363 */
361} 364}
362 365
363void MainWindow::slotAdjustColumns() 366void MainWindow::slotAdjustColumns()
364{ 367{
365 bool hidden = folderView->isHidden(); 368 bool hidden = folderView->isHidden();
366 if ( hidden ) folderView->show(); 369 if ( hidden ) folderView->show();
367 folderView->setColumnWidth( 0, folderView->visibleWidth() ); 370 folderView->setColumnWidth( 0, folderView->visibleWidth() );
368 if ( hidden ) folderView->hide(); 371 if ( hidden ) folderView->hide();
369 372
370 mailView->setColumnWidth( 0, 10 ); 373 mailView->setColumnWidth( 0, 10 );
371 mailView->setColumnWidth( 1, 100 ); 374 mailView->setColumnWidth( 1, 100 );
372 mailView->setColumnWidth( 2, 100 ); 375 mailView->setColumnWidth( 2, 100 );
373 mailView->setColumnWidth( 3, 50 ); 376 mailView->setColumnWidth( 3, 70 );
374 mailView->setColumnWidth( 4, 120 ); 377 mailView->setColumnWidth( 4, 170 );
375 if ( KOPrefs::instance()->mShowToField ) 378 if ( KOPrefs::instance()->mShowToField )
376 mailView->setColumnWidth( 5, 100 ); 379 mailView->setColumnWidth( 5, 100 );
380 mailView->setColumnAlignment( 3, AlignRight);
377} 381}
378 382
379void MainWindow::slotEditSettings() 383void MainWindow::slotEditSettings()
380{ 384{
381} 385}
382void MainWindow::slotEditGlobalSettings() 386void MainWindow::slotEditGlobalSettings()
383{ 387{
384} 388}
385 389
386void MainWindow::slotShowFolders( bool ) 390void MainWindow::slotShowFolders( bool )
387{ 391{
388 qDebug("not implemented: "); 392 qDebug("not implemented: ");
389} 393}
390 394
391void MainWindow::refreshMailView(const QValueList<RecMailP>&) 395void MainWindow::refreshMailView(const QValueList<RecMailP>&)
392{ 396{
393 qDebug("not implemented: "); 397 qDebug("not implemented: ");
394} 398}
395 399
396void MainWindow::mailLeftClicked(QListViewItem * ) 400void MainWindow::mailLeftClicked(QListViewItem * )
397{ 401{
398 qDebug("not implemented: "); 402 qDebug("not implemented: ");
399} 403}
400 404
401void MainWindow::displayMail() 405void MainWindow::displayMail()
402{ 406{
403 qDebug("not implemented: "); 407 qDebug("not implemented: ");
404} 408}
405 409
406void MainWindow::slotDeleteMail() 410void MainWindow::slotDeleteMail()
407{ 411{
408 qDebug("not implemented: "); 412 qDebug("not implemented: ");
409} 413}
410 414
411void MainWindow::mailHold(int, QListViewItem *,const QPoint&,int ) 415void MainWindow::mailHold(int, QListViewItem *,const QPoint&,int )
412{ 416{
413 qDebug("not implemented: "); 417 qDebug("not implemented: ");
414} 418}
415 419
416void MainWindow::slotSendQueued() 420void MainWindow::slotSendQueued()
417{ 421{
418 qDebug("not implemented: "); 422 qDebug("not implemented: ");
419} 423}
420 424
421void MainWindow::slotEditAccounts() 425void MainWindow::slotEditAccounts()
422{ 426{
423 qDebug("not implemented: "); 427 qDebug("not implemented: ");
424} 428}