From 648ba4a456d3aad2825193ff8f3bd52a875783b5 Mon Sep 17 00:00:00 2001 From: tpearson Date: Fri, 7 Jan 2011 04:18:52 +0000 Subject: Revert automated changes Sorry guys, they are just not ready for prime time Work will continue as always git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeedu@1212481 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- klettres/klettres/fontsdlg.ui | 4 ++-- klettres/klettres/klettres.cpp | 38 +++++++++++++++++++------------------- klettres/klettres/klettres.h | 6 +++--- klettres/klettres/soundfactory.cpp | 8 ++++---- klettres/klettres/soundfactory.h | 4 ++-- klettres/klettres/timerdlg.ui | 18 +++++++++--------- 6 files changed, 39 insertions(+), 39 deletions(-) (limited to 'klettres') diff --git a/klettres/klettres/fontsdlg.ui b/klettres/klettres/fontsdlg.ui index 8659fe93..34c72ad5 100644 --- a/klettres/klettres/fontsdlg.ui +++ b/klettres/klettres/fontsdlg.ui @@ -4,7 +4,7 @@ fontsdlg - + 0 0 @@ -31,7 +31,7 @@ - + kfontdialog.h diff --git a/klettres/klettres/klettres.cpp b/klettres/klettres/klettres.cpp index 39394d4b..4d378ee6 100644 --- a/klettres/klettres/klettres.cpp +++ b/klettres/klettres/klettres.cpp @@ -66,7 +66,7 @@ KLettres::KLettres() Prefs::writeConfig(); //MainWindow GUI: menus, tolbars and statusbar setupActions(); - setuptqStatusbar(); + setupStatusbar(); setupToolbars(); //Load Settings loadSettings(); @@ -107,7 +107,7 @@ void KLettres::findLanguages() TQStringList temp_languages; for (uint i=0; i1) { + if (m_languages.contains(m_languages[i])>1) { temp_languages.append(m_languages[i]); m_languages.remove(m_languages[i]); } @@ -122,12 +122,12 @@ void KLettres::findLanguages() m_languages.sort(); //write the present languages in config so they cannot be downloaded KConfig *config=kapp->config(); - config->setGroup("KNewStufftqStatus"); + config->setGroup("KNewStuffStatus"); for (uint i=0; ireadEntry(tmp)) - config->writeEntry(tmp, TQDate::tqcurrentDate().toString()); + config->writeEntry(tmp, TQDate::currentDate().toString()); } //we look in $KDEDIR/share/locale/all_languages from /kdelibs/kdecore/all_languages //to find the name of the country @@ -156,7 +156,7 @@ TQString Prefs::defaultLanguage() if (!defaultLanguages.isEmpty()) { //scan to see if defaultLanguages[0] belongs to m_languages. If not, en is default. int i = Prefs::self()->m_languages.findIndex(defaultLanguages[0]); - if (Prefs::self()->m_languages.tqcontains(Prefs::language())) + if (Prefs::self()->m_languages.contains(Prefs::language())) return Prefs::language(); //the last language played else if (i<1) return "en"; //if no other @@ -167,11 +167,11 @@ TQString Prefs::defaultLanguage() } -bool KLettres::loadLayout(TQDomDocument &tqlayoutDocument) +bool KLettres::loadLayout(TQDomDocument &layoutDocument) { - TQFile tqlayoutFile(locate("data", "klettres/"+Prefs::language()+"/sounds.xml")); + TQFile layoutFile(locate("data", "klettres/"+Prefs::language()+"/sounds.xml")); //if xml file is not found, program exits - if (!tqlayoutFile.exists()) + if (!layoutFile.exists()) { kdWarning() << "sounds.xml file not found in $KDEDIR/share/apps/klettres/"+Prefs::language() << endl; TQString mString=i18n("The file sounds.xml was not found in\n" @@ -180,15 +180,15 @@ bool KLettres::loadLayout(TQDomDocument &tqlayoutDocument) KMessageBox::information( this, mString,"KLettres - Error" ); kapp->quit();//exit(1); } - if (!tqlayoutFile.open(IO_ReadOnly)) + if (!layoutFile.open(IO_ReadOnly)) return false; //Check if document is well-formed - if (!tqlayoutDocument.setContent(&tqlayoutFile)) + if (!layoutDocument.setContent(&layoutFile)) { - tqlayoutFile.close(); + layoutFile.close(); return false; } - tqlayoutFile.close(); + layoutFile.close(); return true; } @@ -244,7 +244,7 @@ void KLettres::setupActions() setupGUI(); } -void KLettres::setuptqStatusbar() +void KLettres::setupStatusbar() { KStatusBar *st=statusBar(); m_langLabel = new TQLabel(st); @@ -284,7 +284,7 @@ void KLettres::loadSettings() //m_view->selectedLanguage = selectedLanguage; m_languageAction->setCurrentItem(Prefs::languageNumber()); TQString langString = m_languageNames[Prefs::languageNumber()]; - langString.tqreplace("&", TQString::null); + langString.replace("&", TQString::null); m_langLabel->setText(i18n("Current language is %1").arg(langString)); loadLangToolBar(); // load default level @@ -368,11 +368,11 @@ void KLettres::slotChangeLanguage(int newLanguage) Prefs::writeConfig(); // Update the StatusBar TQString langString = m_languageNames[newLanguage]; - langString.tqreplace("&", TQString::null); + langString.replace("&", TQString::null); m_langLabel->setText(i18n("Current language is %1").arg(langString)); loadLangToolBar(); // Change language effectively - bool ok = loadLayout(soundFactory->m_tqlayoutsDocument); + bool ok = loadLayout(soundFactory->m_layoutsDocument); if (ok) soundFactory->change(Prefs::language()); m_view->game(); @@ -470,7 +470,7 @@ void KLettres::loadLangToolBar() openFileStream.open(IO_ReadOnly); TQTextStream readFileStr(&openFileStream); readFileStr.setEncoding(TQTextStream::UnicodeUTF8); - //allData tqcontains all the words from the file + //allData contains all the words from the file allData = TQStringList::split("\n", readFileStr.read(), true); openFileStream.close(); for (int i=0; i<(int) allData.count(); i++) { @@ -489,7 +489,7 @@ void KLettres::slotPasteChar() TQString KLettres::charIcon(const TQChar & c) { ///Create a name and path for the icon - TQString s = locateLocal("icon", "char" + TQString::number(c.tqunicode()) + ".png"); + TQString s = locateLocal("icon", "char" + TQString::number(c.unicode()) + ".png"); TQRect r(4, 4, 120, 120); @@ -507,7 +507,7 @@ TQString KLettres::charIcon(const TQChar & c) p.setPen(Qt::black); p.drawText(r, Qt::AlignCenter, (TQString) c); - ///Create transparency tqmask + ///Create transparency mask TQBitmap bm(128, 128); bm.fill(Qt::color0); TQPainter b(&bm); diff --git a/klettres/klettres/klettres.h b/klettres/klettres/klettres.h index d767e3e5..afed715c 100644 --- a/klettres/klettres/klettres.h +++ b/klettres/klettres/klettres.h @@ -61,10 +61,10 @@ public: TQStringList m_languageNames; /** *Load the xml file - *@param tqlayoutDocument the xml file + *@param layoutDocument the xml file *@return bool true if the xml document is found and well formed, false otherwise */ - bool loadLayout(TQDomDocument &tqlayoutDocument); + bool loadLayout(TQDomDocument &layoutDocument); ///Number corresponding to the selected language: 0 is Czech, 1 is Danish, 2 is English (default), 3 is French, 4 is Dutch, 5 is Slovak //uint selectedLanguage; ///Action that sets up the Language menu @@ -106,7 +106,7 @@ protected: ///Build the main window menus void setupActions(); ///Create and setup statusbar - void setuptqStatusbar(); + void setupStatusbar(); ///Create main and second toolbars void setupToolbars(); /**generates icons for the special characters toolbar diff --git a/klettres/klettres/soundfactory.cpp b/klettres/klettres/soundfactory.cpp index d210e4d7..e23bc501 100644 --- a/klettres/klettres/soundfactory.cpp +++ b/klettres/klettres/soundfactory.cpp @@ -41,7 +41,7 @@ SoundFactory::SoundFactory(KLettres *parent, const char *name) namesList = filesList = 0; sounds = 0; - bool ok = klettres->loadLayout(m_tqlayoutsDocument); + bool ok = klettres->loadLayout(m_layoutsDocument); if (ok) change(Prefs::language()); if (!ok) loadFailure(); } @@ -53,7 +53,7 @@ SoundFactory::~SoundFactory() void SoundFactory::change(TQString currentLanguage) { //go load the sounds for the current language - bool ok = loadLanguage(m_tqlayoutsDocument, currentLanguage); + bool ok = loadLanguage(m_layoutsDocument, currentLanguage); kdDebug() << "ok " << ok << endl; //tell the user if there are no sounds if (!ok) loadFailure(); @@ -78,7 +78,7 @@ void SoundFactory::loadFailure() KMessageBox::error(klettres, i18n("Error while loading the sound names.")); } -bool SoundFactory::loadLanguage(TQDomDocument &tqlayoutDocument, TQString currentLanguage) +bool SoundFactory::loadLanguage(TQDomDocument &layoutDocument, TQString currentLanguage) { TQDomNodeList languagesList, alphabetList, @@ -90,7 +90,7 @@ bool SoundFactory::loadLanguage(TQDomDocument &tqlayoutDocument, TQString curren soundNameElement; TQDomAttr nameAttribute, fileAttribute; - languagesList = tqlayoutDocument.elementsByTagName("language"); + languagesList = layoutDocument.elementsByTagName("language"); TQDomAttr codeAttribute; //check if the sound files match current language languageElement = (const TQDomElement &) languagesList.item(0).toElement(); diff --git a/klettres/klettres/soundfactory.h b/klettres/klettres/soundfactory.h index ace9e36d..2cc8a5de 100644 --- a/klettres/klettres/soundfactory.h +++ b/klettres/klettres/soundfactory.h @@ -64,9 +64,9 @@ public: * Call that when you read the language from Config and when the language changes * or when the level changes */ - bool loadLanguage(TQDomDocument &tqlayoutDocument, TQString currentLanguage); + bool loadLanguage(TQDomDocument &layoutDocument, TQString currentLanguage); ///The language document - TQDomDocument m_tqlayoutsDocument; + TQDomDocument m_layoutsDocument; private: ///Report a load failure diff --git a/klettres/klettres/timerdlg.ui b/klettres/klettres/timerdlg.ui index f9ed6798..91ab486f 100644 --- a/klettres/klettres/timerdlg.ui +++ b/klettres/klettres/timerdlg.ui @@ -4,7 +4,7 @@ timerdlg - + 0 0 @@ -12,7 +12,7 @@ 260 - + 350 0 @@ -80,7 +80,7 @@ Expanding - + 264 20 @@ -97,7 +97,7 @@ Expanding - + 25 16 @@ -114,7 +114,7 @@ Expanding - + 270 20 @@ -163,7 +163,7 @@ Expanding - + 228 20 @@ -199,7 +199,7 @@ Expanding - + 226 20 @@ -216,7 +216,7 @@ Expanding - + 25 16 @@ -238,7 +238,7 @@ - + kactivelabel.h -- cgit v1.2.1