summaryrefslogtreecommitdiffabout
path: root/kmicromail/libmailwrapper
authorzautrix <zautrix>2005-01-24 18:05:48 (UTC)
committer zautrix <zautrix>2005-01-24 18:05:48 (UTC)
commit77f93c632b66b5c8d92e4c63330362272ca1fc40 (patch) (side-by-side diff)
tree31f28656062c899b5368f13ab594ff6fa5c657fa /kmicromail/libmailwrapper
parent6c89efd80c1e94a0c070025d07c7a4c656f2a81e (diff)
downloadkdepimpi-77f93c632b66b5c8d92e4c63330362272ca1fc40.zip
kdepimpi-77f93c632b66b5c8d92e4c63330362272ca1fc40.tar.gz
kdepimpi-77f93c632b66b5c8d92e4c63330362272ca1fc40.tar.bz2
mail fixes
Diffstat (limited to 'kmicromail/libmailwrapper') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/libmailwrapper/mailtypes.cpp17
-rw-r--r--kmicromail/libmailwrapper/mailtypes.h1
2 files changed, 18 insertions, 0 deletions
diff --git a/kmicromail/libmailwrapper/mailtypes.cpp b/kmicromail/libmailwrapper/mailtypes.cpp
index 89150ad..96d55e6 100644
--- a/kmicromail/libmailwrapper/mailtypes.cpp
+++ b/kmicromail/libmailwrapper/mailtypes.cpp
@@ -31,4 +31,21 @@ static bool stringCompareRec( const QString& s1, const QString& s2 )
}
+const QString RecMail::MsgsizeString() const
+{
+
+ double s = msg_size;
+ int w = 0;
+ s/=1024;
+ if (s>999.0) {
+ s/=1024.0;
+ ++w;
+ }
+ QString fsize = QString::number( s, 'f', 2 );
+ if ( w == 0 ) {
+ fsize += "kB" ;
+ } else
+ fsize += "MB" ;
+ return fsize;
+}
bool RecMail::isEqual( RecMail* r1 )
{
diff --git a/kmicromail/libmailwrapper/mailtypes.h b/kmicromail/libmailwrapper/mailtypes.h
index 32d92c0..39c0bac 100644
--- a/kmicromail/libmailwrapper/mailtypes.h
+++ b/kmicromail/libmailwrapper/mailtypes.h
@@ -56,4 +56,5 @@ public:
void setMsgsize(unsigned int size){msg_size = size;}
const unsigned int Msgsize()const{return msg_size;}
+ const QString MsgsizeString()const;