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

keduca

klangcombo.cpp

Go to the documentation of this file.
00001 /*
00002  * klangcombo.cpp - Adds some methods for inserting languages.
00003  *
00004  * Copyright (c) 1999-2000 Hans Petter Bieker <bieker@kde.org>
00005  *
00006  * Requires the Qt widget libraries, available at no cost at
00007  * http://www.troll.no/
00008  *
00009  *  This program is free software; you can redistribute it and/or modify
00010  *  it under the terms of the GNU General Public License as published by
00011  *  the Free Software Foundation; either version 2 of the License, or
00012  *  (at your option) any later version.
00013  *
00014  *  This program 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
00017  *  GNU General Public License for more details.
00018  *
00019  *  You should have received a copy of the GNU General Public License
00020  *  along with this program; if not, write to the Free Software
00021  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
00022  */
00023 
00024 
00025 #include <kstandarddirs.h>
00026 
00027 #include "klangcombo.h"
00028 #include "klangcombo.moc"
00029 
00030 KLanguageCombo::~KLanguageCombo ()
00031 {
00032 }
00033 
00034 KLanguageCombo::KLanguageCombo (QWidget * parent, const char *name)
00035     : KTagComboBox(parent, name)
00036 {
00037 }
00038 
00039 void KLanguageCombo::insertLanguage(const QString& path, const QString& name, const QString& sub, const QString &submenu)
00040 {
00041     QString output = name + QString::fromLatin1(" (") + path + QString::fromLatin1(")");
00042     QPixmap flag(locate("locale", sub + path + QString::fromLatin1("/flag.png")));
00043     insertItem(QIconSet(flag), output, path, submenu);
00044 }
00045 
00046 void KLanguageCombo::changeLanguage(const QString& name, int i)
00047 {
00048     if (i < 0 || i >= count()) return;
00049     QString output = name + QString::fromLatin1(" (") + tag(i) + QString::fromLatin1(")");
00050     changeItem(output, i);
00051 }

keduca

Skip menu "keduca"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members

API Reference

Skip menu "API Reference"
  • keduca
  • kstars
Generated for API Reference by doxygen 1.5.9
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