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

KDEUI

  • 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
31class QAction;
32class KLocale;
33class KLanguageButtonPrivate;
34
46class KDEUI_EXPORT KLanguageButton : public QWidget
47{
48 Q_OBJECT
49
50public:
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
154Q_SIGNALS:
160 void activated( const QString &languageCode );
166 void highlighted( const QString &languageCode );
167
168private Q_SLOTS:
169 void slotTriggered( QAction* );
170 void slotHovered( QAction* );
171
172private:
173 KLanguageButtonPrivate * const d;
174};
175
176#endif
KLanguageButton
KLanguageButton is a pushbutton which allows a language to be selected from a popup list.
Definition: klanguagebutton.h:47
KLanguageButton::highlighted
void highlighted(const QString &languageCode)
This signal is emitted when a new item is highlighted.
KLanguageButton::activated
void activated(const QString &languageCode)
This signal is emitted when a new item is activated.
KLocale
QAction
QWidget
kdeui_export.h
locale
KLocale * locale()
setLocale
void setLocale(KLocale *, CopyCatalogs copy=DoCopyCatalogs)
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 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-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 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
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
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