diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-10 06:08:18 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-10 06:08:18 +0000 |
commit | d8762de95349dc6edaa34db9bf699b367c1af6b1 (patch) | |
tree | 8c76a6ab8e4e92d13196cb11ddab2d0fb64ec680 /kanagram/src | |
parent | 03458c4e2ca2e92deafe078d0e09e1acd4c4765f (diff) | |
download | tdeedu-d8762de95349dc6edaa34db9bf699b367c1af6b1.tar.gz tdeedu-d8762de95349dc6edaa34db9bf699b367c1af6b1.zip |
rename the following methods:
tqfind find
tqreplace replace
tqcontains contains
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeedu@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kanagram/src')
-rw-r--r-- | kanagram/src/kanagram.cpp | 48 | ||||
-rw-r--r-- | kanagram/src/kanagramgame.cpp | 2 | ||||
-rw-r--r-- | kanagram/src/keduvocdocument.cpp | 10 | ||||
-rw-r--r-- | kanagram/src/keduvocexpression.cpp | 4 | ||||
-rw-r--r-- | kanagram/src/keduvockvtmlreader.cpp | 12 | ||||
-rw-r--r-- | kanagram/src/keduvockvtmlwriter.cpp | 4 | ||||
-rw-r--r-- | kanagram/src/leitnersystem.cpp | 8 | ||||
-rw-r--r-- | kanagram/src/mainsettings.cpp | 2 | ||||
-rw-r--r-- | kanagram/src/vocabedit.cpp | 2 | ||||
-rw-r--r-- | kanagram/src/vocabeditwidget.ui | 2 |
10 files changed, 47 insertions, 47 deletions
diff --git a/kanagram/src/kanagram.cpp b/kanagram/src/kanagram.cpp index df845ac6..4a6f8787 100644 --- a/kanagram/src/kanagram.cpp +++ b/kanagram/src/kanagram.cpp @@ -377,7 +377,7 @@ TQRect Kanagram::innerRect(const TQRect &rect, const int xMargin, const int yMar void Kanagram::mousePressEvent(TQMouseEvent *e) { - if (m_nextRect.tqcontains(e->pos())) + if (m_nextRect.contains(e->pos())) { hideHint(); m_game->nextAnagram(); @@ -386,51 +386,51 @@ void Kanagram::mousePressEvent(TQMouseEvent *e) update(); } - if(m_configRect.tqcontains(e->pos())) + if(m_configRect.contains(e->pos())) { showSettings(); } - if(m_quitRect.tqcontains(e->pos())) + if(m_quitRect.contains(e->pos())) { kapp->quit(); } - if(m_revealRect.tqcontains(e->pos())) + if(m_revealRect.contains(e->pos())) { m_game->restoreWord(); update(); } - if(m_logoRect.tqcontains(e->pos())) + if(m_logoRect.contains(e->pos())) { m_helpMenu->aboutApplication(); } if(!m_showHint && m_overHelp) { - if(m_handbookRect.tqcontains(e->pos())) + if(m_handbookRect.contains(e->pos())) { m_helpMenu->appHelpActivated(); } - if(m_aboutKDERect.tqcontains(e->pos())) + if(m_aboutKDERect.contains(e->pos())) { m_helpMenu->aboutKDE(); } - if(m_aboutAppRect.tqcontains(e->pos())) + if(m_aboutAppRect.contains(e->pos())) { m_helpMenu->aboutApplication(); } } - if(m_hintBoxRect.tqcontains(e->pos())) + if(m_hintBoxRect.contains(e->pos())) { hideHint(); } - if(m_switcherRect.tqcontains(e->pos()) || m_arrowRect.tqcontains(e->pos())) + if(m_switcherRect.contains(e->pos()) || m_arrowRect.contains(e->pos())) { if(!(e->button() == Qt::RightButton)) m_game->nextVocab(); @@ -444,7 +444,7 @@ void Kanagram::mousePressEvent(TQMouseEvent *e) update(); } - if(m_hintRect.tqcontains(e->pos())) + if(m_hintRect.contains(e->pos())) { if(m_showHint == true) m_showHint = false; else @@ -459,7 +459,7 @@ void Kanagram::mousePressEvent(TQMouseEvent *e) update(); } - if(m_upRect.tqcontains(e->pos()) && m_inputBox->text() != "") + if(m_upRect.contains(e->pos()) && m_inputBox->text() != "") { if(m_inputBox->text().lower().stripWhiteSpace() == m_game->getWord()) { @@ -492,7 +492,7 @@ void Kanagram::updateButtonHighlighting(const TQPoint &p) bool haveToUpdate; haveToUpdate = false; - if (m_nextRect.tqcontains(p)) + if (m_nextRect.contains(p)) { if (!m_overNext) { @@ -506,7 +506,7 @@ void Kanagram::updateButtonHighlighting(const TQPoint &p) haveToUpdate = true; } - if(m_configRect.tqcontains(p)) + if(m_configRect.contains(p)) { if(!m_overConfig) { @@ -520,7 +520,7 @@ void Kanagram::updateButtonHighlighting(const TQPoint &p) haveToUpdate = true; } - if(m_helpRect.tqcontains(p)) + if(m_helpRect.contains(p)) { if(!m_overHelp) { @@ -534,7 +534,7 @@ void Kanagram::updateButtonHighlighting(const TQPoint &p) haveToUpdate = true; } - if(m_quitRect.tqcontains(p)) + if(m_quitRect.contains(p)) { if(!m_overQuit) { @@ -548,7 +548,7 @@ void Kanagram::updateButtonHighlighting(const TQPoint &p) haveToUpdate = true; } - if(m_hintRect.tqcontains(p)) + if(m_hintRect.contains(p)) { if(!m_overHint) { @@ -562,7 +562,7 @@ void Kanagram::updateButtonHighlighting(const TQPoint &p) haveToUpdate = true; } - if(m_hintBoxRect.tqcontains(p)) + if(m_hintBoxRect.contains(p)) { if(!m_overHintBox) { @@ -576,7 +576,7 @@ void Kanagram::updateButtonHighlighting(const TQPoint &p) haveToUpdate = true; } - if(m_revealRect.tqcontains(p)) + if(m_revealRect.contains(p)) { if(!m_overReveal) { @@ -590,7 +590,7 @@ void Kanagram::updateButtonHighlighting(const TQPoint &p) haveToUpdate = true; } - if(m_upRect.tqcontains(p)) + if(m_upRect.contains(p)) { if(!m_overUp) { @@ -604,7 +604,7 @@ void Kanagram::updateButtonHighlighting(const TQPoint &p) haveToUpdate = true; } - if(m_switcherRect.tqcontains(p) || m_arrowRect.tqcontains(p)) + if(m_switcherRect.contains(p) || m_arrowRect.contains(p)) { if(!m_overSwitcher) { @@ -618,7 +618,7 @@ void Kanagram::updateButtonHighlighting(const TQPoint &p) haveToUpdate = true; } - if(m_aboutAppRect.tqcontains(p)) + if(m_aboutAppRect.contains(p)) { if(!m_overAboutApp) { @@ -634,7 +634,7 @@ void Kanagram::updateButtonHighlighting(const TQPoint &p) if(!m_showHint) { - if(m_handbookRect.tqcontains(p)) + if(m_handbookRect.contains(p)) { if(!m_overHandbook) { @@ -648,7 +648,7 @@ void Kanagram::updateButtonHighlighting(const TQPoint &p) haveToUpdate = true; } - if(m_aboutKDERect.tqcontains(p)) + if(m_aboutKDERect.contains(p)) { if(!m_overAboutKDE) { diff --git a/kanagram/src/kanagramgame.cpp b/kanagram/src/kanagramgame.cpp index 972c4c19..8cbc9638 100644 --- a/kanagram/src/kanagramgame.cpp +++ b/kanagram/src/kanagramgame.cpp @@ -138,7 +138,7 @@ void KanagramGame::nextAnagram() { m_answeredWords.clear(); } - while(m_answeredWords.tqfindIndex(doc->getEntry(wordNumber)->getOriginal()) != -1) + while(m_answeredWords.findIndex(doc->getEntry(wordNumber)->getOriginal()) != -1) { wordNumber = m_random.getLong(totalWords); } diff --git a/kanagram/src/keduvocdocument.cpp b/kanagram/src/keduvocdocument.cpp index 49f5402c..2563d539 100644 --- a/kanagram/src/keduvocdocument.cpp +++ b/kanagram/src/keduvocdocument.cpp @@ -901,11 +901,11 @@ int KEduVocDocument::search(TQString substr, int id, if (id == 0) { for (int i = first; i < last; i++) { if (word_start) { - if (getEntry(i)->getOriginal().tqfind (substr, 0, false) == 0) // case insensitive + if (getEntry(i)->getOriginal().find (substr, 0, false) == 0) // case insensitive return i; } else { - if (getEntry(i)->getOriginal().tqfind (substr, 0, false) > -1) // case insensitive + if (getEntry(i)->getOriginal().find (substr, 0, false) > -1) // case insensitive return i; } } @@ -913,11 +913,11 @@ int KEduVocDocument::search(TQString substr, int id, else { for (int i = first; i < last; i++) { if (word_start) { - if (getEntry(i)->getTranslation(id).tqfind (substr, 0, false) == 0) // case insensitive + if (getEntry(i)->getTranslation(id).find (substr, 0, false) == 0) // case insensitive return i; } else { - if (getEntry(i)->getTranslation(id).tqfind (substr, 0, false) > -1) // case insensitive + if (getEntry(i)->getTranslation(id).find (substr, 0, false) > -1) // case insensitive return i; } } @@ -995,7 +995,7 @@ KEduVocDocument::FileType KEduVocDocument::detectFT(const TQString &filename) if (c1 == '<' && c2 == '?' && c3 == 'x' && c4 == 'm' && c5 == 'l') return kvtml; - if (line.tqfind (VCB_SEPARATOR) >= 0) + if (line.find (VCB_SEPARATOR) >= 0) return vt_vcb; if (line == LEX_IDENT_50) diff --git a/kanagram/src/keduvocexpression.cpp b/kanagram/src/keduvocexpression.cpp index 0c82897b..8d01c8ba 100644 --- a/kanagram/src/keduvocexpression.cpp +++ b/kanagram/src/keduvocexpression.cpp @@ -55,7 +55,7 @@ KEduVocExpression::KEduVocExpression (TQString &s, TQString separator, int _less lesson = _lesson; if (separator.length() ) { - int pos = s.tqfind(separator); + int pos = s.find(separator); if (pos == -1) { setOriginal(s.stripWhiteSpace()); @@ -67,7 +67,7 @@ KEduVocExpression::KEduVocExpression (TQString &s, TQString separator, int _less // s.stripWhiteSpace(); // gather all translations - while ((pos = s.tqfind(separator)) != -1) { + while ((pos = s.find(separator)) != -1) { se = s.left(pos).stripWhiteSpace(); addTranslation(se, KV_NORM_GRADE, KV_NORM_GRADE); s.remove (0, pos+separator.length() ); diff --git a/kanagram/src/keduvockvtmlreader.cpp b/kanagram/src/keduvockvtmlreader.cpp index 687fdaee..44a4772d 100644 --- a/kanagram/src/keduvockvtmlreader.cpp +++ b/kanagram/src/keduvockvtmlreader.cpp @@ -783,7 +783,7 @@ bool KEduVocKvtmlReader::readExpressionChildAttributes( TQDomElement &domElement if (!domAttrGrade.isNull()) { TQString s = domAttrGrade.value(); - if ((pos = s.tqfind(';')) >= 1) + if ((pos = s.find(';')) >= 1) { grade = s.left(pos).toInt(); rev_grade = s.mid(pos+1, s.length()).toInt(); @@ -798,7 +798,7 @@ bool KEduVocKvtmlReader::readExpressionChildAttributes( TQDomElement &domElement if (!domAttrCount.isNull()) { TQString s = domAttrCount.value(); - if ((pos = s.tqfind(';')) >= 1) + if ((pos = s.find(';')) >= 1) { count = s.left(pos).toInt(); rev_count = s.mid(pos+1, s.length()).toInt(); @@ -813,7 +813,7 @@ bool KEduVocKvtmlReader::readExpressionChildAttributes( TQDomElement &domElement if (!domAttrBad.isNull()) { TQString s = domAttrBad.value(); - if ((pos = s.tqfind(';')) >= 1) + if ((pos = s.find(';')) >= 1) { bcount = s.left(pos).toInt(); rev_bcount = s.mid(pos+1, s.length()).toInt(); @@ -828,7 +828,7 @@ bool KEduVocKvtmlReader::readExpressionChildAttributes( TQDomElement &domElement if (!domAttrDate.isNull()) { TQString s = domAttrDate.value(); - if ((pos = s.tqfind(';')) >= 1) + if ((pos = s.find(';')) >= 1) { date = s.left(pos).toInt(); rev_date = s.mid(pos+1, s.length()).toInt(); @@ -841,7 +841,7 @@ bool KEduVocKvtmlReader::readExpressionChildAttributes( TQDomElement &domElement if (!domAttrDate2.isNull()) { TQString s = domAttrDate2.value(); - if ((pos = s.tqfind(';')) >= 1) + if ((pos = s.find(';')) >= 1) { date = m_doc->decompressDate(s.left(pos)); rev_date = m_doc->decompressDate(s.mid(pos+1, s.length())); @@ -1633,7 +1633,7 @@ bool KEduVocKvtmlReader::readDoc(KEduVocDocument *doc) if (!domAttrGenerator.isNull()) { m_doc->generator = domAttrGenerator.value(); - int pos = m_doc->generator.tqfindRev (KVD_VERS_PREFIX); + int pos = m_doc->generator.findRev (KVD_VERS_PREFIX); if (pos >= 0) { m_doc->doc_version = m_doc->generator; diff --git a/kanagram/src/keduvockvtmlwriter.cpp b/kanagram/src/keduvockvtmlwriter.cpp index 8789c7d6..91f3e81e 100644 --- a/kanagram/src/keduvockvtmlwriter.cpp +++ b/kanagram/src/keduvockvtmlwriter.cpp @@ -781,7 +781,7 @@ bool KEduVocKvtmlWriter::writeDoc(KEduVocDocument *doc, const TQString &generato TQString s; TQString entype = s = (*first).getType(0); - int pos = s.tqfind (TQM_TYPE_DIV); + int pos = s.find (TQM_TYPE_DIV); if (pos >= 0) entype = s.left (pos); else @@ -901,7 +901,7 @@ bool KEduVocKvtmlWriter::writeDoc(KEduVocDocument *doc, const TQString &generato TQString s; TQString entype = s = (*first).getType(0); - int pos = s.tqfind (TQM_TYPE_DIV); + int pos = s.find (TQM_TYPE_DIV); if (pos >= 0) entype = s.left (pos); else diff --git a/kanagram/src/leitnersystem.cpp b/kanagram/src/leitnersystem.cpp index 6a44593b..2ee407e5 100644 --- a/kanagram/src/leitnersystem.cpp +++ b/kanagram/src/leitnersystem.cpp @@ -114,7 +114,7 @@ void LeitnerSystem::deleteBox( LeitnerBox* box ) bool LeitnerSystem::insertBox( const TQString& name, int correctWordBox, int wrongWordBox ) { - if( getBoxNameList().tqcontains( name ) != 0 ) + if( getBoxNameList().contains( name ) != 0 ) return false; LeitnerBox tmpBox; @@ -133,9 +133,9 @@ void LeitnerSystem::setSystemName( const TQString& name ) int LeitnerSystem::getNumber( LeitnerBox* box ) { - if( m_boxes.tqfindIndex( *box ) == -1 ) + if( m_boxes.findIndex( *box ) == -1 ) kdDebug() << "muhaha" << endl; - return m_boxes.tqfindIndex( *box ); + return m_boxes.findIndex( *box ); } bool LeitnerSystem::setBoxName( int box, const TQString& name ) @@ -164,7 +164,7 @@ bool LeitnerSystem::setBoxName( LeitnerBox* box, const TQString& name ) bool LeitnerSystem::insertBox( const TQString& name ) { - if( getBoxNameList().tqcontains( name ) != 0 ) + if( getBoxNameList().contains( name ) != 0 ) return false; LeitnerBox tmpBox; diff --git a/kanagram/src/mainsettings.cpp b/kanagram/src/mainsettings.cpp index 6ca548ee..0275b530 100644 --- a/kanagram/src/mainsettings.cpp +++ b/kanagram/src/mainsettings.cpp @@ -109,7 +109,7 @@ void MainSettings::setupTranslations() temp_languages.remove(".."); for (TQStringList::const_iterator it2 = temp_languages.begin(); it2 != temp_languages.end(); ++it2 ) { - if (!languages.tqcontains(*it2)) languages.append(*it2); + if (!languages.contains(*it2)) languages.append(*it2); } } diff --git a/kanagram/src/vocabedit.cpp b/kanagram/src/vocabedit.cpp index 7457265b..df63da27 100644 --- a/kanagram/src/vocabedit.cpp +++ b/kanagram/src/vocabedit.cpp @@ -94,7 +94,7 @@ void VocabEdit::slotSave() TQString fileName; if(m_fileName == "") { - fileName = KGlobal::dirs()->saveLocation("data", "kanagram/data/" + KanagramSettings::dataLanguage()) + txtVocabName->text().lower().tqreplace(" ", "") + ".kvtml"; + fileName = KGlobal::dirs()->saveLocation("data", "kanagram/data/" + KanagramSettings::dataLanguage()) + txtVocabName->text().lower().replace(" ", "") + ".kvtml"; } else { diff --git a/kanagram/src/vocabeditwidget.ui b/kanagram/src/vocabeditwidget.ui index 8f9d6023..370c7120 100644 --- a/kanagram/src/vocabeditwidget.ui +++ b/kanagram/src/vocabeditwidget.ui @@ -80,7 +80,7 @@ <cstring>txtDescription</cstring> </property> <property name="whatsThis" stdset="0"> - <string>The description of the vocabulary. If you're creating a new vocabulary, add a description so that users of your vocabulary will know what kinds of words it tqcontains.</string> + <string>The description of the vocabulary. If you're creating a new vocabulary, add a description so that users of your vocabulary will know what kinds of words it contains.</string> </property> </widget> <widget class="TQLineEdit" row="0" column="1"> |