add more spacing
[personal-kdebase.git] / runtime / kcontrol / locale / kcmlocale.h
blob701a0534180cb044f4aaa445a08a32adde2b3a6d
1 /*
2 * kcmlocale.h
4 * Copyright (c) 1998 Matthias Hoelzer <hoelzer@physik.uni-wuerzburg.de>
5 * Copyright (c) 1999-2003 Hans Petter Bieker <bieker@kde.org>
7 * Requires the Qt widget libraries, available at no cost at
8 * http://www.troll.no/
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
25 #ifndef KCMLOCALE_H
26 #define KCMLOCALE_H
28 #include <QWidget>
29 #include "ui_language.h"
31 class KControlLocale;
33 class KLocaleConfig : public QWidget, public Ui_Language
35 Q_OBJECT
37 public:
38 explicit KLocaleConfig( KControlLocale *_locale, QWidget *parent = 0);
40 void save();
42 public Q_SLOTS:
43 /**
44 * Loads all settings from the current locale into the current widget.
46 void slotLocaleChanged();
47 /**
48 * Retranslate all objects owned by this object using the current locale.
50 void slotTranslate();
52 Q_SIGNALS:
53 void localeChanged();
54 void languageChanged();
56 private Q_SLOTS:
57 void changeCountry();
59 void changedCountry(const QString & code);
61 void slotCheckButtons();
62 void slotAddLanguage(const QString & id);
63 void slotRemoveLanguage();
64 void slotLanguageUp();
65 void slotLanguageDown();
66 private:
67 enum Direction {Up,Down};
68 void languageMove(Direction direcition);
71 // NOTE: we need to mantain our own language list instead of using KLocale's
72 // because KLocale does not add a language if there is no translation
73 // for the current application so it would not be possible to set
74 // a language which has no systemsettings/kcontrol module translation
75 QStringList m_languageList;
76 KControlLocale *m_locale;
79 #endif