summaryrefslogtreecommitdiff
path: root/noncore/net/mail/libmailwrapper/sendmailprogress.cpp
authoralwin <alwin>2003-12-24 01:29:43 (UTC)
committer alwin <alwin>2003-12-24 01:29:43 (UTC)
commit242f7a04e3e4963a5606ac603d54a4f115de4a04 (patch) (unidiff)
treedd8578fbc812791dd7e5026a28710a8313cf5cf8 /noncore/net/mail/libmailwrapper/sendmailprogress.cpp
parent7c720aabcad9b325dbf9910493e3c9fa1d63805e (diff)
downloadopie-242f7a04e3e4963a5606ac603d54a4f115de4a04.zip
opie-242f7a04e3e4963a5606ac603d54a4f115de4a04.tar.gz
opie-242f7a04e3e4963a5606ac603d54a4f115de4a04.tar.bz2
tried to implement a progress dialog when sending mails. It doesn't work
(dialog will show but makes no updates, when using qApp->progressEvents(x) dialog hides) I don't know why - and I giving up for the moment.
Diffstat (limited to 'noncore/net/mail/libmailwrapper/sendmailprogress.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mail/libmailwrapper/sendmailprogress.cpp48
1 files changed, 48 insertions, 0 deletions
diff --git a/noncore/net/mail/libmailwrapper/sendmailprogress.cpp b/noncore/net/mail/libmailwrapper/sendmailprogress.cpp
new file mode 100644
index 0000000..13ddd37
--- a/dev/null
+++ b/noncore/net/mail/libmailwrapper/sendmailprogress.cpp
@@ -0,0 +1,48 @@
1#include "sendmailprogress.h"
2#include <qprogressbar.h>
3#include <qlabel.h>
4#include <qstring.h>
5
6progressMailSend::progressMailSend(QWidget*parent, const char * name)
7 :progressMailSendUI(parent,name,false),m_current_mail(0),m_current_single(0),m_max_mail(0),m_max_single(0)
8{
9}
10
11progressMailSend::~progressMailSend()
12{
13}
14
15void progressMailSend::setMaxMails(unsigned int aMaxMails)
16{
17 m_max_mail = aMaxMails;
18 allMailProgressBar->setTotalSteps(aMaxMails);
19 setMails();
20}
21
22void progressMailSend::setCurrentMails(unsigned int aCurrent)
23{
24 m_current_mail = aCurrent;
25 allMailProgressBar->setProgress(aCurrent);
26 setMails();
27}
28
29void progressMailSend::setSingleMail(unsigned int aCurrent,unsigned int aMax)
30{
31 m_current_single = aCurrent;
32 m_max_single = aMax;
33 setSingle();
34}
35
36void progressMailSend::setSingle()
37{
38 QString text = QString(tr("%1 of %2 bytes send")).arg(m_current_single).arg(m_max_single);
39 singleMailLabel->setText(text);
40 singleMailProgressBar->setTotalSteps(m_max_single);
41 singleMailProgressBar->setProgress(m_current_single);
42}
43
44void progressMailSend::setMails()
45{
46 QString text = QString(tr("Sending mail %1 of %2")).arg(m_current_single+1).arg(m_max_single);
47 allMailLabel->setText(text);
48}