kmail

templatesconfiguration.h

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   TQ_OBJECT
00033 
00034   public:
00035 
00036     TemplatesConfiguration( TQWidget *parent = 0, const char *name = 0 );
00037 
00038     void loadFromGlobal();
00039     void saveToGlobal();
00040     void loadFromIdentity( uint id );
00041     void saveToIdentity( uint id );
00042     void loadFromFolder( TQString id, uint identity = 0 );
00043     void saveToFolder( TQString id );
00044 
00046     void loadFromPhrases();
00047 
00049     static void importFromPhrases();
00050 
00052     static TQString convertPhrases( TQString &str );
00053 
00054     static TQString defaultNewMessage();
00055     static TQString defaultReply();
00056     static TQString defaultReplyAll();
00057     static TQString defaultForward();
00058     static TQString defaultQuoteString();
00059 
00060   public slots:
00061 
00062     void slotInsertCommand( TQString cmd, int adjustCursor = 0 );
00063 
00064     void slotTextChanged();
00065 
00066   signals:
00067 
00068     void changed();
00069 
00070   protected:
00071 
00072     TQString strOrBlank( TQString str );
00073 
00074 };
00075 
00076 #endif // TEMPLATESCONFIGURATION_H