Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef QXTLANGUAGECOMBOBOX_H
00027 #define QXTLANGUAGECOMBOBOX_H
00028
00029 #include <QComboBox>
00030 #include <QLocale>
00031 #include "qxtglobal.h"
00032 #include "qxtpimpl.h"
00033
00034 class QxtLanguageComboBoxPrivate;
00035
00036 class QXT_GUI_EXPORT QxtLanguageComboBox : public QComboBox
00037 {
00038 Q_OBJECT
00039 QXT_DECLARE_PRIVATE(QxtLanguageComboBox);
00040 Q_PROPERTY(QString currentLanguageName READ currentLanguageName)
00041 #if QT_VERSION >= 0x040300
00042 Q_PROPERTY(QLocale::Language currentLanguage READ currentLanguage WRITE setCurrentLanguage)
00043 #endif
00044 Q_PROPERTY(DisplayMode displayMode READ displayMode WRITE setDisplayMode)
00045 Q_PROPERTY(QString translationPath READ translationPath WRITE setTranslationPath)
00046
00047 public:
00048 explicit QxtLanguageComboBox(QWidget* parent = 0);
00049 virtual ~QxtLanguageComboBox();
00050
00051 enum DisplayMode
00052 {AllLanguages, AvailableTranslations};
00053 Q_ENUMS(DisplayMode);
00054
00055 DisplayMode displayMode() const;
00056 QString translationPath() const;
00057
00058 QLocale::Language currentLanguage() const;
00059 QString currentLanguageName() const;
00060
00061 public Q_SLOTS:
00062 void setCurrentLanguage(QLocale::Language lang);
00063 void setDisplayMode(DisplayMode mode);
00064 void setTranslationPath(const QString& path);
00065
00066 Q_SIGNALS:
00067 void currentLanguageChanged(QLocale::Language country);
00068 void currentLanguageNameChanged(const QString& name);
00069
00070
00071
00072
00073
00074 };
00075
00076
00077 #endif // QXTLANGUAGECOMBOBOX_H