author | alwin <alwin> | 2003-12-24 02:56:27 (UTC) |
---|---|---|
committer | alwin <alwin> | 2003-12-24 02:56:27 (UTC) |
commit | ff20f6d33cffd84222029df9f118a9e5db5ec3e5 (patch) (unidiff) | |
tree | 5617a3d099c2ced644a05cbd94956ba851f68f95 /noncore | |
parent | fa581423c0ffcf35cbc403645e2131e84342dae4 (diff) | |
download | opie-ff20f6d33cffd84222029df9f118a9e5db5ec3e5.zip opie-ff20f6d33cffd84222029df9f118a9e5db5ec3e5.tar.gz opie-ff20f6d33cffd84222029df9f118a9e5db5ec3e5.tar.bz2 |
setup interface for qcop signal "newMail()"
TODO: setup composer to get a recipient address for calling from addressbook!
-rw-r--r-- | noncore/net/mail/opiemail.cpp | 24 | ||||
-rw-r--r-- | noncore/net/mail/opiemail.h | 1 |
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 | |||
@@ -5,2 +5,5 @@ | |||
5 | #include "smtpwrapper.h" | 5 | #include "smtpwrapper.h" |
6 | #include <qpe/qcopenvelope_qws.h> | ||
7 | #include <qaction.h> | ||
8 | #include <qapplication.h> | ||
6 | 9 | ||
@@ -18,2 +21,23 @@ OpieMail::OpieMail( QWidget *parent, const char *name, WFlags flags ) | |||
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 | |||
30 | void 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 | } |
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 | |||
@@ -16,2 +16,3 @@ public slots: | |||
16 | void slotComposeMail(); | 16 | void slotComposeMail(); |
17 | void appMessage(const QCString &msg, const QByteArray &data); | ||
17 | protected slots: | 18 | protected slots: |