kmail
TemplateParser Class Reference
List of all members.Detailed Description
Definition at line 32 of file templateparser.h.
Public Types | |
enum | Mode { NewMessage, Reply, ReplyAll, Forward } |
Public Member Functions | |
TemplateParser (KMMessage *amsg, const Mode amode, const QString aselection, bool aSmartQuote, bool anoQuote, bool aallowDecryption, bool aselectionIsBody) | |
virtual void | process (KMMessage *aorig_msg, KMFolder *afolder=0, bool append=false) |
virtual void | process (const QString &tmplName, KMMessage *aorig_msg, KMFolder *afolder=0, bool append=false) |
virtual void | processWithTemplate (const QString &tmpl) |
virtual QString | findTemplate () |
virtual QString | findCustomTemplate (const QString &tmpl) |
virtual QString | pipe (const QString &cmd, const QString &buf) |
virtual QString | getFName (const QString &str) |
virtual QString | getLName (const QString &str) |
Static Public Attributes | |
static const int | PipeTimeout = 15 |
Protected Slots | |
void | onProcessExited (KProcess *proc) |
void | onReceivedStdout (KProcess *proc, char *buffer, int buflen) |
void | onReceivedStderr (KProcess *proc, char *buffer, int buflen) |
void | onWroteStdin (KProcess *proc) |
Protected Member Functions | |
void | addProcessedBodyToMessage (const QString &body) |
int | parseQuotes (const QString &prefix, const QString &str, QString "e) const |
Protected Attributes | |
Mode | mMode |
KMFolder * | mFolder |
uint | mIdentity |
KMMessage * | mMsg |
KMMessage * | mOrigMsg |
QString | mSelection |
bool | mSmartQuote |
bool | mNoQuote |
bool | mAllowDecryption |
bool | mSelectionIsBody |
int | mPipeRc |
QString | mPipeOut |
QString | mPipeErr |
bool | mDebug |
QString | mQuoteString |
bool | mAppend |
QString | mTo |
QString | mCC |
Member Function Documentation
QString TemplateParser::findTemplate | ( | ) | [virtual] |
This finds the template to use.
Either the one from the folder, identity or finally the global template. This also reads the To and CC address of the template
- Returns:
- the contents of the template
Definition at line 924 of file templateparser.cpp.
QString TemplateParser::findCustomTemplate | ( | const QString & | tmpl | ) | [virtual] |
Finds the template with the given name.
This also reads the To and CC address of the template
- Returns:
- the contents of the template
Definition at line 911 of file templateparser.cpp.
void TemplateParser::addProcessedBodyToMessage | ( | const QString & | body | ) | [protected] |
Called by processWithTemplate().
This adds the completely processed body to the message.
In append mode, this will simply append the text to the body.
Otherwise, the content of the old message is deleted and replaced with body
. Attachments of the original message are also added back to the new message.
Definition at line 838 of file templateparser.cpp.
The documentation for this class was generated from the following files: