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

parley

firstidentifierlanguagepage.cpp

Go to the documentation of this file.
00001 /***************************************************************************
00002 
00003                              kvtnewdocumentwizardlanguagepage
00004 
00005     -----------------------------------------------------------------------
00006 
00007     copyright     : (C) 2007 Frederik Gladhorn <frederik.gladhorn@kdemail.net>
00008 
00009     -----------------------------------------------------------------------
00010 
00011  ***************************************************************************/
00012 
00013 /***************************************************************************
00014  *                                                                         *
00015  *   This program is free software; you can redistribute it and/or modify  *
00016  *   it under the terms of the GNU General Public License as published by  *
00017  *   the Free Software Foundation; either version 2 of the License, or     *
00018  *   (at your option) any later version.                                   *
00019  *                                                                         *
00020  ***************************************************************************/
00021 
00022 #include "firstidentifierlanguagepage.h"
00023 
00024 #include <QWizardPage>
00025 #include <QLabel>
00026 #include <QLineEdit>
00027 #include <QTreeView>
00028 #include <QCheckBox>
00029 #include <QVBoxLayout>
00030 
00031 #include <KComboBox>
00032 #include <KLocale>
00033 
00034 #include "kvtnewdocumentwizard.h"
00035 
00040 FirstIdentifierLanguagePage::FirstIdentifierLanguagePage(QWizard * parent)
00041     : QWizardPage(parent)
00042 {
00043     setTitle(i18n("Identifier and language selection"));
00044     setSubTitle(i18n("Please select the first column data:"));
00045 
00046     setupUi(this);
00047     registerField("firstIdentifierName*", identifierNameLineEdit);
00048     registerField("firstLocale", languageComboBox, "currentText", "currentTextChanged()");
00049 
00050     connect(languageComboBox, SIGNAL(currentIndexChanged(const QString&)), this, SLOT(currentLanguageChanged(const QString&)));
00051 
00052     QStringList codes = KGlobal::locale()->allLanguagesList();
00053 
00054     QStringList languageNames;
00055     foreach (QString code, codes){
00056         languageNames.append( KGlobal::locale()->languageCodeToName(code) );
00057     }
00058     languageNames.sort();
00059 
00060     languageComboBox->addItems(languageNames);
00061 }
00062 
00063 FirstIdentifierLanguagePage::~FirstIdentifierLanguagePage()
00064 {
00065 }
00066 
00067 void FirstIdentifierLanguagePage::currentLanguageChanged(const QString & language)
00068 {
00069     identifierNameLineEdit->setText(language);
00070 }
00071 
00072 void FirstIdentifierLanguagePage::initializePage()
00073 {
00074     QString currentCode = KGlobal::locale()->language();
00075     languageComboBox->setCurrentIndex(
00076         languageComboBox->findText(
00077             KGlobal::locale()->languageCodeToName(currentCode) ) );
00078 }
00079 
00080 
00081 #include "firstidentifierlanguagepage.moc"

parley

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

kdeedu

Skip menu "kdeedu"
  • kalzium
  • kanagram
  • kig
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  •   docs
  •   src
  • parley
Generated for kdeedu 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