summaryrefslogtreecommitdiffabout
path: root/kmicromail/accountview.cpp
authorzautrix <zautrix>2004-08-31 21:01:18 (UTC)
committer zautrix <zautrix>2004-08-31 21:01:18 (UTC)
commit3f5c51234c8068f3d4826a2a0066648ace21a19f (patch) (unidiff)
tree91b76c1c7ddec6628c573e409070070747d99feb /kmicromail/accountview.cpp
parent95f8d4f1de557bd25ae38807d970208399cec5d1 (diff)
downloadkdepimpi-3f5c51234c8068f3d4826a2a0066648ace21a19f.zip
kdepimpi-3f5c51234c8068f3d4826a2a0066648ace21a19f.tar.gz
kdepimpi-3f5c51234c8068f3d4826a2a0066648ace21a19f.tar.bz2
Enhancements of kopiemail
Diffstat (limited to 'kmicromail/accountview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/accountview.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/kmicromail/accountview.cpp b/kmicromail/accountview.cpp
index 0893733..4ead545 100644
--- a/kmicromail/accountview.cpp
+++ b/kmicromail/accountview.cpp
@@ -5,24 +5,26 @@
5 5
6#include <libmailwrapper/settings.h> 6#include <libmailwrapper/settings.h>
7#include <libmailwrapper/mailwrapper.h> 7#include <libmailwrapper/mailwrapper.h>
8#include <libmailwrapper/mailtypes.h> 8#include <libmailwrapper/mailtypes.h>
9#include <libmailwrapper/abstractmail.h> 9#include <libmailwrapper/abstractmail.h>
10 10
11/* OPIE */ 11/* OPIE */
12#include <qpe/qpeapplication.h> 12#include <qpe/qpeapplication.h>
13 13
14/* QT */ 14/* QT */
15#include <qmessagebox.h> 15#include <qmessagebox.h>
16#include <qpopupmenu.h> 16#include <qpopupmenu.h>
17#include <qcheckbox.h>
18#include <qspinbox.h>
17 19
18using namespace Opie::Core; 20using namespace Opie::Core;
19AccountView::AccountView( QWidget *parent, const char *name, WFlags flags ) 21AccountView::AccountView( QWidget *parent, const char *name, WFlags flags )
20 : QListView( parent, name, flags ) 22 : QListView( parent, name, flags )
21{ 23{
22 connect( this, SIGNAL( selectionChanged(QListViewItem*) ), 24 connect( this, SIGNAL( selectionChanged(QListViewItem*) ),
23 SLOT( refresh(QListViewItem*) ) ); 25 SLOT( refresh(QListViewItem*) ) );
24 connect( this, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int) ),this, 26 connect( this, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int) ),this,
25 SLOT( slotHold(int,QListViewItem*,const QPoint&,int) ) ); 27 SLOT( slotHold(int,QListViewItem*,const QPoint&,int) ) );
26 setSorting(0); 28 setSorting(0);
27} 29}
28 30
@@ -149,22 +151,26 @@ void AccountView::downloadMails(const FolderP&fromFolder,AbstractMail*fromWrappe
149 targetFolder = sels.currentFolder(); 151 targetFolder = sels.currentFolder();
150 if ( (fromWrapper==targetMail && fromFolder->getName()==targetFolder) || 152 if ( (fromWrapper==targetMail && fromFolder->getName()==targetFolder) ||
151 targetFolder.isEmpty()) 153 targetFolder.isEmpty())
152 { 154 {
153 return; 155 return;
154 } 156 }
155 if (sels.newFolder() && !targetMail->createMbox(targetFolder)) 157 if (sels.newFolder() && !targetMail->createMbox(targetFolder))
156 { 158 {
157 QMessageBox::critical(0,tr("Error creating new Folder"), 159 QMessageBox::critical(0,tr("Error creating new Folder"),
158 tr("<center>Error while creating<br>new folder - breaking.</center>")); 160 tr("<center>Error while creating<br>new folder - breaking.</center>"));
159 return; 161 return;
160 } 162 }
161 fromWrapper->mvcpAllMails(fromFolder,targetFolder,targetMail,sels.moveMails()); 163 int maxsize = 0;
164 if ( sels.useSize->isChecked())
165 maxsize = sels.sizeSpinBox->value();
166
167 fromWrapper->mvcpAllMails(fromFolder,targetFolder,targetMail,sels.moveMails(), maxsize);
162 refreshCurrent(); 168 refreshCurrent();
163} 169}
164 170
165bool AccountView::currentisDraft() 171bool AccountView::currentisDraft()
166{ 172{
167 AccountViewItem *view = static_cast<AccountViewItem *>(currentItem()); 173 AccountViewItem *view = static_cast<AccountViewItem *>(currentItem());
168 if (!view) return false; 174 if (!view) return false;
169 return view->isDraftfolder(); 175 return view->isDraftfolder();
170} 176}