kmail
templateparser.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef __KMAIL_TEMPLATEPARSER_H__
00022 #define __KMAIL_TEMPLATEPARSER_H__
00023
00024 #include <qobject.h>
00025
00026 class KMMessage;
00027 class QString;
00028 class KMFolder;
00029 class QObject;
00030
00031 namespace KMail {
00032
00033 class TemplateParser : public QObject
00034 {
00035 Q_OBJECT
00036
00037 public:
00038 enum Mode {
00039 NewMessage,
00040 Reply,
00041 ReplyAll,
00042 Forward
00043 };
00044
00045 public:
00046 TemplateParser( KMMessage *amsg, const Mode amode, const QString &aselection,
00047 bool aSmartQuote, bool aallowDecryption,
00048 bool aselectionIsBody );
00049
00050 virtual void process( KMMessage *aorig_msg, KMFolder *afolder = NULL, bool append = false );
00051 virtual void process( const QString &tmplName, KMMessage *aorig_msg,
00052 KMFolder *afolder = NULL, bool append = false );
00053 virtual void processWithTemplate( const QString &tmpl );
00054 virtual QString findTemplate();
00055 virtual QString findCustomTemplate( const QString &tmpl );
00056 virtual QString pipe( const QString &cmd, const QString &buf );
00057
00058 virtual QString getFName( const QString &str );
00059 virtual QString getLName( const QString &str );
00060
00061 protected:
00062 Mode mMode;
00063 KMFolder *mFolder;
00064 uint mIdentity;
00065 KMMessage *mMsg;
00066 KMMessage *mOrigMsg;
00067 QString mSelection;
00068 bool mSmartQuote;
00069 bool mAllowDecryption;
00070 bool mSelectionIsBody;
00071 bool mDebug;
00072 QString mQuoteString;
00073 bool mAppend;
00074
00075 int parseQuotes( const QString &prefix, const QString &str,
00076 QString "e ) const;
00077 };
00078
00079 }
00080
00081 #endif // __KMAIL_TEMPLATEPARSER_H__