From 24a62e8789083f446138aebfa11409b73886aa88 Mon Sep 17 00:00:00 2001 From: alwin Date: Wed, 07 Jan 2004 19:27:47 +0000 Subject: download mail mostly finished accounts can be switched "offline" --- (limited to 'noncore/net/mail/selectstore.cpp') diff --git a/noncore/net/mail/selectstore.cpp b/noncore/net/mail/selectstore.cpp index 28ab5a8..0a07d51 100644 --- a/noncore/net/mail/selectstore.cpp +++ b/noncore/net/mail/selectstore.cpp @@ -1,9 +1,15 @@ #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() @@ -12,8 +18,53 @@ 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