author | conber <conber> | 2002-07-10 15:58:52 (UTC) |
---|---|---|
committer | conber <conber> | 2002-07-10 15:58:52 (UTC) |
commit | c182d037fe82b7a7fc8adbc493eff9057d29a02d (patch) (side-by-side diff) | |
tree | 6553b5138914978000ed1286b2f588037d6d92e4 | |
parent | 0439137e4c18ad7d10002e2da6bea20b57ae1dec (diff) | |
download | opie-c182d037fe82b7a7fc8adbc493eff9057d29a02d.zip opie-c182d037fe82b7a7fc8adbc493eff9057d29a02d.tar.gz opie-c182d037fe82b7a7fc8adbc493eff9057d29a02d.tar.bz2 |
ui improvements
-rw-r--r-- | noncore/unsupported/mail2/mainwindow.cpp | 7 | ||||
-rw-r--r-- | noncore/unsupported/mail2/mainwindowbase.cpp | 9 | ||||
-rw-r--r-- | noncore/unsupported/mail2/mainwindowbase.h | 4 |
3 files changed, 12 insertions, 8 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,38 +1,39 @@ #include <qprogressbar.h> #include <qmessagebox.h> +#include <qtoolbutton.h> #include <qaction.h> #include <qlabel.h> #include "folderwidget.h" #include "mainwindow.h" #include "configdiag.h" #include "configfile.h" #include "searchdiag.h" #include "mailtable.h" #include "composer.h" #include "viewmail.h" 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 &))); connect(folderView, SIGNAL(folderSelected(Folder)), mailView, SLOT(setFolder(Folder))); connect(mailView, SIGNAL(mailClicked(IMAPResponseFETCH, IMAPHandler *)), SLOT(mailClicked(IMAPResponseFETCH, IMAPHandler *))); connect(mailView, SIGNAL(status(const QString &)), statusLabel, SLOT(setText(const QString &))); connect(mailView, SIGNAL(totalSteps(int)), statusProgress, SLOT(setTotalSteps(int))); 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())); connect(sendQueue, SIGNAL(activated()), SLOT(slotSendQueued())); connect(findmails, SIGNAL(activated()), SLOT(slotSearch())); connect(configure, SIGNAL(activated()), SLOT(slotConfigure())); } void MainWindow::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 @@ -47,22 +47,18 @@ MainWindowBase::MainWindowBase(QWidget *parent, const char *name, WFlags fl) folders->addTo(servermenu); connect(folders, SIGNAL(toggled(bool)), SLOT(slotFoldersToggled(bool))); findmails = new QAction(tr("Search mails"), QIconSet(Resource::loadPixmap("mail/find")), 0, 0, this); findmails->addTo(toolbar); findmails->addTo(mailmenu); 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); folderView = new FolderWidget(view); folderView->setMinimumHeight(90); folderView->setMaximumHeight(90); folderView->hide(); @@ -71,16 +67,21 @@ MainWindowBase::MainWindowBase(QWidget *parent, const char *name, WFlags fl) QHBox *status = new QHBox(view); statusLabel = new QLabel(status); QFont tmpFont = statusLabel->font(); tmpFont.setPixelSize(8); 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); statusProgress->setMaximumHeight(15); statusProgress->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed)); } void MainWindowBase::slotFoldersToggled(bool toggled) { 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 @@ -1,16 +1,17 @@ #ifndef MAINWINDOWBASE_H #define MAINWINDOWBASE_H #include <qmainwindow.h> class ServerConnection; class QProgressBar; class FolderWidget; +class QToolButton; class QPEToolBar; class QPEMenuBar; class QPopupMenu; class MailTable; class QAction; class QLabel; class MainWindowBase : public QMainWindow @@ -22,18 +23,19 @@ public: protected slots: void slotFoldersToggled(bool toggled); protected: ServerConnection *serverConnection; QProgressBar *statusProgress; FolderWidget *folderView; + QToolButton *stopButton; QPEToolBar *toolbar; QPEMenuBar *menubar; QPopupMenu *mailmenu, *servermenu; MailTable *mailView; - QAction *compose, *sendQueue, *folders, *findmails, *configure, *stop; + QAction *compose, *sendQueue, *folders, *findmails, *configure; QLabel *statusLabel; }; #endif |