-rw-r--r-- | noncore/unsupported/mail2/mainwindow.cpp | 7 | ||||
-rw-r--r-- | noncore/unsupported/mail2/mainwindowbase.cpp | 23 | ||||
-rw-r--r-- | noncore/unsupported/mail2/mainwindowbase.h | 6 |
3 files changed, 20 insertions, 16 deletions
diff --git a/noncore/unsupported/mail2/mainwindow.cpp b/noncore/unsupported/mail2/mainwindow.cpp index 652db94..0044693 100644 --- a/noncore/unsupported/mail2/mainwindow.cpp +++ b/noncore/unsupported/mail2/mainwindow.cpp @@ -1,4 +1,5 @@ #include <qprogressbar.h> #include <qmessagebox.h> +#include <qtoolbutton.h> #include <qaction.h> #include <qlabel.h> @@ -16,5 +17,5 @@ MainWindow::MainWindow(QWidget *parent, const char *name, WFlags fl) : MainWindowBase(parent, name, fl) { - stop->setEnabled(false); + stopButton->setEnabled(false); connect(folderView, SIGNAL(status(const QString &)), statusLabel, SLOT(setText(const QString &))); @@ -26,7 +27,7 @@ MainWindow::MainWindow(QWidget *parent, const char *name, WFlags fl) connect(mailView, SIGNAL(progress(int)), statusProgress, SLOT(setProgress(int))); connect(mailView, SIGNAL(resetProgress()), statusProgress, SLOT(reset())); - connect(mailView, SIGNAL(stopEnabled(bool)), stop, SLOT(setEnabled(bool))); + connect(mailView, SIGNAL(stopEnabled(bool)), stopButton, SLOT(setEnabled(bool))); - connect(stop, SIGNAL(activated()), mailView, SLOT(stop())); + connect(stopButton, SIGNAL(clicked()), mailView, SLOT(stop())); connect(compose, SIGNAL(activated()), SLOT(slotCompose())); diff --git a/noncore/unsupported/mail2/mainwindowbase.cpp b/noncore/unsupported/mail2/mainwindowbase.cpp index d61899b..bffe8b3 100644 --- a/noncore/unsupported/mail2/mainwindowbase.cpp +++ b/noncore/unsupported/mail2/mainwindowbase.cpp @@ -22,9 +22,9 @@ MainWindowBase::MainWindowBase(QWidget *parent, const char *name, WFlags fl) toolbar = new QPEToolBar(this); - menubar = new QPEMenuBar( toolbar ); - mailmenu = new QPopupMenu( menubar ); - servermenu = new QPopupMenu( menubar ); - menubar->insertItem( tr( "Mail" ), mailmenu ); - menubar->insertItem( tr( "Servers" ), servermenu ); + menubar = new QPEMenuBar( toolbar ); + mailmenu = new QPopupMenu( menubar ); + servermenu = new QPopupMenu( menubar ); + menubar->insertItem( tr( "Mail" ), mailmenu ); + menubar->insertItem( tr( "Servers" ), servermenu ); addToolBar(toolbar); @@ -40,6 +40,6 @@ MainWindowBase::MainWindowBase(QWidget *parent, const char *name, WFlags fl) sendQueue = new QAction(tr("Send queued mails"), QIconSet(Resource::loadPixmap("mail/sendqueue")), 0, 0, this); - sendQueue->addTo(toolbar); - sendQueue->addTo(mailmenu); + sendQueue->addTo(toolbar); + sendQueue->addTo(mailmenu); folders = new QAction(tr("Show/hide folders"), QIconSet(Resource::loadPixmap("mail/folder")), 0, 0, this, 0, true); @@ -53,10 +53,6 @@ MainWindowBase::MainWindowBase(QWidget *parent, const char *name, WFlags fl) configure = new QAction(tr("Configuration"), QIconSet(Resource::loadPixmap("mail/configure")), 0, 0, this); - configure->addTo(toolbar); configure->addTo(servermenu); - stop = new QAction(tr("Abort"), QIconSet(Resource::loadPixmap("mail/abort")), 0, 0, this); - stop->addTo(toolbar); - QVBox *view = new QVBox(this); setCentralWidget(view); @@ -77,4 +73,9 @@ MainWindowBase::MainWindowBase(QWidget *parent, const char *name, WFlags fl) statusLabel->setFont(tmpFont); + stopButton = new QToolButton(status); + stopButton->setText(" X "); + stopButton->setMaximumHeight(15); + stopButton->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed)); + statusProgress = new QProgressBar(status); statusProgress->setCenterIndicator(true); diff --git a/noncore/unsupported/mail2/mainwindowbase.h b/noncore/unsupported/mail2/mainwindowbase.h index d8faeba..702933a 100644 --- a/noncore/unsupported/mail2/mainwindowbase.h +++ b/noncore/unsupported/mail2/mainwindowbase.h @@ -7,4 +7,5 @@ class ServerConnection; class QProgressBar; class FolderWidget; +class QToolButton; class QPEToolBar; class QPEMenuBar; @@ -28,9 +29,10 @@ protected: QProgressBar *statusProgress; FolderWidget *folderView; + QToolButton *stopButton; QPEToolBar *toolbar; QPEMenuBar *menubar; - QPopupMenu *mailmenu, *servermenu; + QPopupMenu *mailmenu, *servermenu; MailTable *mailView; - QAction *compose, *sendQueue, *folders, *findmails, *configure, *stop; + QAction *compose, *sendQueue, *folders, *findmails, *configure; QLabel *statusLabel; |