• Skip to content
  • Skip to link menu
KDE 4.1 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

KDEUI

klanguagebutton.h

Go to the documentation of this file.
00001 /*
00002  * klangbutton.h - Button with language selection drop down menu.
00003  *                 Derived from the KLangCombo class by Hans Petter Bieker.
00004  *
00005  * Copyright (c) 1999-2003 Hans Petter Bieker <bieker@kde.org>
00006  *           (c) 2001      Martijn Klingens <klingens@kde.org>
00007  *           (c) 2007      David Jarvie <software@astrojar.org.uk>
00008  *
00009  *  This library is free software; you can redistribute it and/or
00010  *  modify it under the terms of the GNU Library General Public
00011  *  License as published by the Free Software Foundation; either
00012  *  version 2 of the License, or (at your option) any later version.
00013  *
00014  *  This library is distributed in the hope that it will be useful,
00015  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00017  *  Library General Public License for more details.
00018  *
00019  *  You should have received a copy of the GNU Library General Public License
00020  *  along with this library; see the file COPYING.LIB.  If not, write to
00021  *  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00022  *  Boston, MA 02110-1301, USA.
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

KDEUI

Skip menu "KDEUI"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • KIO
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal