4 * Copyright (c) 1999-2003 Hans Petter Bieker <bieker@kde.org>
6 * Requires the Qt widget libraries, available at no cost at
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
38 class KLocaleConfigTime
: public QWidget
43 explicit KLocaleConfigTime( KLocale
*_locale
, QWidget
*parent
=0);
44 virtual ~KLocaleConfigTime( );
49 void showEvent( QShowEvent
*e
);
53 * Loads all settings from the current locale into the current widget.
55 void slotLocaleChanged();
57 * Retranslate all objects owned by this object using the current locale.
66 void slotTimeFmtChanged(const QString
&t
);
67 void slotDateFmtChanged(const QString
&t
);
68 void slotDateFmtShortChanged(const QString
&t
);
69 void slotWeekStartDayChanged(int firstDay
);
70 void slotDateMonthNamePossChanged();
71 void slotCalendarSystemChanged(int calendarSystem
);
74 void updateWeekDayNames();
76 QList
<StringPair
> timeMap() const;
77 QList
<StringPair
> dateMap() const;
79 QString
storeToUser(const QList
<StringPair
> & map
,
80 const QString
& storeFormat
) const;
81 QString
userToStore(const QList
<StringPair
> & map
,
82 const QString
& userFormat
) const;
83 StringPair
buildStringPair(const QChar
&storeName
, const QString
&userName
) const;
89 QComboBox
*m_comboTimeFmt
;
91 QComboBox
* m_comboDateFmt
;
92 QLabel
*m_labDateFmtShort
;
93 QComboBox
* m_comboDateFmtShort
;
94 QLabel
* m_labWeekStartDay
;
95 QComboBox
* m_comboWeekStartDay
;
96 QCheckBox
*m_chDateMonthNamePossessive
;
97 QLabel
* m_labCalendarSystem
;
98 QComboBox
* m_comboCalendarSystem
;
101 #endif // LOCALETIME_H