author | alwin <alwin> | 2004-01-07 19:27:47 (UTC) |
---|---|---|
committer | alwin <alwin> | 2004-01-07 19:27:47 (UTC) |
commit | 24a62e8789083f446138aebfa11409b73886aa88 (patch) (side-by-side diff) | |
tree | 177bd3de4ad46fd29e93b87c6a0423a4ca132682 /noncore/net/mail/selectstore.cpp | |
parent | 7fdc50c5ff3fe42aba6d940165e99ed7150df4f1 (diff) | |
download | opie-24a62e8789083f446138aebfa11409b73886aa88.zip opie-24a62e8789083f446138aebfa11409b73886aa88.tar.gz opie-24a62e8789083f446138aebfa11409b73886aa88.tar.bz2 |
download mail mostly finished
accounts can be switched "offline"
Diffstat (limited to 'noncore/net/mail/selectstore.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mail/selectstore.cpp | 53 |
1 files changed, 52 insertions, 1 deletions
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,19 +1,70 @@ #include "selectstore.h" +#include <qlineedit.h> +#include <qcheckbox.h> +#include <qcombobox.h> +#include <libmailwrapper/abstractmail.h> 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(); +} |