summaryrefslogtreecommitdiffabout
path: root/kmicromail/selectsmtp.cpp
authorzautrix <zautrix>2004-07-03 16:33:12 (UTC)
committer zautrix <zautrix>2004-07-03 16:33:12 (UTC)
commite3b89230f065c48c84b48c88edb6eb088374c487 (patch) (unidiff)
tree162ea2ef909a6f82ccfcedf45d80d6c821174912 /kmicromail/selectsmtp.cpp
parent2dd6ac0b2d24c91d35ce674a6c26351352df2b15 (diff)
downloadkdepimpi-e3b89230f065c48c84b48c88edb6eb088374c487.zip
kdepimpi-e3b89230f065c48c84b48c88edb6eb088374c487.tar.gz
kdepimpi-e3b89230f065c48c84b48c88edb6eb088374c487.tar.bz2
Initial revision
Diffstat (limited to 'kmicromail/selectsmtp.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/selectsmtp.cpp63
1 files changed, 63 insertions, 0 deletions
diff --git a/kmicromail/selectsmtp.cpp b/kmicromail/selectsmtp.cpp
new file mode 100644
index 0000000..24eced1
--- a/dev/null
+++ b/kmicromail/selectsmtp.cpp
@@ -0,0 +1,63 @@
1#include "selectsmtp.h"
2#include <libmailwrapper/mailwrapper.h>
3
4#include <qcombobox.h>
5#include <qcheckbox.h>
6#include <qmessagebox.h>
7#include <qpushbutton.h>
8#include <qlineedit.h>
9#include <qlabel.h>
10#include <qtabwidget.h>
11#include <qlistview.h>
12selectsmtp::selectsmtp(QWidget* parent, const char* name, bool modal, WFlags fl)
13 : selectstoreui(parent,name,modal,fl)
14{
15 //m_smtpList.setAutoDelete(false);
16 m_smtpList = 0;
17 //headlabel->setText(tr("<center>Select SMTP account to use</center>"));
18 headlabel->hide();
19 folderSelection->hide();
20 folderLabel->hide();
21 accountlabel->setText("<center>SMTP Accounts</center>");
22 Line1->hide();
23 newFoldersel->hide();
24 newFolderedit->hide();
25 newFolderLabel->hide();
26 Line2->hide();
27 selMove->hide();
28 m_current_smtp = 0;
29 setCaption(tr("Select SMTP Account"));
30}
31
32selectsmtp::~selectsmtp()
33{
34}
35
36void selectsmtp::slotAccountselected(int which)
37{
38 if (!m_smtpList || (unsigned)which>=m_smtpList->count() || which < 0) {
39 m_current_smtp = 0;
40 return;
41 }
42 m_current_smtp = m_smtpList->at(which);
43}
44
45void selectsmtp::setSelectionlist(QList<SMTPaccount>*list)
46{
47 m_smtpList = list;
48 accountSelection->clear();
49 if (!m_smtpList || m_smtpList->count()==0) {
50 accountSelection->setEnabled(false);
51 return;
52 }
53 accountSelection->setEnabled(true);
54 for (unsigned i = 0; m_smtpList!=0 && i < m_smtpList->count(); ++i) {
55 accountSelection->insertItem( m_smtpList->at(i)->getAccountName());
56 }
57 m_current_smtp = m_smtpList->at(0);
58}
59
60SMTPaccount*selectsmtp::selected_smtp()
61{
62 return m_current_smtp;
63}