summaryrefslogtreecommitdiff
path: root/noncore
Unidiff
Diffstat (limited to 'noncore') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mail/opiemail.cpp24
-rw-r--r--noncore/net/mail/opiemail.h1
2 files changed, 25 insertions, 0 deletions
diff --git a/noncore/net/mail/opiemail.cpp b/noncore/net/mail/opiemail.cpp
index 9257866..833cac2 100644
--- a/noncore/net/mail/opiemail.cpp
+++ b/noncore/net/mail/opiemail.cpp
@@ -3,6 +3,9 @@
3#include "editaccounts.h" 3#include "editaccounts.h"
4#include "composemail.h" 4#include "composemail.h"
5#include "smtpwrapper.h" 5#include "smtpwrapper.h"
6#include <qpe/qcopenvelope_qws.h>
7#include <qaction.h>
8#include <qapplication.h>
6 9
7OpieMail::OpieMail( QWidget *parent, const char *name, WFlags flags ) 10OpieMail::OpieMail( QWidget *parent, const char *name, WFlags flags )
8 : MainWindow( parent, name, flags ) 11 : MainWindow( parent, name, flags )
@@ -16,6 +19,27 @@ OpieMail::OpieMail( QWidget *parent, const char *name, WFlags flags )
16// connect( searchMails, SIGNAL( activated() ), SLOT( slotSearchMails() ) ); 19// connect( searchMails, SIGNAL( activated() ), SLOT( slotSearchMails() ) );
17 connect( editSettings, SIGNAL( activated() ), SLOT( slotEditSettings() ) ); 20 connect( editSettings, SIGNAL( activated() ), SLOT( slotEditSettings() ) );
18 connect( editAccounts, SIGNAL( activated() ), SLOT( slotEditAccounts() ) ); 21 connect( editAccounts, SIGNAL( activated() ), SLOT( slotEditAccounts() ) );
22 // Added by Stefan Eilers to allow starting by addressbook..
23 // copied from old mail2
24#if !defined(QT_NO_COP)
25 connect( qApp, SIGNAL( appMessage( const QCString&, const QByteArray& ) ),
26 this, SLOT( appMessage( const QCString&, const QByteArray& ) ) );
27#endif
28}
29
30void OpieMail::appMessage(const QCString &msg, const QByteArray &data)
31{
32 // copied from old mail2
33 // TODO: compose mail should get parameters of a recipient for starting
34 // from addressbook. (qcop signal "writeMail(string,string)")
35 if (msg == "writeMail(QString,QString)") {
36 QDataStream stream(data,IO_ReadOnly);
37 QString name, email;
38 stream >> name >> email;
39 slotComposeMail();
40 } else if (msg == "newMail()") {
41 slotComposeMail();
42 }
19} 43}
20 44
21void OpieMail::slotComposeMail() 45void OpieMail::slotComposeMail()
diff --git a/noncore/net/mail/opiemail.h b/noncore/net/mail/opiemail.h
index ba60297..3cf5972 100644
--- a/noncore/net/mail/opiemail.h
+++ b/noncore/net/mail/opiemail.h
@@ -14,6 +14,7 @@ public:
14 14
15public slots: 15public slots:
16 void slotComposeMail(); 16 void slotComposeMail();
17 void appMessage(const QCString &msg, const QByteArray &data);
17protected slots: 18protected slots:
18 void slotSendQueued(); 19 void slotSendQueued();
19 void slotSearchMails(); 20 void slotSearchMails();