1 /***************************************************************************
3 language options for kvoctrain
5 -----------------------------------------------------------------------
9 copyright :(C) 2005 Peter Hedlund
11 email : peter@peterandlinda.com
13 -----------------------------------------------------------------------
15 ***************************************************************************/
17 /***************************************************************************
19 * This program is free software; you can redistribute it and/or modify *
20 * it under the terms of the GNU General Public License as published by *
21 * the Free Software Foundation; either version 2 of the License, or *
22 * (at your option) any later version. *
24 ***************************************************************************/
26 #ifndef LANGUAGEOPTIONS_H
27 #define LANGUAGEOPTIONS_H
29 #include <qpopupmenu.h>
31 #include "languageoptionsbase.h"
34 class LanguageOptions
: public LanguageOptionsBase
39 LanguageOptions(LangSet
& langset
, QWidget
* parent
= 0, const char* name
= 0, WFlags fl
= 0 );
40 virtual ~LanguageOptions ();
42 LangSet
getLangSet () const;
46 Country(const QString
& c
, const QValueList
<int> l
, const QString
& p
, int i
)
47 : country(c
), langs(l
), pixmap(p
), id(i
) { }
50 QValueList
<int> langs
;
57 Region (const QString
& reg
)
61 QValueList
<Country
> countries
;
67 void updateSettings();
70 void widgetModified();
73 void slotDeleteClicked();
74 void slotNewClicked();
75 void slotPixmapClicked();
76 void slotLangChanged(const QString
&);
77 void slotShort2Changed(const QString
&);
78 void slotShortActivated(const QString
&);
79 void slotNewNameChanged(const QString
&);
80 void slotLangFromGlobalActivated(int);
81 void slotLangFromISO6391Activated(int);
82 void slotKeyboardLayoutChanged(const QString
&);
85 bool setPixmap(QString pm
);
86 void enableLangWidgets();
87 void loadCountryData();
88 void loadISO6391Data();
89 void createISO6391Menus();
91 LangSet global_langset
;
92 QMap
<int, Country
> countryIdMap
;
93 QPopupMenu
* langset_popup
;
94 QPopupMenu
* iso6391_popup
;