Diffstat (limited to 'noncore/net/mailit/mailitwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mailit/mailitwindow.cpp | 30 |
1 files changed, 4 insertions, 26 deletions
diff --git a/noncore/net/mailit/mailitwindow.cpp b/noncore/net/mailit/mailitwindow.cpp index ef5fc09..7181adf 100644 --- a/noncore/net/mailit/mailitwindow.cpp +++ b/noncore/net/mailit/mailitwindow.cpp | |||
@@ -1,54 +1,55 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2001 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2001 Trolltech AS. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Qt Palmtop Environment. | 4 | ** This file is part of Qt Palmtop Environment. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | #include <qwhatsthis.h> | ||
20 | #include "mailitwindow.h" | 21 | #include "mailitwindow.h" |
21 | 22 | ||
22 | MailItWindow::MailItWindow(QWidget *parent, const char *name, WFlags fl) | 23 | MailItWindow::MailItWindow(QWidget *parent, const char *name, WFlags fl) |
23 | : QMainWindow(parent, name, fl) | 24 | : QMainWindow(parent, name, WStyle_ContextHelp) |
24 | { | 25 | { |
25 | currentCaption = "Mailit"; | 26 | currentCaption = "Mailit"; |
26 | setCaption(tr(currentCaption)); | 27 | setCaption(tr(currentCaption)); |
27 | views = new QWidgetStack(this); | 28 | views = new QWidgetStack(this); |
28 | setCentralWidget(views); | 29 | setCentralWidget(views); |
29 | 30 | QWhatsThis::add(views,tr("Central view area")); | |
30 | emailClient = new EmailClient(views, "client"); | 31 | emailClient = new EmailClient(views, "client"); |
31 | writeMail = new WriteMail(views, "writing"); | 32 | writeMail = new WriteMail(views, "writing"); |
32 | readMail = new ReadMail(views, "reading"); | 33 | readMail = new ReadMail(views, "reading"); |
33 | 34 | ||
34 | views->raiseWidget(emailClient); | 35 | views->raiseWidget(emailClient); |
35 | 36 | ||
36 | connect(emailClient, SIGNAL(composeRequested()), | 37 | connect(emailClient, SIGNAL(composeRequested()), |
37 | this, SLOT(compose()) ); | 38 | this, SLOT(compose()) ); |
38 | connect(emailClient, SIGNAL(viewEmail(QListView *, Email *)), this, | 39 | connect(emailClient, SIGNAL(viewEmail(QListView *, Email *)), this, |
39 | SLOT(viewMail(QListView *, Email *)) ); | 40 | SLOT(viewMail(QListView *, Email *)) ); |
40 | connect(emailClient, SIGNAL(mailUpdated(Email *)), this, | 41 | connect(emailClient, SIGNAL(mailUpdated(Email *)), this, |
41 | SLOT(updateMailView(Email *)) ); | 42 | SLOT(updateMailView(Email *)) ); |
42 | 43 | ||
43 | connect(writeMail, SIGNAL(cancelMail()), this, SLOT(showEmailClient()) ); | 44 | connect(writeMail, SIGNAL(cancelMail()), this, SLOT(showEmailClient()) ); |
44 | connect(writeMail, SIGNAL(sendMailRequested(const Email &)), this, | 45 | connect(writeMail, SIGNAL(sendMailRequested(const Email &)), this, |
45 | SLOT(showEmailClient()) ); | 46 | SLOT(showEmailClient()) ); |
46 | connect(writeMail, SIGNAL(sendMailRequested(const Email &)), emailClient, | 47 | connect(writeMail, SIGNAL(sendMailRequested(const Email &)), emailClient, |
47 | SLOT(enqueMail(const Email &)) ); | 48 | SLOT(enqueMail(const Email &)) ); |
48 | 49 | ||
49 | connect(readMail, SIGNAL(cancelView()), this, SLOT(showEmailClient()) ); | 50 | connect(readMail, SIGNAL(cancelView()), this, SLOT(showEmailClient()) ); |
50 | connect(readMail, SIGNAL(replyRequested(Email &, bool&)), this, | 51 | connect(readMail, SIGNAL(replyRequested(Email &, bool&)), this, |
51 | SLOT(composeReply(Email &, bool&)) ); | 52 | SLOT(composeReply(Email &, bool&)) ); |
52 | connect(readMail, SIGNAL(forwardRequested(Email &)), this, | 53 | connect(readMail, SIGNAL(forwardRequested(Email &)), this, |
53 | SLOT(composeForward(Email &)) ); | 54 | SLOT(composeForward(Email &)) ); |
54 | 55 | ||
@@ -119,47 +120,24 @@ void MailItWindow::viewMail(QListView *view, Email *mail) | |||
119 | 120 | ||
120 | void MailItWindow::updateMailView(Email *mail) | 121 | void MailItWindow::updateMailView(Email *mail) |
121 | { | 122 | { |
122 | if (viewingMail) { | 123 | if (viewingMail) { |
123 | readMail->mailUpdated(mail); | 124 | readMail->mailUpdated(mail); |
124 | } | 125 | } |
125 | } | 126 | } |
126 | 127 | ||
127 | void MailItWindow::updateCaption(const QString &newCaption) | 128 | void MailItWindow::updateCaption(const QString &newCaption) |
128 | { | 129 | { |
129 | currentCaption = newCaption; | 130 | currentCaption = newCaption; |
130 | setCaption(tr(currentCaption)); | 131 | setCaption(tr(currentCaption)); |
131 | } | 132 | } |
132 | 133 | ||
133 | void MailItWindow::setDocument(const QString &_address) | 134 | void MailItWindow::setDocument(const QString &_address) |
134 | { | 135 | { |
135 | // strip leading 'mailto:' | 136 | // strip leading 'mailto:' |
136 | QString address = _address; | 137 | QString address = _address; |
137 | if (address.startsWith("mailto:")) | 138 | if (address.startsWith("mailto:")) |
138 | address = address.mid(6); | 139 | address = address.mid(6); |
139 | 140 | ||
140 | compose(); | 141 | compose(); |
141 | writeMail->setRecipient(address); | 142 | writeMail->setRecipient(address); |
142 | } | 143 | } |
143 | |||
144 | /*void MailItWindow::reply(Email& mail) | ||
145 | { | ||
146 | qDebug("####EmailClient: 0 reached"); | ||
147 | composeReply(mail,(bool&)FALSE); | ||
148 | } | ||
149 | |||
150 | void MailItWindow::replyAll(Email& mail) | ||
151 | { | ||
152 | qDebug("####EmailClient: 1 reached"); | ||
153 | composeReply(mail,(bool&)TRUE); | ||
154 | } | ||
155 | |||
156 | void MailItWindow::forward(Email& mail) | ||
157 | { | ||
158 | qDebug("####EmailClient: 2 reached"); | ||
159 | } | ||
160 | |||
161 | void MailItWindow::remove(Email&) | ||
162 | { | ||
163 | qDebug("####EmailClient: 3 reached"); | ||
164 | //emit removeItem(eli,(bool&)TRUE); | ||
165 | } */ \ No newline at end of file | ||