From e3b89230f065c48c84b48c88edb6eb088374c487 Mon Sep 17 00:00:00 2001 From: zautrix Date: Sat, 03 Jul 2004 16:33:12 +0000 Subject: Initial revision --- (limited to 'kmicromail/selectsmtp.cpp') 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 + +#include +#include +#include +#include +#include +#include +#include +#include +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("
Select SMTP account to use
")); + headlabel->hide(); + folderSelection->hide(); + folderLabel->hide(); + accountlabel->setText("
SMTP Accounts
"); + 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*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; +} -- cgit v0.9.0.2