themelocale.h

00001 /*
00002  * Copyright (c) 2005 Petri Damsten <damu@iki.fi>
00003  *
00004  * This file is part of SuperKaramba.
00005  *
00006  *  SuperKaramba is free software; you can redistribute it and/or modify
00007  *  it under the terms of the GNU General Public License as published by
00008  *  the Free Software Foundation; either version 2 of the License, or
00009  *  (at your option) any later version.
00010  *
00011  *  SuperKaramba is distributed in the hope that it will be useful,
00012  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  *  GNU General Public License for more details.
00015  *
00016  *  You should have received a copy of the GNU General Public License
00017  *  along with SuperKaramba; if not, write to the Free Software
00018  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
00019  ****************************************************************************/
00020 #ifndef THEMELOCALE_H
00021 #define THEMELOCALE_H
00022 
00023 #include <qstring.h>
00024 #include <qstringlist.h>
00025 
00026 class ThemeFile;
00027 
00032 struct sk_kde_loaded_l10nfile
00033 {
00034   int decided;
00035   const void *data;
00036   sk_kde_loaded_l10nfile() : decided(0), data(0) {}
00037 };
00038 
00039 class ThemeLocale
00040 {
00041   public:
00042     ThemeLocale(ThemeFile* theme);
00043     ~ThemeLocale();
00044 
00045     QString translate(QString text) const;
00046     void setLanguage(const QStringList &languages);
00047     QString language() const { return m_language; };
00048 
00049     static QStringList languageList();
00050 
00051   private:
00052     sk_kde_loaded_l10nfile m_domain;
00053     ThemeFile* m_theme;
00054     QString m_language;
00055 
00056     void unload();
00057 };
00058 
00059 
00060 
00061 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys