~ubuntu-branches/ubuntu/warty/kdebase/warty

« back to all changes in this revision

Viewing changes to kcontrol/locale/kcmlocale.h

  • Committer: Bazaar Package Importer
  • Author(s): LaMont Jones
  • Date: 2004-09-16 04:51:45 UTC
  • Revision ID: james.westby@ubuntu.com-20040916045145-9vr63kith3k1cpza
Tags: upstream-3.2.2
ImportĀ upstreamĀ versionĀ 3.2.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * kcmlocale.h
 
3
 *
 
4
 * Copyright (c) 1998 Matthias Hoelzer <hoelzer@physik.uni-wuerzburg.de>
 
5
 * Copyright (c) 1999-2003 Hans Petter Bieker <bieker@kde.org>
 
6
 *
 
7
 * Requires the Qt widget libraries, available at no cost at
 
8
 * http://www.troll.no/
 
9
 *
 
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.
 
14
 *
 
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.
 
19
 *
 
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., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
23
 */
 
24
 
 
25
 
 
26
#ifndef KCMLOCALE_H
 
27
#define KCMLOCALE_H
 
28
 
 
29
#include <qwidget.h>
 
30
 
 
31
class KLocale;
 
32
class KLanguageButton;
 
33
class KLocaleSample;
 
34
class KAddButton;
 
35
 
 
36
class QLabel;
 
37
class QListBox;
 
38
class QPushButton;
 
39
 
 
40
#include <qstringlist.h>
 
41
 
 
42
class KLocaleConfig : public QWidget
 
43
{
 
44
  Q_OBJECT
 
45
 
 
46
public:
 
47
  KLocaleConfig( KLocale *_locale,
 
48
                 QWidget *parent = 0, const char *name = 0);
 
49
  virtual ~KLocaleConfig( );
 
50
 
 
51
  void save();
 
52
 
 
53
public slots:
 
54
  /**
 
55
   * Loads all settings from the current locale into the current widget.
 
56
   */
 
57
  void slotLocaleChanged();
 
58
  /**
 
59
   * Retranslate all objects owned by this object using the current locale.
 
60
   */
 
61
  void slotTranslate();
 
62
 
 
63
signals:
 
64
  void localeChanged();
 
65
  void languageChanged();
 
66
 
 
67
private slots:
 
68
  void loadLanguageList();
 
69
  void loadCountryList();
 
70
 
 
71
  void changedCountry(const QString & code);
 
72
  void readLocale(const QString &path, QString &name,
 
73
                  const QString &sub) const;
 
74
 
 
75
  void slotAddLanguage(const QString & id);
 
76
  void slotRemoveLanguage();
 
77
  void slotLanguageUp();
 
78
  void slotLanguageDown();
 
79
  void slotCheckButtons();
 
80
 
 
81
private:
 
82
  QStringList languageList() const;
 
83
 
 
84
  KLocale *m_locale;
 
85
 
 
86
  KLanguageButton *m_comboCountry;
 
87
 
 
88
  QLabel *m_labCountry;
 
89
  QLabel *m_labLang;
 
90
 
 
91
  QListBox * m_languages;
 
92
  KLanguageButton * m_addLanguage;
 
93
  QPushButton * m_removeLanguage;
 
94
  QPushButton * m_upButton;
 
95
  QPushButton * m_downButton;
 
96
};
 
97
 
 
98
#endif