Astyle kdelibs
[kdepim.git] / kmail / editor / codecmanager.h
blob21a8ba10abf2387fed7e8bd081cbc4df10179693
1 /*
2 * This file is part of KMail.
3 * Copyright (c) 2009 Constantin Berzan <exit3219@gmail.com>
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.
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.
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 #ifndef CODECMANAGER_H
21 #define CODECMANAGER_H
23 #include <QByteArray>
25 class CodecManagerPrivate;
27 class CodecManager
29 public:
30 /**
31 Returns the CodecManager instance.
33 static CodecManager *self();
35 /**
36 A list of preferred charsets to use when composing messages.
38 QList<QByteArray> preferredCharsets() const;
40 /**
41 Re-read the preferred charsets from settings.
42 TODO KConfig XT would probably make this unnecessary
44 void updatePreferredCharsets();
46 private:
47 friend class CodecManagerPrivate;
48 CodecManagerPrivate *const d;
50 // Singleton. The only instance lives in sInstance->instance
51 explicit CodecManager(CodecManagerPrivate *dd);
52 //~CodecManager();
55 #endif /* CODECMANAGER_H */