• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdepim
  • Sitemap
  • Contact Us
 

kmail

templateparser.h

Go to the documentation of this file.
00001 /*   -*- mode: C++; c-file-style: "gnu" -*-
00002  *   kmail: KDE mail client
00003  *   Copyright (C) 2006 Dmitry Morozhnikov <dmiceman@mail.ru>
00004  *
00005  *   This program is free software; you can redistribute it and/or modify
00006  *   it under the terms of the GNU General Public License as published by
00007  *   the Free Software Foundation; either version 2 of the License, or
00008  *   (at your option) any later version.
00009  *
00010  *   This program is distributed in the hope that it will be useful,
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  *   GNU General Public License for more details.
00014  *
00015  *   You should have received a copy of the GNU General Public License
00016  *   along with this program; if not, write to the Free Software
00017  *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
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 &quote ) const;
00077 };
00078 
00079 } // namespace KMail
00080 
00081 #endif // __KMAIL_TEMPLATEPARSER_H__

kmail

Skip menu "kmail"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdepim

Skip menu "kdepim"
  • akonadi
  •   clients
  •   kabc
  •   kcal
  •   kcm
  • akregator
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt
  • kdgantt1
  • kjots
  • kleopatra
  • kmail
  • kmobiletools
  • knode
  • knotes
  • kontact
  • kontactinterfaces
  • korganizer
  •   korgac
  • kpilot
  • ktimetracker
  •   doc
  • libkdepim
  • libkholidays
  • libkleo
  • libkpgp
  • maildir
Generated for kdepim by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal