author | zautrix <zautrix> | 2004-07-03 16:33:12 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-07-03 16:33:12 (UTC) |
commit | e3b89230f065c48c84b48c88edb6eb088374c487 (patch) (side-by-side diff) | |
tree | 162ea2ef909a6f82ccfcedf45d80d6c821174912 /kmicromail/selectsmtp.cpp | |
parent | 2dd6ac0b2d24c91d35ce674a6c26351352df2b15 (diff) | |
download | kdepimpi-e3b89230f065c48c84b48c88edb6eb088374c487.zip kdepimpi-e3b89230f065c48c84b48c88edb6eb088374c487.tar.gz kdepimpi-e3b89230f065c48c84b48c88edb6eb088374c487.tar.bz2 |
Initial revision
-rw-r--r-- | kmicromail/selectsmtp.cpp | 63 |
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 @@ +#include "selectsmtp.h" +#include <libmailwrapper/mailwrapper.h> + +#include <qcombobox.h> +#include <qcheckbox.h> +#include <qmessagebox.h> +#include <qpushbutton.h> +#include <qlineedit.h> +#include <qlabel.h> +#include <qtabwidget.h> +#include <qlistview.h> +selectsmtp::selectsmtp(QWidget* parent, const char* name, bool modal, WFlags fl) + : selectstoreui(parent,name,modal,fl) +{ + //m_smtpList.setAutoDelete(false); + m_smtpList = 0; + //headlabel->setText(tr("<center>Select SMTP account to use</center>")); + headlabel->hide(); + folderSelection->hide(); + folderLabel->hide(); + accountlabel->setText("<center>SMTP Accounts</center>"); + Line1->hide(); + newFoldersel->hide(); + newFolderedit->hide(); + newFolderLabel->hide(); + Line2->hide(); + selMove->hide(); + m_current_smtp = 0; + setCaption(tr("Select SMTP Account")); +} + +selectsmtp::~selectsmtp() +{ +} + +void selectsmtp::slotAccountselected(int which) +{ + if (!m_smtpList || (unsigned)which>=m_smtpList->count() || which < 0) { + m_current_smtp = 0; + return; + } + m_current_smtp = m_smtpList->at(which); +} + +void selectsmtp::setSelectionlist(QList<SMTPaccount>*list) +{ + m_smtpList = list; + accountSelection->clear(); + if (!m_smtpList || m_smtpList->count()==0) { + accountSelection->setEnabled(false); + return; + } + accountSelection->setEnabled(true); + for (unsigned i = 0; m_smtpList!=0 && i < m_smtpList->count(); ++i) { + accountSelection->insertItem( m_smtpList->at(i)->getAccountName()); + } + m_current_smtp = m_smtpList->at(0); +} + +SMTPaccount*selectsmtp::selected_smtp() +{ + return m_current_smtp; +} |