diff options
Diffstat (limited to 'kvoctrain/kvoctrain/common-dialogs/languageoptions.cpp')
-rw-r--r-- | kvoctrain/kvoctrain/common-dialogs/languageoptions.cpp | 84 |
1 files changed, 42 insertions, 42 deletions
diff --git a/kvoctrain/kvoctrain/common-dialogs/languageoptions.cpp b/kvoctrain/kvoctrain/common-dialogs/languageoptions.cpp index 5da383b0..36f61b00 100644 --- a/kvoctrain/kvoctrain/common-dialogs/languageoptions.cpp +++ b/kvoctrain/kvoctrain/common-dialogs/languageoptions.cpp @@ -677,8 +677,8 @@ KV_ISO639_Code kv_iso639_2[] = { }; */ -LanguageOptions::LanguageOptions(LangSet & langset, TQWidget* parent, const char* name, WFlags fl) - : LanguageOptionsBase(parent, name, fl), m_langSet(langset) +LanguageOptions::LanguageOptions(LangSet & langset, TQWidget* tqparent, const char* name, WFlags fl) + : LanguageOptionsBase(tqparent, name, fl), m_langSet(langset) { langset_popup = 0; @@ -689,7 +689,7 @@ LanguageOptions::LanguageOptions(LangSet & langset, TQWidget* parent, const char connect(d_shortName, TQT_SIGNAL(activated(const TQString&)), this, TQT_SLOT(slotShortActivated(const TQString&))); connect(e_langLong, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotLangChanged(const TQString&))); connect(e_shortName2, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotShort2Changed(const TQString&))); - connect(d_kblayout, TQT_SIGNAL(activated(const TQString&)), this, TQT_SLOT(slotKeyboardLayoutChanged(const TQString&))); + connect(d_kbtqlayout, TQT_SIGNAL(activated(const TQString&)), this, TQT_SLOT(slotKeyboardLayoutChanged(const TQString&))); // Load the languages first, then the countries and create the // menus for the languages last, so they will have flags @@ -768,13 +768,13 @@ void LanguageOptions::slotDeleteClicked() enableLangWidgets(); // doesn't work yet - if (d_shortName->count() != 0 && d_kblayout->isEnabled()) + if (d_shortName->count() != 0 && d_kbtqlayout->isEnabled()) { - for (int i = 0; i < d_kblayout->count(); i++) + for (int i = 0; i < d_kbtqlayout->count(); i++) { - if (d_kblayout->text(i) == m_langSet.keyboardLayout(d_shortName->currentItem())) + if (d_kbtqlayout->text(i) == m_langSet.keyboardLayout(d_shortName->currentItem())) { - d_kblayout->setCurrentItem(i); + d_kbtqlayout->setCurrentItem(i); break; } } @@ -782,9 +782,9 @@ void LanguageOptions::slotDeleteClicked() } -void LanguageOptions::slotKeyboardLayoutChanged(const TQString& layout) +void LanguageOptions::slotKeyboardLayoutChanged(const TQString& tqlayout) { - m_langSet.setKeyboardLayout(layout, d_shortName->currentItem()); + m_langSet.setKeyboardLayout(tqlayout, d_shortName->currentItem()); emit widgetModified(); m_hasChanged = true; } @@ -812,22 +812,22 @@ void LanguageOptions::enableLangWidgets() } else { - if (replyType == "TQStringList") + if (replyType == TQSTRINGLIST_OBJECT_NAME_STRING) { - TQStringList layouts; + TQStringList tqlayouts; TQDataStream stream(replyData, IO_ReadOnly); - stream >> layouts; - layouts.prepend(TQString::null); - d_kblayout->clear(); - d_kblayout->insertStringList(layouts); + stream >> tqlayouts; + tqlayouts.prepend(TQString()); + d_kbtqlayout->clear(); + d_kbtqlayout->insertStringList(tqlayouts); } } } else { //kdDebug() << "kxkb not enabled" << endl; - d_kblayout->clear(); - d_kblayout->setEnabled(false); + d_kbtqlayout->clear(); + d_kbtqlayout->setEnabled(false); } } @@ -898,22 +898,22 @@ void LanguageOptions::slotShortActivated(const TQString& _id) else b_langPixmap->setText (i18n("No Picture Selected")); - TQString layout = m_langSet.keyboardLayout(d_shortName->currentItem()); + TQString tqlayout = m_langSet.keyboardLayout(d_shortName->currentItem()); - //kdDebug() << "layout to select " << layout << endl; + //kdDebug() << "tqlayout to select " << tqlayout << endl; - for (int i = 0; i < d_kblayout->count(); i++) + for (int i = 0; i < d_kbtqlayout->count(); i++) { - if (d_kblayout->text(i) == layout) + if (d_kbtqlayout->text(i) == tqlayout) { - d_kblayout->setCurrentItem(i); + d_kbtqlayout->setCurrentItem(i); break; } } // not found - if (d_kblayout->currentText() != layout) + if (d_kbtqlayout->currentText() != tqlayout) { - d_kblayout->setCurrentItem(0); + d_kbtqlayout->setCurrentItem(0); } } } @@ -1015,8 +1015,8 @@ void LanguageOptions::loadCountryData() locale.setLanguage(curr_lang); KGlobal::_locale = &locale; - TQString sub = TQString::fromLatin1("l10n/"); - TQStringList regionlist = KGlobal::dirs()->findAllResources("locale", sub + TQString::fromLatin1("*.desktop")); + TQString sub = TQString::tqfromLatin1("l10n/"); + TQStringList regionlist = KGlobal::dirs()->findAllResources("locale", sub + TQString::tqfromLatin1("*.desktop")); regionlist.sort(); TQMap<TQString, Region> regions; @@ -1026,44 +1026,44 @@ void LanguageOptions::loadCountryData() TQString tag = *it; int index; - index = tag.findRev('/'); + index = tag.tqfindRev('/'); if (index != -1) tag = tag.mid(index + 1); - index = tag.findRev('.'); + index = tag.tqfindRev('.'); if (index != -1) tag.truncate(index); KSimpleConfig entry(*it); - entry.setGroup(TQString::fromLatin1("KCM Locale")); - TQString name = entry.readEntry(TQString::fromLatin1("Name"), i18n("without name")); + entry.setGroup(TQString::tqfromLatin1("KCM Locale")); + TQString name = entry.readEntry(TQString::tqfromLatin1("Name"), i18n("without name")); regions.insert(tag, Region(name)); } // add all languages to the list - TQStringList countrylist = KGlobal::dirs()->findAllResources("locale", sub + TQString::fromLatin1("*/entry.desktop")); + TQStringList countrylist = KGlobal::dirs()->findAllResources("locale", sub + TQString::tqfromLatin1("*/entry.desktop")); int idx = 0; for (TQStringList::ConstIterator sit = countrylist.begin(); sit != countrylist.end(); ++sit) { KSimpleConfig entry(*sit); - entry.setGroup(TQString::fromLatin1("KCM Locale")); - TQString name = entry.readEntry(TQString::fromLatin1("Name"), i18n("without name")); - TQString submenu = entry.readEntry(TQString::fromLatin1("Region")); + entry.setGroup(TQString::tqfromLatin1("KCM Locale")); + TQString name = entry.readEntry(TQString::tqfromLatin1("Name"), i18n("without name")); + TQString submenu = entry.readEntry(TQString::tqfromLatin1("Region")); TQString tag = *sit; - int index = tag.findRev('/'); + int index = tag.tqfindRev('/'); tag.truncate(index); - index = tag.findRev('/'); + index = tag.tqfindRev('/'); tag = tag.mid(index+1); if (tag == "C") continue; - TQStringList all_langs = TQStringList::split(",", entry.readEntry(TQString::fromLatin1("Languages"))); + TQStringList all_langs = TQStringList::split(",", entry.readEntry(TQString::tqfromLatin1("Languages"))); TQValueList<int> langs; TQString pixmap = *sit; - index = pixmap.findRev('/'); + index = pixmap.tqfindRev('/'); pixmap.truncate(index); pixmap += "/flag.png"; @@ -1071,8 +1071,8 @@ void LanguageOptions::loadCountryData() { // Treat ie "en_GB" and "en_USE" as "en" because the language list // only contains the first letters - if ((*it).find("_")) - *it = (*it).left((*it).find("_")); + if ((*it).tqfind("_")) + *it = (*it).left((*it).tqfind("_")); int id = global_langset.indexShortId(*it); if (id > 0) @@ -1126,7 +1126,7 @@ void LanguageOptions::loadCountryData() void LanguageOptions::slotLangFromGlobalActivated(int i) { - if (countryIdMap.contains(i)) + if (countryIdMap.tqcontains(i)) { Country c = countryIdMap[i]; bool first = true; @@ -1178,7 +1178,7 @@ void LanguageOptions::loadISO6391Data() for (unsigned id = 0; id < (int)(sizeof(kv_iso639_1) / sizeof(kv_iso639_1[0])) && kv_iso639_1[id].iso1code != 0; ++id) { TQString s = i18n(kv_iso639_1[id].langname); - global_langset.addSet(kv_iso639_1[id].iso1code, s, TQString::null, kv_iso639_1[id].iso2code); + global_langset.addSet(kv_iso639_1[id].iso1code, s, TQString(), kv_iso639_1[id].iso2code); } } |