author | alwin <alwin> | 2004-01-07 19:27:47 (UTC) |
---|---|---|
committer | alwin <alwin> | 2004-01-07 19:27:47 (UTC) |
commit | 24a62e8789083f446138aebfa11409b73886aa88 (patch) (unidiff) | |
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,9 +1,15 @@ | |||
1 | #include "selectstore.h" | 1 | #include "selectstore.h" |
2 | #include <qlineedit.h> | ||
3 | #include <qcheckbox.h> | ||
4 | #include <qcombobox.h> | ||
5 | #include <libmailwrapper/abstractmail.h> | ||
2 | 6 | ||
3 | Selectstore::Selectstore(QWidget* parent, const char* name) | 7 | Selectstore::Selectstore(QWidget* parent, const char* name) |
4 | :selectstoreui(parent,name,true) | 8 | :selectstoreui(parent,name,true) |
5 | { | 9 | { |
6 | 10 | folderMap.clear(); | |
11 | mailMap.clear(); | ||
12 | cMail = 0; | ||
7 | } | 13 | } |
8 | 14 | ||
9 | Selectstore::~Selectstore() | 15 | Selectstore::~Selectstore() |
@@ -12,8 +18,53 @@ Selectstore::~Selectstore() | |||
12 | 18 | ||
13 | void Selectstore::slotCreateNewFolder() | 19 | void Selectstore::slotCreateNewFolder() |
14 | { | 20 | { |
21 | bool how = newFoldersel->isChecked(); | ||
22 | folderSelection->setEnabled(!how); | ||
23 | newFolderedit->setEnabled(how); | ||
15 | } | 24 | } |
16 | 25 | ||
17 | void Selectstore::slotMoveMail() | 26 | void Selectstore::slotMoveMail() |
18 | { | 27 | { |
19 | } | 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 | } | ||