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/libmailwrapper/sendmailprogress.cpp | |
parent | 2dd6ac0b2d24c91d35ce674a6c26351352df2b15 (diff) | |
download | kdepimpi-e3b89230f065c48c84b48c88edb6eb088374c487.zip kdepimpi-e3b89230f065c48c84b48c88edb6eb088374c487.tar.gz kdepimpi-e3b89230f065c48c84b48c88edb6eb088374c487.tar.bz2 |
Initial revision
Diffstat (limited to 'kmicromail/libmailwrapper/sendmailprogress.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | kmicromail/libmailwrapper/sendmailprogress.cpp | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/kmicromail/libmailwrapper/sendmailprogress.cpp b/kmicromail/libmailwrapper/sendmailprogress.cpp new file mode 100644 index 0000000..dc0c75a --- a/dev/null +++ b/kmicromail/libmailwrapper/sendmailprogress.cpp | |||
@@ -0,0 +1,47 @@ | |||
1 | #include "sendmailprogress.h" | ||
2 | #include <qprogressbar.h> | ||
3 | #include <qlabel.h> | ||
4 | |||
5 | progressMailSend::progressMailSend(QWidget*parent, const char * name) | ||
6 | :progressMailSendUI(parent,name,true),m_current_mail(0),m_current_single(0),m_max_mail(0),m_max_single(0) | ||
7 | { | ||
8 | } | ||
9 | |||
10 | progressMailSend::~progressMailSend() | ||
11 | { | ||
12 | } | ||
13 | |||
14 | void progressMailSend::setMaxMails(unsigned int aMaxMails) | ||
15 | { | ||
16 | m_max_mail = aMaxMails; | ||
17 | allMailProgressBar->setTotalSteps(aMaxMails); | ||
18 | setMails(); | ||
19 | } | ||
20 | |||
21 | void progressMailSend::setCurrentMails(unsigned int aCurrent) | ||
22 | { | ||
23 | m_current_mail = aCurrent; | ||
24 | allMailProgressBar->setProgress(aCurrent); | ||
25 | setMails(); | ||
26 | } | ||
27 | |||
28 | void progressMailSend::setSingleMail(unsigned int aCurrent,unsigned int aMax) | ||
29 | { | ||
30 | m_current_single = aCurrent; | ||
31 | m_max_single = aMax; | ||
32 | setSingle(); | ||
33 | } | ||
34 | |||
35 | void progressMailSend::setSingle() | ||
36 | { | ||
37 | QString text = QString(tr("%1 of %2 bytes send")).arg(m_current_single).arg(m_max_single); | ||
38 | singleMailLabel->setText(text); | ||
39 | singleMailProgressBar->setTotalSteps(m_max_single); | ||
40 | singleMailProgressBar->setProgress(m_current_single); | ||
41 | } | ||
42 | |||
43 | void progressMailSend::setMails() | ||
44 | { | ||
45 | QString text = QString(tr("Sending mail %1 of %2")).arg(m_current_mail+1).arg(m_max_mail); | ||
46 | allMailLabel->setText(text); | ||
47 | } | ||