author | zautrix <zautrix> | 2004-07-03 16:33:12 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-07-03 16:33:12 (UTC) |
commit | e3b89230f065c48c84b48c88edb6eb088374c487 (patch) (unidiff) | |
tree | 162ea2ef909a6f82ccfcedf45d80d6c821174912 /kmicromail/selectstore.cpp | |
parent | 2dd6ac0b2d24c91d35ce674a6c26351352df2b15 (diff) | |
download | kdepimpi-e3b89230f065c48c84b48c88edb6eb088374c487.zip kdepimpi-e3b89230f065c48c84b48c88edb6eb088374c487.tar.gz kdepimpi-e3b89230f065c48c84b48c88edb6eb088374c487.tar.bz2 |
Initial revision
-rw-r--r-- | kmicromail/selectstore.cpp | 70 |
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 @@ | |||
1 | #include "selectstore.h" | ||
2 | #include <qlineedit.h> | ||
3 | #include <qcheckbox.h> | ||
4 | #include <qcombobox.h> | ||
5 | #include <libmailwrapper/abstractmail.h> | ||
6 | |||
7 | Selectstore::Selectstore(QWidget* parent, const char* name) | ||
8 | :selectstoreui(parent,name,true) | ||
9 | { | ||
10 | folderMap.clear(); | ||
11 | mailMap.clear(); | ||
12 | cMail = 0; | ||
13 | } | ||
14 | |||
15 | Selectstore::~Selectstore() | ||
16 | { | ||
17 | } | ||
18 | |||
19 | void Selectstore::slotCreateNewFolder() | ||
20 | { | ||
21 | bool how = newFoldersel->isChecked(); | ||
22 | folderSelection->setEnabled(!how); | ||
23 | newFolderedit->setEnabled(how); | ||
24 | } | ||
25 | |||
26 | void Selectstore::slotMoveMail() | ||
27 | { | ||
28 | } | ||
29 | |||
30 | void Selectstore::addAccounts(AbstractMail*mail,const QStringList&folders) | ||
31 | { | ||
32 | accountSelection->insertItem(mail->getName()); | ||
33 | mailMap[accountSelection->count()-1]=mail; | ||
34 | folderMap[accountSelection->count()-1]=folders; | ||
35 | if (accountSelection->count()==1) { | ||
36 | cMail = mail; | ||
37 | folderSelection->insertStringList(folders); | ||
38 | } | ||
39 | } | ||
40 | |||
41 | void Selectstore::slotAccountselected(int i) | ||
42 | { | ||
43 | folderSelection->clear(); | ||
44 | folderSelection->insertStringList(folderMap[i]); | ||
45 | cMail = mailMap[i]; | ||
46 | } | ||
47 | |||
48 | QString Selectstore::currentFolder() | ||
49 | { | ||
50 | if (newFoldersel->isChecked()) { | ||
51 | return newFolderedit->text(); | ||
52 | } else { | ||
53 | return folderSelection->currentText(); | ||
54 | } | ||
55 | } | ||
56 | |||
57 | AbstractMail*Selectstore::currentMail() | ||
58 | { | ||
59 | return cMail; | ||
60 | } | ||
61 | |||
62 | bool Selectstore::newFolder() | ||
63 | { | ||
64 | return newFoldersel->isChecked(); | ||
65 | } | ||
66 | |||
67 | bool Selectstore::moveMails() | ||
68 | { | ||
69 | return selMove->isChecked(); | ||
70 | } | ||