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
@@ -6,6 +6,7 @@
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
@@ -25,7 +26,7 @@ AttachViewItem::AttachViewItem(QListView *parent, Attachment &attachment)
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();
@@ -43,6 +44,31 @@ Composer::Composer(QWidget *parent, const char *name, WFlags fl)
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());