00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef __KLOCALECONFIGTIME_H__
00025 #define __KLOCALECONFIGTIME_H__
00026
00027 #include <tqwidget.h>
00028
00029 #include <tqmap.h>
00030
00031 class TQCheckBox;
00032 class TQComboBox;
00033
00034 class KLocale;
00035 class KLanguageCombo;
00036
00037 class StringPair;
00038
00039 class KLocaleConfigTime : public QWidget
00040 {
00041 Q_OBJECT
00042
00043 public:
00044 KLocaleConfigTime( KLocale *_locale, TQWidget *parent=0, const char *name=0);
00045 virtual ~KLocaleConfigTime( );
00046
00047 void save();
00048
00049 protected:
00050 void showEvent( TQShowEvent *e );
00051
00052 public slots:
00056 void slotLocaleChanged();
00060 void slotTranslate();
00061
00062 signals:
00063 void localeChanged();
00064
00065 private slots:
00066
00067 void slotTimeFmtChanged(const TQString &t);
00068 void slotDateFmtChanged(const TQString &t);
00069 void slotDateFmtShortChanged(const TQString &t);
00070 void slotWeekStartDayChanged(int firstDay);
00071 void slotDateMonthNamePossChanged();
00072 void slotCalendarSystemChanged(int calendarSystem);
00073
00074 private:
00075 void updateWeekDayNames();
00076
00077 TQValueList<StringPair> timeMap() const;
00078 TQValueList<StringPair> dateMap() const;
00079
00080 TQString storeToUser(const TQValueList<StringPair> & map,
00081 const TQString & storeFormat) const;
00082 TQString userToStore(const TQValueList<StringPair> & map,
00083 const TQString & userFormat) const;
00084 StringPair buildStringPair(const TQChar &storeName, const TQString &userName) const;
00085
00086 KLocale *m_locale;
00087
00088
00089 TQLabel *m_labTimeFmt;
00090 TQComboBox *m_comboTimeFmt;
00091 TQLabel *m_labDateFmt;
00092 TQComboBox * m_comboDateFmt;
00093 TQLabel *m_labDateFmtShort;
00094 TQComboBox * m_comboDateFmtShort;
00095 TQLabel * m_labWeekStartDay;
00096 TQComboBox * m_comboWeekStartDay;
00097 TQCheckBox *m_chDateMonthNamePossessive;
00098 TQLabel * m_labCalendarSystem;
00099 TQComboBox * m_comboCalendarSystem;
00100 };
00101
00102 #endif