kmail

templatesconfiguration.h
1 /*
2  * kmail: KDE mail client
3  * This file: Copyright (C) 2006 Dmitry Morozhnikov
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18  *
19  */
20 
21 #include <config.h>
22 
23 #ifndef TEMPLATESCONFIGURATION_H
24 #define TEMPLATESCONFIGURATION_H
25 
26 #include "templatesconfiguration_base.h"
27 #include "templatesinsertcommand.h"
28 
29 class TemplatesConfiguration : public TemplatesConfigurationBase
30 {
31  TQ_OBJECT
32 
33 
34  public:
35 
36  TemplatesConfiguration( TQWidget *parent = 0, const char *name = 0 );
37 
38  void loadFromGlobal();
39  void saveToGlobal();
40  void loadFromIdentity( uint id );
41  void saveToIdentity( uint id );
42  void loadFromFolder( TQString id, uint identity = 0 );
43  void saveToFolder( TQString id );
44 
46  void loadFromPhrases();
47 
49  static void importFromPhrases();
50 
52  static TQString convertPhrases( TQString &str );
53 
54  static TQString defaultNewMessage();
55  static TQString defaultReply();
56  static TQString defaultReplyAll();
57  static TQString defaultForward();
58  static TQString defaultQuoteString();
59 
60  public slots:
61 
62  void slotInsertCommand( TQString cmd, int adjustCursor = 0 );
63 
64  void slotTextChanged();
65 
66  signals:
67 
68  void changed();
69 
70  protected:
71 
72  TQString strOrBlank( TQString str );
73 
74 };
75 
76 #endif // TEMPLATESCONFIGURATION_H