summaryrefslogtreecommitdiffabout
path: root/kmicromail/libmailwrapper/mailwrapper.h
authorMichael Krelin <hacker@klever.net>2007-07-04 11:23:42 (UTC)
committer Michael Krelin <hacker@klever.net>2007-07-04 11:23:42 (UTC)
commita08aff328d4393031d5ba7d622c2b05705a89d73 (patch) (unidiff)
tree8ee90d686081c52e7c69b5ce946e9b1a7d690001 /kmicromail/libmailwrapper/mailwrapper.h
parent11edc920afe4f274c0964436633aa632c8288a40 (diff)
downloadkdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.zip
kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.gz
kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.bz2
initial public commit of qt4 portp1
Diffstat (limited to 'kmicromail/libmailwrapper/mailwrapper.h') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/libmailwrapper/mailwrapper.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/kmicromail/libmailwrapper/mailwrapper.h b/kmicromail/libmailwrapper/mailwrapper.h
index 3e8b51f..bebabf4 100644
--- a/kmicromail/libmailwrapper/mailwrapper.h
+++ b/kmicromail/libmailwrapper/mailwrapper.h
@@ -1,32 +1,34 @@
1#ifndef MAILWRAPPER_H 1#ifndef MAILWRAPPER_H
2#define MAILWRAPPER_H 2#define MAILWRAPPER_H
3 3
4//#include <qpe/applnk.h> 4//#include <qpe/applnk.h>
5 5
6#include <qbitarray.h> 6#include <qbitarray.h>
7#include <qdatetime.h> 7#include <qdatetime.h>
8#include <qfileinfo.h> 8#include <qfileinfo.h>
9//Added by qt3to4:
10#include <QPixmap>
9#include <kiconloader.h> 11#include <kiconloader.h>
10 12
11#include "settings.h" 13#include "settings.h"
12 14
13#include <opie2/osmartpointer.h> 15#include <opie2/osmartpointer.h>
14/* 16/*
15class Attachment 17class Attachment
16{ 18{
17public: 19public:
18 Attachment( DocLnk lnk ); 20 Attachment( DocLnk lnk );
19 virtual ~Attachment(){} 21 virtual ~Attachment(){}
20 const QString getFileName()const{ return doc.file(); } 22 const QString getFileName()const{ return doc.file(); }
21 const QString getName()const{ return doc.name(); } 23 const QString getName()const{ return doc.name(); }
22 const QString getMimeType()const{ return doc.type(); } 24 const QString getMimeType()const{ return doc.type(); }
23 const QPixmap getPixmap()const{ return doc.pixmap(); } 25 const QPixmap getPixmap()const{ return doc.pixmap(); }
24 const int getSize()const { return size; } 26 const int getSize()const { return size; }
25 DocLnk getDocLnk() { return doc; } 27 DocLnk getDocLnk() { return doc; }
26 28
27protected: 29protected:
28 DocLnk doc; 30 DocLnk doc;
29 int size; 31 int size;
30 32
31}; 33};
32*/ 34*/
@@ -40,74 +42,74 @@ public:
40 const QString getName()const{ return QFileInfo( doc ).baseName (); } 42 const QString getName()const{ return QFileInfo( doc ).baseName (); }
41 const QString getMimeType()const{ return QFileInfo( doc ).extension(false); } 43 const QString getMimeType()const{ return QFileInfo( doc ).extension(false); }
42 const QPixmap getPixmap()const{ return mPix; } 44 const QPixmap getPixmap()const{ return mPix; }
43 const int getSize()const { return size; } 45 const int getSize()const { return size; }
44 QString getDocLnk() { return doc; } 46 QString getDocLnk() { return doc; }
45 47
46protected: 48protected:
47 QPixmap mPix; 49 QPixmap mPix;
48 QString doc; 50 QString doc;
49 int size; 51 int size;
50 52
51}; 53};
52 54
53class Mail:public Opie::Core::ORefCount 55class Mail:public Opie::Core::ORefCount
54{ 56{
55public: 57public:
56 Mail(); 58 Mail();
57 /* Possible that this destructor must not be declared virtual 59 /* Possible that this destructor must not be declared virtual
58 * 'cause it seems that it will never have some child classes. 60 * 'cause it seems that it will never have some child classes.
59 * in this case this object will not get a virtual table -> memory and 61 * in this case this object will not get a virtual table -> memory and
60 * speed will be a little bit better? 62 * speed will be a little bit better?
61 */ 63 */
62 virtual ~Mail(){} 64 virtual ~Mail(){}
63 void addAttachment( Attachment *att ) { attList.append( att ); } 65 void addAttachment( Attachment *att ) { attList.append( att ); }
64 const QList<Attachment>& getAttachments()const { return attList; } 66 const QList<Attachment*>& getAttachments()const { return attList; }
65 void removeAttachment( Attachment *att ) { attList.remove( att ); } 67 void removeAttachment( Attachment *att ) { attList.remove( att ); }
66 const QString&getName()const { return name; } 68 const QString&getName()const { return name; }
67 void setName( QString s ) { name = s; } 69 void setName( QString s ) { name = s; }
68 const QString&getMail()const{ return mail; } 70 const QString&getMail()const{ return mail; }
69 void setMail( const QString&s ) { mail = s; } 71 void setMail( const QString&s ) { mail = s; }
70 const QString&getTo()const{ return to; } 72 const QString&getTo()const{ return to; }
71 void setTo( const QString&s ) { to = s; } 73 void setTo( const QString&s ) { to = s; }
72 const QString&getCC()const{ return cc; } 74 const QString&getCC()const{ return cc; }
73 void setCC( const QString&s ) { cc = s; } 75 void setCC( const QString&s ) { cc = s; }
74 const QString&getBCC()const { return bcc; } 76 const QString&getBCC()const { return bcc; }
75 void setBCC( const QString&s ) { bcc = s; } 77 void setBCC( const QString&s ) { bcc = s; }
76 const QString&getMessage()const { return message; } 78 const QString&getMessage()const { return message; }
77 void setMessage( const QString&s ) { message = s; } 79 void setMessage( const QString&s ) { message = s; }
78 const QString&getSubject()const { return subject; } 80 const QString&getSubject()const { return subject; }
79 void setSubject( const QString&s ) { subject = s; } 81 void setSubject( const QString&s ) { subject = s; }
80 const QString&getReply()const{ return reply; } 82 const QString&getReply()const{ return reply; }
81 void setReply( const QString&a ) { reply = a; } 83 void setReply( const QString&a ) { reply = a; }
82 void setInreply(const QStringList&list){m_in_reply_to = list;} 84 void setInreply(const QStringList&list){m_in_reply_to = list;}
83 const QStringList&Inreply()const{return m_in_reply_to;} 85 const QStringList&Inreply()const{return m_in_reply_to;}
84 86
85 void setCharset( const QString&a ) { charset= a; } 87 void setCharset( const QString&a ) { charset= a; }
86 const QString& getCharset() const { return charset; } 88 const QString& getCharset() const { return charset; }
87 89
88private: 90private:
89 QList<Attachment> attList; 91 QList<Attachment*> attList;
90 QString name, mail, to, cc, bcc, reply, subject, message, charset; 92 QString name, mail, to, cc, bcc, reply, subject, message, charset;
91 QStringList m_in_reply_to; 93 QStringList m_in_reply_to;
92}; 94};
93 95
94class Folder:public Opie::Core::ORefCount 96class Folder:public Opie::Core::ORefCount
95{ 97{
96public: 98public:
97 Folder( const QString&init_name,const QString&sep ); 99 Folder( const QString&init_name,const QString&sep );
98 virtual ~Folder(); 100 virtual ~Folder();
99 const QString&getDisplayName()const { return nameDisplay; } 101 const QString&getDisplayName()const { return nameDisplay; }
100 const QString&getName()const { return name; } 102 const QString&getName()const { return name; }
101 const QString&getPrefix()const{return prefix; } 103 const QString&getPrefix()const{return prefix; }
102 virtual bool may_select()const{return true;} 104 virtual bool may_select()const{return true;}
103 virtual bool no_inferior()const{return true;} 105 virtual bool no_inferior()const{return true;}
104 const QString&Separator()const; 106 const QString&Separator()const;
105 107
106protected: 108protected:
107 QString nameDisplay, name, separator,prefix; 109 QString nameDisplay, name, separator,prefix;
108}; 110};
109 111
110typedef Opie::Core::OSmartPointer<Folder> FolderP; 112typedef Opie::Core::OSmartPointer<Folder> FolderP;
111 113
112class MHFolder : public Folder 114class MHFolder : public Folder
113{ 115{