From 0b7d74768f00be986f44bfbd61a6342fc854cc3a Mon Sep 17 00:00:00 2001 From: harlekin Date: Tue, 09 Dec 2003 18:02:33 +0000 Subject: more updates --- (limited to 'noncore/net/mail/mainwindow.cpp') diff --git a/noncore/net/mail/mainwindow.cpp b/noncore/net/mail/mainwindow.cpp index b25db97..f19f93d 100644 --- a/noncore/net/mail/mainwindow.cpp +++ b/noncore/net/mail/mainwindow.cpp @@ -71,15 +71,7 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) QWidget *view = new QWidget( this ); setCentralWidget( view ); - - QWidget *d = QApplication::desktop(); - QBoxLayout *layout; - - if ( d->width() < d->height() ) { - layout = new QVBoxLayout( view ); - } else { - layout = new QHBoxLayout( view ); - } + layout = new QBoxLayout ( view, QBoxLayout::LeftToRight ); folderView = new AccountView( view ); folderView->header()->hide(); @@ -99,6 +91,8 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) layout->setStretchFactor( folderView, 1 ); layout->setStretchFactor( mailView, 2 ); + slotAdjustLayout(); + connect( mailView, SIGNAL( clicked( QListViewItem * ) ),this, SLOT( displayMail( QListViewItem * ) ) ); @@ -107,6 +101,19 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) QTimer::singleShot( 1000, this, SLOT( slotAdjustColumns() ) ); } + +void MainWindow::slotAdjustLayout() { + + QWidget *d = QApplication::desktop(); + + if ( d->width() < d->height() ) { + layout->setDirection( QBoxLayout::TopToBottom ); + } else { + layout->setDirection( QBoxLayout::LeftToRight ); + } + delete d; +} + void MainWindow::slotAdjustColumns() { bool hidden = folderView->isHidden(); @@ -149,7 +156,8 @@ void MainWindow::displayMail(QListViewItem*item) RecBody body = folderView->fetchBody(mail); ViewMail readMail( this ); - readMail.setMailInfo( mail.getFrom(), "", mail.getSubject(), "", "", body.Bodytext() ); + + readMail.setMailInfo( mail.getFrom(), mail.To(), mail.getSubject(), mail.CC(), mail.Bcc(), mail.getDate(), body.Bodytext() ); readMail.showMaximized(); readMail.exec(); } -- cgit v0.9.0.2