summaryrefslogtreecommitdiffabout
path: root/kmicromail/selectstore.cpp
authorzautrix <zautrix>2004-07-03 16:33:12 (UTC)
committer zautrix <zautrix>2004-07-03 16:33:12 (UTC)
commite3b89230f065c48c84b48c88edb6eb088374c487 (patch) (side-by-side diff)
tree162ea2ef909a6f82ccfcedf45d80d6c821174912 /kmicromail/selectstore.cpp
parent2dd6ac0b2d24c91d35ce674a6c26351352df2b15 (diff)
downloadkdepimpi-e3b89230f065c48c84b48c88edb6eb088374c487.zip
kdepimpi-e3b89230f065c48c84b48c88edb6eb088374c487.tar.gz
kdepimpi-e3b89230f065c48c84b48c88edb6eb088374c487.tar.bz2
Initial revision
Diffstat (limited to 'kmicromail/selectstore.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/selectstore.cpp70
1 files changed, 70 insertions, 0 deletions
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 <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();
+}