KDEUI
klanguagebutton.h
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 #ifndef KLANGUAGEBUTTON_H
00026 #define KLANGUAGEBUTTON_H
00027
00028 #include <kdeui_export.h>
00029 #include <QtGui/QWidget>
00030
00031 class QAction;
00032 class KLocale;
00033 class KLanguageButtonPrivate;
00034
00041 class KDEUI_EXPORT KLanguageButton : public QWidget
00042 {
00043 Q_OBJECT
00044
00045 public:
00052 explicit KLanguageButton(QWidget * parent = 0);
00053
00060 explicit KLanguageButton(const QString & text, QWidget * parent = 0 );
00061
00065 virtual ~KLanguageButton();
00066
00072 void setLocale( const KLocale *locale );
00073
00079 void setText( const QString &text );
00080
00089 void showLanguageCodes( bool show );
00090
00096 void loadAllLanguages();
00097
00108 void insertLanguage( const QString &languageCode, const QString &name = QString(), int index = -1 );
00109
00115 void insertSeparator( int index = -1 );
00116
00120 int count() const;
00121
00125 void clear();
00126
00132 QString current() const;
00133
00140 bool contains( const QString &languageCode ) const;
00141
00147 void setCurrentItem( const QString &languageCode );
00148
00149 Q_SIGNALS:
00155 void activated( const QString &languageCode );
00161 void highlighted( const QString &languageCode );
00162
00163 private Q_SLOTS:
00164 void slotTriggered( QAction* );
00165 void slotHovered( QAction* );
00166
00167 private:
00168 KLanguageButtonPrivate * const d;
00169 };
00170
00171 #endif