summaryrefslogtreecommitdiff
path: root/noncore/unsupported/mail2/composer.cpp
Side-by-side diff
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 @@
#include <qaction.h>
#include <qtimer.h>
#include <qlabel.h>
+#include <qapplication.h>
#include <qpe/resource.h>
@@ -25,7 +26,7 @@ AttachViewItem::AttachViewItem(QListView *parent, Attachment &attachment)
}
Composer::Composer(QWidget *parent, const char *name, WFlags fl)
- : ComposerBase(parent, name, fl)
+ : ComposerBase(parent, name, fl), _inLoop(false)
{
abort->setEnabled(false);
to->setFocus();
@@ -43,6 +44,31 @@ Composer::Composer(QWidget *parent, const char *name, WFlags fl)
QTimer::singleShot(0, this, SLOT(slotResizing()));
}
+Composer::~Composer()
+{
+ hide();
+}
+
+void Composer::hide()
+{
+ QWidget::hide();
+
+ if (_inLoop) {
+ _inLoop = false;
+ qApp->exit_loop();
+ }
+}
+
+void Composer::exec()
+{
+ show();
+
+ if (!_inLoop) {
+ _inLoop = true;
+ qApp->enter_loop();
+ }
+}
+
void Composer::setSendMail(SendMail &sendMail)
{
to->setText(sendMail.to());