Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

selectstore.cpp

Go to the documentation of this file.
00001 #include "selectstore.h"
00002 #include <qlineedit.h>
00003 #include <qcheckbox.h>
00004 #include <qcombobox.h>
00005 #include <libmailwrapper/abstractmail.h>
00006 
00007 Selectstore::Selectstore(QWidget* parent, const char* name)
00008     :selectstoreui(parent,name,true)
00009 {
00010     folderMap.clear();
00011     mailMap.clear();
00012     cMail = 0;
00013 }
00014 
00015 Selectstore::~Selectstore()
00016 {
00017 }
00018 
00019 void Selectstore::slotCreateNewFolder()
00020 {
00021     bool how = newFoldersel->isChecked();
00022     folderSelection->setEnabled(!how);
00023     newFolderedit->setEnabled(how);
00024 }
00025 
00026 void Selectstore::slotMoveMail()
00027 {
00028 }
00029 
00030 void Selectstore::addAccounts(AbstractMail*mail,const QStringList&folders)
00031 {
00032     accountSelection->insertItem(mail->getName());
00033     mailMap[accountSelection->count()-1]=mail;
00034     folderMap[accountSelection->count()-1]=folders;
00035     if (accountSelection->count()==1) {
00036         cMail = mail;
00037         folderSelection->insertStringList(folders);
00038     }
00039 }
00040 
00041 void Selectstore::slotAccountselected(int i)
00042 {
00043     folderSelection->clear();
00044     folderSelection->insertStringList(folderMap[i]);
00045     cMail = mailMap[i];
00046 }
00047 
00048 QString Selectstore::currentFolder()
00049 {
00050     if (newFoldersel->isChecked()) {
00051         return newFolderedit->text();
00052     } else {
00053         return folderSelection->currentText();
00054     }
00055 }
00056 
00057 AbstractMail*Selectstore::currentMail()
00058 {
00059     return cMail;
00060 }
00061 
00062 bool Selectstore::newFolder()
00063 {
00064     return newFoldersel->isChecked();
00065 }
00066 
00067 bool Selectstore::moveMails()
00068 {
00069     return selMove->isChecked();
00070 }

Generated on Sat Nov 5 16:17:39 2005 for OPIE by  doxygen 1.4.2