summaryrefslogtreecommitdiff
path: root/noncore/unsupported/mail2/composer.cpp
Unidiff
Diffstat (limited to 'noncore/unsupported/mail2/composer.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/unsupported/mail2/composer.cpp28
1 files changed, 27 insertions, 1 deletions
diff --git a/noncore/unsupported/mail2/composer.cpp b/noncore/unsupported/mail2/composer.cpp
index 82ed117..7f65dba 100644
--- a/noncore/unsupported/mail2/composer.cpp
+++ b/noncore/unsupported/mail2/composer.cpp
@@ -3,12 +3,13 @@
3#include <qpopupmenu.h> 3#include <qpopupmenu.h>
4#include <qcombobox.h> 4#include <qcombobox.h>
5#include <qlineedit.h> 5#include <qlineedit.h>
6#include <qaction.h> 6#include <qaction.h>
7#include <qtimer.h> 7#include <qtimer.h>
8#include <qlabel.h> 8#include <qlabel.h>
9#include <qapplication.h>
9 10
10#include <qpe/resource.h> 11#include <qpe/resource.h>
11 12
12#include "addresspicker.h" 13#include "addresspicker.h"
13#include "listviewplus.h" 14#include "listviewplus.h"
14#include "smtphandler.h" 15#include "smtphandler.h"
@@ -22,13 +23,13 @@ AttachViewItem::AttachViewItem(QListView *parent, Attachment &attachment)
22 setPixmap(0, _attachment.docLnk()->pixmap().isNull() ? Resource::loadPixmap("UnknownDocument-14") : _attachment.docLnk()->pixmap()); 23 setPixmap(0, _attachment.docLnk()->pixmap().isNull() ? Resource::loadPixmap("UnknownDocument-14") : _attachment.docLnk()->pixmap());
23 setText(0, _attachment.newName().isEmpty() ? _attachment.fileName() : _attachment.newName()); 24 setText(0, _attachment.newName().isEmpty() ? _attachment.fileName() : _attachment.newName());
24 setText(1, _attachment.description()); 25 setText(1, _attachment.description());
25} 26}
26 27
27Composer::Composer(QWidget *parent, const char *name, WFlags fl) 28Composer::Composer(QWidget *parent, const char *name, WFlags fl)
28 : ComposerBase(parent, name, fl) 29 : ComposerBase(parent, name, fl), _inLoop(false)
29{ 30{
30 abort->setEnabled(false); 31 abort->setEnabled(false);
31 to->setFocus(); 32 to->setFocus();
32 33
33 connect(sendmail, SIGNAL(activated()), SLOT(slotSendMail())); 34 connect(sendmail, SIGNAL(activated()), SLOT(slotSendMail()));
34 connect(addressbook, SIGNAL(activated()), SLOT(slotOpenAddressPicker())); 35 connect(addressbook, SIGNAL(activated()), SLOT(slotOpenAddressPicker()));
@@ -40,12 +41,37 @@ Composer::Composer(QWidget *parent, const char *name, WFlags fl)
40 connect(attachPopup, SIGNAL(activated(int)), SLOT(slotPopupHandler(int))); 41 connect(attachPopup, SIGNAL(activated(int)), SLOT(slotPopupHandler(int)));
41 42
42 QTimer::singleShot(0, this, SLOT(slotFillStuff())); 43 QTimer::singleShot(0, this, SLOT(slotFillStuff()));
43 QTimer::singleShot(0, this, SLOT(slotResizing())); 44 QTimer::singleShot(0, this, SLOT(slotResizing()));
44} 45}
45 46
47Composer::~Composer()
48{
49 hide();
50}
51
52void Composer::hide()
53{
54 QWidget::hide();
55
56 if (_inLoop) {
57 _inLoop = false;
58 qApp->exit_loop();
59 }
60}
61
62void Composer::exec()
63{
64 show();
65
66 if (!_inLoop) {
67 _inLoop = true;
68 qApp->enter_loop();
69 }
70}
71
46void Composer::setSendMail(SendMail &sendMail) 72void Composer::setSendMail(SendMail &sendMail)
47{ 73{
48 to->setText(sendMail.to()); 74 to->setText(sendMail.to());
49 cc->setText(sendMail.cc()); 75 cc->setText(sendMail.cc());
50 bcc->setText(sendMail.bcc()); 76 bcc->setText(sendMail.bcc());
51 subject->setText(sendMail.subject()); 77 subject->setText(sendMail.subject());