author | zautrix <zautrix> | 2005-01-24 18:05:48 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-01-24 18:05:48 (UTC) |
commit | 77f93c632b66b5c8d92e4c63330362272ca1fc40 (patch) (side-by-side diff) | |
tree | 31f28656062c899b5368f13ab594ff6fa5c657fa /kmicromail/libmailwrapper | |
parent | 6c89efd80c1e94a0c070025d07c7a4c656f2a81e (diff) | |
download | kdepimpi-77f93c632b66b5c8d92e4c63330362272ca1fc40.zip kdepimpi-77f93c632b66b5c8d92e4c63330362272ca1fc40.tar.gz kdepimpi-77f93c632b66b5c8d92e4c63330362272ca1fc40.tar.bz2 |
mail fixes
-rw-r--r-- | kmicromail/libmailwrapper/mailtypes.cpp | 17 | ||||
-rw-r--r-- | kmicromail/libmailwrapper/mailtypes.h | 1 |
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 @@ -21,24 +21,41 @@ RecMail::RecMail(const RecMail&old) RecMail::~RecMail() { wrapper = 0; } static bool stringCompareRec( const QString& s1, const QString& s2 ) { if ( s1.isEmpty() && s2.isEmpty() ) return true; return s1 == 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 ) { if ( !stringCompareRec( isodate, r1->isodate ) ) { //qDebug("date *%s* *%s* ", isodate.latin1(), r1->isodate.latin1()); return false; } if ( !stringCompareRec( subject.left(40), r1->subject.left(40) ) ) { //qDebug("sub *%s* *%s*", subject.latin1(), r1->subject.latin1()); return false; } //qDebug("date *%s* *%s* ", isodate.latin1(), r1->isodate.latin1()); 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 @@ -46,24 +46,25 @@ public: const QString&getFrom()const{ return from; } void setFrom( const QString&a ) { from = a; } const QString&getSubject()const { return subject; } void setSubject( const QString&s ) { subject = s; } const QString&getMbox()const{return mbox;} void setMbox(const QString&box){mbox = box;} void setMsgid(const QString&id){msg_id=id;} const QString&Msgid()const{return msg_id;} void setReplyto(const QString&reply){replyto=reply;} const QString&Replyto()const{return replyto;} void setMsgsize(unsigned int size){msg_size = size;} const unsigned int Msgsize()const{return msg_size;} + const QString MsgsizeString()const; void setTo(const QStringList&list); const QStringList&To()const; void setCC(const QStringList&list); const QStringList&CC()const; void setBcc(const QStringList&list); const QStringList&Bcc()const; void setInreply(const QStringList&list); const QStringList&Inreply()const; void setReferences(const QStringList&list); const QStringList&References()const; |