• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdeui
 

tdeui

  • tdeui
klanguagebutton.h
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  *
8  * Requires the Qt widget libraries, available at no cost at
9  * http://www.troll.no/
10  *
11  * This program is free software; you can redistribute it and/or modify
12  * it under the terms of the GNU General Public License as published by
13  * the Free Software Foundation; either version 2 of the License, or
14  * (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with this program; if not, write to the Free Software
23  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
24  */
25 
26 
27 #ifndef __KLANGBUTTON_H__
28 #define __KLANGBUTTON_H__
29 
30 #include <tqwidget.h>
31 
32 #include <tdelibs_export.h>
33 
34 class KLanguageButtonPrivate;
35 class TQIconSet;
36 class TQPopupMenu;
37 
47 class TDEUI_EXPORT KLanguageButton : public TQWidget
48 {
49  Q_OBJECT
50 
51 public:
58  KLanguageButton(TQWidget * parent = 0, const char * name = 0);
59 
67  KLanguageButton(const TQString & text, TQWidget * parent = 0, const char * name = 0);
68 
72  virtual ~KLanguageButton();
73 
83  void insertItem( const TQIconSet& icon, const TQString &text,
84  const TQString & id, const TQString &submenu = TQString::null,
85  int index = -1 );
94  void insertItem( const TQString &text, const TQString & id,
95  const TQString &submenu = TQString::null, int index = -1 );
102  void insertSeparator( const TQString &submenu = TQString::null,
103  int index = -1 );
113  void insertSubmenu( const TQIconSet & icon, const TQString &text,
114  const TQString & id, const TQString &submenu = TQString::null,
115  int index = -1);
124  void insertSubmenu( const TQString &text, const TQString & id,
125  const TQString &submenu = TQString::null, int index = -1);
126 
127 
128  void insertLanguage( const TQString& path, const TQString& name,
129  const TQString& sub = TQString::null,
130  const TQString &submenu = TQString::null, int index = -1);
131 
132 
133  int count() const;
137  void clear();
141  void setText(const TQString & text);
145  TQString current() const;
149  bool contains( const TQString & id ) const;
153  void setCurrentItem( const TQString & id );
154 
155  TQString id( int i ) const;
156 
157 signals:
162  void activated( const TQString & id );
163  void highlighted( const TQString & id );
164 
165 private slots:
166  void slotActivated( int );
167  void slotHighlighted( int );
168 
169 private:
170  int currentItem() const;
171  void setCurrentItem( int );
172  void init(const char * name);
173 
174  // work space for the new class
175  TQStringList *m_ids;
176  TQPopupMenu *m_popup, *m_oldPopup;
177  int m_current;
178 
179  KLanguageButtonPrivate * d;
180 };
181 
182 #endif
KLanguageButton
KLanguageButton provides a combobox with a 2-D dataset.
Definition: klanguagebutton.h:47

tdeui

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

tdeui

Skip menu "tdeui"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  •     tdecore
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  • tdeioslave
  •   http
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeui by doxygen 1.8.8
This website is maintained by Timothy Pearson.