author | conber <conber> | 2002-06-15 09:46:14 (UTC) |
---|---|---|
committer | conber <conber> | 2002-06-15 09:46:14 (UTC) |
commit | 7f2eef29708380844922f34f59ba4e9beefbf7c3 (patch) (unidiff) | |
tree | f57125fbaabddecc35d6677f1b9e48a4594165d5 /noncore/unsupported/mail2/mainwindow.cpp | |
parent | 0acbdd392814589df303b6e50c79d9822e3db27a (diff) | |
download | opie-7f2eef29708380844922f34f59ba4e9beefbf7c3.zip opie-7f2eef29708380844922f34f59ba4e9beefbf7c3.tar.gz opie-7f2eef29708380844922f34f59ba4e9beefbf7c3.tar.bz2 |
initial checkin
Diffstat (limited to 'noncore/unsupported/mail2/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/unsupported/mail2/mainwindow.cpp | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/noncore/unsupported/mail2/mainwindow.cpp b/noncore/unsupported/mail2/mainwindow.cpp new file mode 100644 index 0000000..4d15e23 --- a/dev/null +++ b/noncore/unsupported/mail2/mainwindow.cpp | |||
@@ -0,0 +1,65 @@ | |||
1 | #include <qprogressbar.h> | ||
2 | #include <qmessagebox.h> | ||
3 | #include <qaction.h> | ||
4 | #include <qlabel.h> | ||
5 | |||
6 | #include "folderwidget.h" | ||
7 | #include "mainwindow.h" | ||
8 | #include "configdiag.h" | ||
9 | #include "configfile.h" | ||
10 | #include "searchdiag.h" | ||
11 | #include "mailtable.h" | ||
12 | #include "composer.h" | ||
13 | #include "viewmail.h" | ||
14 | |||
15 | MainWindow::MainWindow(QWidget *parent, const char *name, WFlags fl) | ||
16 | : MainWindowBase(parent, name, fl) | ||
17 | { | ||
18 | stop->setEnabled(false); | ||
19 | |||
20 | connect(folderView, SIGNAL(status(const QString &)), statusLabel, SLOT(setText(const QString &))); | ||
21 | connect(folderView, SIGNAL(folderSelected(Folder)), mailView, SLOT(setFolder(Folder))); | ||
22 | |||
23 | connect(mailView, SIGNAL(mailClicked(IMAPResponseFETCH, IMAPHandler *)), SLOT(mailClicked(IMAPResponseFETCH, IMAPHandler *))); | ||
24 | connect(mailView, SIGNAL(status(const QString &)), statusLabel, SLOT(setText(const QString &))); | ||
25 | connect(mailView, SIGNAL(totalSteps(int)), statusProgress, SLOT(setTotalSteps(int))); | ||
26 | connect(mailView, SIGNAL(progress(int)), statusProgress, SLOT(setProgress(int))); | ||
27 | connect(mailView, SIGNAL(resetProgress()), statusProgress, SLOT(reset())); | ||
28 | connect(mailView, SIGNAL(stopEnabled(bool)), stop, SLOT(setEnabled(bool))); | ||
29 | |||
30 | connect(stop, SIGNAL(activated()), mailView, SLOT(stop())); | ||
31 | |||
32 | connect(compose, SIGNAL(activated()), SLOT(slotCompose())); | ||
33 | connect(findmails, SIGNAL(activated()), SLOT(slotSearch())); | ||
34 | connect(configure, SIGNAL(activated()), SLOT(slotConfigure())); | ||
35 | } | ||
36 | |||
37 | void MainWindow::slotCompose() | ||
38 | { | ||
39 | Composer *composer = new Composer(); | ||
40 | composer->showMaximized(); | ||
41 | composer->show(); | ||
42 | } | ||
43 | |||
44 | void MainWindow::slotSearch() | ||
45 | { | ||
46 | SearchDiag *searchDiag = new SearchDiag(this, 0, true); | ||
47 | searchDiag->showMaximized(); | ||
48 | searchDiag->show(); | ||
49 | } | ||
50 | |||
51 | void MainWindow::slotConfigure() | ||
52 | { | ||
53 | ConfigDiag *configDiag = new ConfigDiag(this, 0, true); | ||
54 | configDiag->showMaximized(); | ||
55 | configDiag->show(); | ||
56 | |||
57 | connect(configDiag, SIGNAL(changed()), folderView, SLOT(update())); | ||
58 | } | ||
59 | |||
60 | void MainWindow::mailClicked(IMAPResponseFETCH mail, IMAPHandler *handler) | ||
61 | { | ||
62 | ViewMail *viewMail = new ViewMail(mail, handler); | ||
63 | viewMail->showMaximized(); | ||
64 | viewMail->show(); | ||
65 | } | ||