kmail

templatesconfiguration.h

Go to the documentation of this file.
00001 /*   -*- mode: C++; c-file-style: "gnu" -*-
00002  *   kmail: KDE mail client
00003  *   This file: Copyright (C) 2006 Dmitry Morozhnikov
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 #include <config.h>
00022 
00023 #ifndef TEMPLATESCONFIGURATION_H
00024 #define TEMPLATESCONFIGURATION_H
00025 
00026 #include "templatesconfiguration_base.h"
00027 #include "templatesinsertcommand.h"
00028 
00029 class TemplatesConfiguration : public TemplatesConfigurationBase
00030 {
00031   Q_OBJECT
00032 
00033   public:
00034 
00035     TemplatesConfiguration( QWidget *parent = 0, const char *name = 0 );
00036 
00037     void loadFromGlobal();
00038     void saveToGlobal();
00039     void loadFromIdentity( uint id );
00040     void saveToIdentity( uint id );
00041     void loadFromFolder( QString id, uint identity = 0 );
00042     void saveToFolder( QString id );
00043 
00045     void loadFromPhrases();
00046 
00048     static void importFromPhrases();
00049 
00051     static QString convertPhrases( QString &str );
00052 
00053     static QString defaultNewMessage();
00054     static QString defaultReply();
00055     static QString defaultReplyAll();
00056     static QString defaultForward();
00057     static QString defaultQuoteString();
00058 
00059   public slots:
00060 
00061     void slotInsertCommand( QString cmd, int adjustCursor = 0 );
00062 
00063     void slotTextChanged();
00064 
00065   signals:
00066 
00067     void changed();
00068 
00069   protected:
00070 
00071     QString strOrBlank( QString str );
00072 
00073 };
00074 
00075 #endif // TEMPLATESCONFIGURATION_H