summaryrefslogtreecommitdiff
path: root/noncore/net/mail/selectsmtp.cpp
authoralwin <alwin>2004-01-12 15:47:40 (UTC)
committer alwin <alwin>2004-01-12 15:47:40 (UTC)
commit334a1b57629211cdd77af4ea6857bfc41ab0cefb (patch) (unidiff)
treed9a7daf0e05efad79d05bf4dbffa19953ddbae17 /noncore/net/mail/selectsmtp.cpp
parent713a845a0d2ad3aba8230a5ba743a1c7b1622ef1 (diff)
downloadopie-334a1b57629211cdd77af4ea6857bfc41ab0cefb.zip
opie-334a1b57629211cdd77af4ea6857bfc41ab0cefb.tar.gz
opie-334a1b57629211cdd77af4ea6857bfc41ab0cefb.tar.bz2
when flush sendmail queue the user will be asked for selecting an
smtp account to use when there are more than one smtp-accounts
Diffstat (limited to 'noncore/net/mail/selectsmtp.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/mail/selectsmtp.cpp56
1 files changed, 56 insertions, 0 deletions
diff --git a/noncore/net/mail/selectsmtp.cpp b/noncore/net/mail/selectsmtp.cpp
new file mode 100644
index 0000000..e82c6ca
--- a/dev/null
+++ b/noncore/net/mail/selectsmtp.cpp
@@ -0,0 +1,56 @@
1#include "selectsmtp.h"
2#include <libmailwrapper/mailwrapper.h>
3#include <qlist.h>
4#include <qlabel.h>
5#include <qlayout.h>
6#include <qcheckbox.h>
7#include <qframe.h>
8#include <qlineedit.h>
9#include <qcombobox.h>
10
11selectsmtp::selectsmtp(QWidget* parent, const char* name, bool modal, WFlags fl)
12 : selectstoreui(parent,name,modal,fl)
13{
14 //m_smtpList.setAutoDelete(false);
15 m_smtpList = 0;
16 //headlabel->setText(tr("<center>Select SMTP account to use</center>"));
17 headlabel->hide();
18 folderSelection->hide();
19 folderLabel->hide();
20 accountlabel->setText("<center>SMTP Accounts</center>");
21 Line1->hide();
22 newFoldersel->hide();
23 newFolderedit->hide();
24 newFolderLabel->hide();
25 Line2->hide();
26 selMove->hide();
27 m_current_smtp = 0;
28 setCaption(tr("Select SMTP Account"));
29}
30
31selectsmtp::~selectsmtp()
32{
33}
34
35void selectsmtp::slotAccountselected(int which)
36{
37 if (!m_smtpList || (unsigned)which>=m_smtpList->count() || which < 0) {
38 m_current_smtp = 0;
39 return;
40 }
41 m_current_smtp = m_smtpList->at(which);
42}
43
44void selectsmtp::setSelectionlist(QList<SMTPaccount>*list)
45{
46 m_smtpList = list;
47 accountSelection->clear();
48 for (unsigned i = 0; m_smtpList!=0 && i < m_smtpList->count(); ++i) {
49 accountSelection->insertItem( m_smtpList->at(i)->getAccountName());
50 }
51}
52
53SMTPaccount*selectsmtp::selected_smtp()
54{
55 return m_current_smtp;
56}