From e3b89230f065c48c84b48c88edb6eb088374c487 Mon Sep 17 00:00:00 2001 From: zautrix Date: Sat, 03 Jul 2004 16:33:12 +0000 Subject: Initial revision --- (limited to 'kmicromail/libmailwrapper/sendmailprogress.cpp') 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 @@ +#include "sendmailprogress.h" +#include +#include + +progressMailSend::progressMailSend(QWidget*parent, const char * name) + :progressMailSendUI(parent,name,true),m_current_mail(0),m_current_single(0),m_max_mail(0),m_max_single(0) +{ +} + +progressMailSend::~progressMailSend() +{ +} + +void progressMailSend::setMaxMails(unsigned int aMaxMails) +{ + m_max_mail = aMaxMails; + allMailProgressBar->setTotalSteps(aMaxMails); + setMails(); +} + +void progressMailSend::setCurrentMails(unsigned int aCurrent) +{ + m_current_mail = aCurrent; + allMailProgressBar->setProgress(aCurrent); + setMails(); +} + +void progressMailSend::setSingleMail(unsigned int aCurrent,unsigned int aMax) +{ + m_current_single = aCurrent; + m_max_single = aMax; + setSingle(); +} + +void progressMailSend::setSingle() +{ + QString text = QString(tr("%1 of %2 bytes send")).arg(m_current_single).arg(m_max_single); + singleMailLabel->setText(text); + singleMailProgressBar->setTotalSteps(m_max_single); + singleMailProgressBar->setProgress(m_current_single); +} + +void progressMailSend::setMails() +{ + QString text = QString(tr("Sending mail %1 of %2")).arg(m_current_mail+1).arg(m_max_mail); + allMailLabel->setText(text); +} -- cgit v0.9.0.2