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

KDEUI

  • sources
  • kde-4.12
  • kdelibs
  • kdeui
  • widgets
klanguagebutton.h
Go to the documentation of this file.
1 /*
2  * klangbutton.h - Button with language selection drop down menu.
3  * Derived from the KLangCombo class by Hans Petter Bieker.
4  *
5  * Copyright (c) 1999-2003 Hans Petter Bieker <bieker@kde.org>
6  * (c) 2001 Martijn Klingens <klingens@kde.org>
7  * (c) 2007 David Jarvie <software@astrojar.org.uk>
8  *
9  * This library is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU Library General Public
11  * License as published by the Free Software Foundation; either
12  * version 2 of the License, or (at your option) any later version.
13  *
14  * This library is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17  * Library General Public License for more details.
18  *
19  * You should have received a copy of the GNU Library General Public License
20  * along with this library; see the file COPYING.LIB. If not, write to
21  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
22  * Boston, MA 02110-1301, USA.
23  */
24 
25 #ifndef KLANGUAGEBUTTON_H
26 #define KLANGUAGEBUTTON_H
27 
28 #include <kdeui_export.h>
29 #include <QtGui/QWidget>
30 
31 class QAction;
32 class KLocale;
33 class KLanguageButtonPrivate;
34 
46 class KDEUI_EXPORT KLanguageButton : public QWidget
47 {
48  Q_OBJECT
49 
50 public:
57  explicit KLanguageButton(QWidget * parent = 0);
58 
65  explicit KLanguageButton(const QString & text, QWidget * parent = 0 );
66 
70  virtual ~KLanguageButton();
71 
77  void setLocale( const KLocale *locale );
78 
84  void setText( const QString &text );
85 
94  void showLanguageCodes( bool show );
95 
101  void loadAllLanguages();
102 
113  void insertLanguage( const QString &languageCode, const QString &name = QString(), int index = -1 );
114 
120  void insertSeparator( int index = -1 );
121 
125  int count() const;
126 
130  void clear();
131 
137  QString current() const;
138 
145  bool contains( const QString &languageCode ) const;
146 
152  void setCurrentItem( const QString &languageCode );
153 
154 Q_SIGNALS:
160  void activated( const QString &languageCode );
166  void highlighted( const QString &languageCode );
167 
168 private Q_SLOTS:
169  void slotTriggered( QAction* );
170  void slotHovered( QAction* );
171 
172 private:
173  KLanguageButtonPrivate * const d;
174 };
175 
176 #endif
QWidget
KStandardAction::name
const char * name(StandardAction id)
This will return the internal name of a given standard action.
Definition: kstandardaction.cpp:223
QString
setLocale
void setLocale(KLocale *, CopyCatalogs copy=DoCopyCatalogs)
KStandardAction::clear
KAction * clear(const QObject *recvr, const char *slot, QObject *parent)
Clear the content of the focus widget.
Definition: kstandardaction.cpp:314
locale
KLocale * locale()
KLocale
kdeui_export.h
QAction
KLanguageButton
KLanguageButton is a pushbutton which allows a language to be selected from a popup list...
Definition: klanguagebutton.h:46
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:49:14 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDEUI

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

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal