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/selectstore.cpp') diff --git a/kmicromail/selectstore.cpp b/kmicromail/selectstore.cpp new file mode 100644 index 0000000..0a07d51 --- a/dev/null +++ b/kmicromail/selectstore.cpp @@ -0,0 +1,70 @@ +#include "selectstore.h" +#include +#include +#include +#include + +Selectstore::Selectstore(QWidget* parent, const char* name) + :selectstoreui(parent,name,true) +{ + folderMap.clear(); + mailMap.clear(); + cMail = 0; +} + +Selectstore::~Selectstore() +{ +} + +void Selectstore::slotCreateNewFolder() +{ + bool how = newFoldersel->isChecked(); + folderSelection->setEnabled(!how); + newFolderedit->setEnabled(how); +} + +void Selectstore::slotMoveMail() +{ +} + +void Selectstore::addAccounts(AbstractMail*mail,const QStringList&folders) +{ + accountSelection->insertItem(mail->getName()); + mailMap[accountSelection->count()-1]=mail; + folderMap[accountSelection->count()-1]=folders; + if (accountSelection->count()==1) { + cMail = mail; + folderSelection->insertStringList(folders); + } +} + +void Selectstore::slotAccountselected(int i) +{ + folderSelection->clear(); + folderSelection->insertStringList(folderMap[i]); + cMail = mailMap[i]; +} + +QString Selectstore::currentFolder() +{ + if (newFoldersel->isChecked()) { + return newFolderedit->text(); + } else { + return folderSelection->currentText(); + } +} + +AbstractMail*Selectstore::currentMail() +{ + return cMail; +} + +bool Selectstore::newFolder() +{ + return newFoldersel->isChecked(); +} + +bool Selectstore::moveMails() +{ + return selMove->isChecked(); +} -- cgit v0.9.0.2