From b6edfe41c9395f2e20784cbf0e630af6426950a3 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 10 Aug 2011 06:08:18 +0000 Subject: rename the following methods: tqfind find tqreplace replace tqcontains contains git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- lib/kotext/KoAutoFormatDia.cpp | 122 ++++++++++++++++++++--------------------- 1 file changed, 61 insertions(+), 61 deletions(-) (limited to 'lib/kotext/KoAutoFormatDia.cpp') diff --git a/lib/kotext/KoAutoFormatDia.cpp b/lib/kotext/KoAutoFormatDia.cpp index 6a602c92..90b1a97d 100644 --- a/lib/kotext/KoAutoFormatDia.cpp +++ b/lib/kotext/KoAutoFormatDia.cpp @@ -114,7 +114,7 @@ void KoAutoFormatExceptionWidget::slotAddException() { if(text.at(text.length()-1)!='.' && m_bAbbreviation) text=text+"."; - if( m_listException.tqfindIndex( text )==-1) + if( m_listException.findIndex( text )==-1) { m_listException<setChecked( state ); pbDoubleQuote1->setText( oDoubleBegin ); pbDoubleQuote2->setText(oDoubleEnd ); slotChangeStateDouble(state); - state=m_autoFormat.getConfigTypographicSimpleQuotes().tqreplace; + state=m_autoFormat.getConfigTypographicSimpleQuotes().replace; cbTypographicSimpleQuotes->setChecked( state ); pbSimpleQuote1->setText( oSimpleBegin ); pbSimpleQuote2->setText(oSimpleEnd ); @@ -510,7 +510,7 @@ void KoAutoFormatDia::setupTab3() tmp =dir.entryList (TQDir::Files); for ( TQStringList::Iterator it = tmp.begin(); it != tmp.end(); ++it ) { - if ( !(*it).tqcontains("autocorrect")) + if ( !(*it).contains("autocorrect")) { TQString readableName = KGlobal::locale()->twoAlphaToCountryName((*it).left((*it).length()-4)); TQString tmp; @@ -542,14 +542,14 @@ void KoAutoFormatDia::setupTab3() lblFind = new TQLabel( i18n( "&Find:" ), tab3 ); grid->addWidget( lblFind, 3, 0 ); - m_tqfind = new KoAutoFormatLineEdit( tab3 ); - grid->addWidget( m_tqfind, 3, 1 ); + m_find = new KoAutoFormatLineEdit( tab3 ); + grid->addWidget( m_find, 3, 1 ); - lblFind->setBuddy( m_tqfind ); + lblFind->setBuddy( m_find ); - connect( m_tqfind, TQT_SIGNAL( textChanged( const TQString & ) ), - TQT_SLOT( slottqfind( const TQString & ) ) ); - connect( m_tqfind, TQT_SIGNAL( keyReturnPressed() ), + connect( m_find, TQT_SIGNAL( textChanged( const TQString & ) ), + TQT_SLOT( slotfind( const TQString & ) ) ); + connect( m_find, TQT_SIGNAL( keyReturnPressed() ), TQT_SLOT( slotAddEntry())); pbSpecialChar1 = new TQPushButton( "...", tab3 ); @@ -562,14 +562,14 @@ void KoAutoFormatDia::setupTab3() lblReplace = new TQLabel( i18n( "&Replace:" ), tab3 ); grid->addWidget( lblReplace, 3, 3 ); - m_tqreplace = new KoAutoFormatLineEdit( tab3 ); - grid->addWidget( m_tqreplace, 3, 4 ); + m_replace = new KoAutoFormatLineEdit( tab3 ); + grid->addWidget( m_replace, 3, 4 ); - lblReplace->setBuddy( m_tqreplace ); + lblReplace->setBuddy( m_replace ); - connect( m_tqreplace, TQT_SIGNAL( textChanged( const TQString & ) ), - TQT_SLOT( slottqfind2( const TQString & ) ) ); - connect( m_tqreplace, TQT_SIGNAL( keyReturnPressed() ), + connect( m_replace, TQT_SIGNAL( textChanged( const TQString & ) ), + TQT_SLOT( slotfind2( const TQString & ) ) ); + connect( m_replace, TQT_SIGNAL( keyReturnPressed() ), TQT_SLOT( slotAddEntry())); pbSpecialChar2 = new TQPushButton( "...", tab3 ); @@ -655,7 +655,7 @@ void KoAutoFormatDia::initTab3() TQDictIterator it( m_docAutoFormat->getAutoFormatEntries()); for( ; it.current(); ++it ) { - ( void )new TQListViewItem( m_pListView, it.currentKey(), it.current()->tqreplace() ); + ( void )new TQListViewItem( m_pListView, it.currentKey(), it.current()->replace() ); } } @@ -665,12 +665,12 @@ void KoAutoFormatDia::slotChangeAdvancedAutoCorrection() cbAutoCorrectionWithFormat->setEnabled( state ); pbSpecialChar2->setEnabled( state ); pbSpecialChar1->setEnabled( state ); - m_tqreplace->setEnabled( state); - m_tqfind->setEnabled( state); + m_replace->setEnabled( state); + m_find->setEnabled( state); m_pListView->setEnabled( state); - state = state && !m_tqreplace->text().isEmpty() && !m_tqfind->text().isEmpty(); - KoAutoFormatEntry * entry=m_docAutoFormat->findFormatEntry(m_tqfind->text()); + state = state && !m_replace->text().isEmpty() && !m_find->text().isEmpty(); + KoAutoFormatEntry * entry=m_docAutoFormat->findFormatEntry(m_find->text()); pbRemove->setEnabled(state && entry); pbChangeFormat->setEnabled(state && entry); pbClearFormat->setEnabled(state && entry); @@ -684,7 +684,7 @@ void KoAutoFormatDia::changeAutoformatLanguage(const TQString & text) m_docAutoFormat->configAutoFormatLanguage( TQString()); else { - m_docAutoFormat->configAutoFormatLanguage( exceptionLanguageName.tqfind(text).data()); + m_docAutoFormat->configAutoFormatLanguage( exceptionLanguageName.find(text).data()); } if ( !noSignal ) { @@ -765,10 +765,10 @@ void KoAutoFormatDia::slotChangeTextFormatEntry() KoAutoFormatEntry *entry = 0L; if ( addNewEntry ) { - if ( m_tqreplace->text().isEmpty() ) + if ( m_replace->text().isEmpty() ) return; if ( !newEntry ) - newEntry = new KoAutoFormatEntry( m_tqreplace->text()); + newEntry = new KoAutoFormatEntry( m_replace->text()); entry =newEntry; } else @@ -813,28 +813,28 @@ void KoAutoFormatDia::slotRemoveEntry() } -void KoAutoFormatDia::slottqfind( const TQString & ) +void KoAutoFormatDia::slotfind( const TQString & ) { - KoAutoFormatEntry *entry = m_docAutoFormat->findFormatEntry(m_tqfind->text()); + KoAutoFormatEntry *entry = m_docAutoFormat->findFormatEntry(m_find->text()); if ( entry ) { - m_tqreplace->setText(entry->tqreplace().latin1()); + m_replace->setText(entry->replace().latin1()); pbAdd->setText(i18n("&Modify")); - m_pListView->setCurrentItem(m_pListView->tqfindItem(m_tqfind->text(),0)); + m_pListView->setCurrentItem(m_pListView->findItem(m_find->text(),0)); } else { - m_tqreplace->clear(); + m_replace->clear(); pbAdd->setText(i18n("&Add")); m_pListView->setCurrentItem(0L); } - slottqfind2(""); + slotfind2(""); } -void KoAutoFormatDia::slottqfind2( const TQString & ) +void KoAutoFormatDia::slotfind2( const TQString & ) { - bool state = !m_tqreplace->text().isEmpty() && !m_tqfind->text().isEmpty(); - KoAutoFormatEntry * entry=m_docAutoFormat->findFormatEntry(m_tqfind->text()); + bool state = !m_replace->text().isEmpty() && !m_find->text().isEmpty(); + KoAutoFormatEntry * entry=m_docAutoFormat->findFormatEntry(m_find->text()); pbRemove->setEnabled(state && entry); if ( state && entry ) { @@ -853,10 +853,10 @@ void KoAutoFormatDia::refreshEntryList() TQDictIterator it( m_docAutoFormat->getAutoFormatEntries()); for( ; it.current(); ++it ) { - ( void )new TQListViewItem( m_pListView, it.currentKey(), it.current()->tqreplace() ); + ( void )new TQListViewItem( m_pListView, it.currentKey(), it.current()->replace() ); } m_pListView->setCurrentItem(m_pListView->firstChild ()); - bool state = !(m_tqreplace->text().isEmpty()) && !(m_tqfind->text().isEmpty()); + bool state = !(m_replace->text().isEmpty()) && !(m_find->text().isEmpty()); //we can delete item, as we search now in listbox and not in m_find lineedit pbRemove->setEnabled(m_pListView->currentItem() && m_pListView->selectedItem()!=0 ); pbChangeFormat->setEnabled(state && m_pListView->currentItem() && m_pListView->selectedItem()!=0 ); @@ -886,14 +886,14 @@ void KoAutoFormatDia::slotAddEntry() { if(!pbAdd->isEnabled()) return; - TQString repl = m_tqreplace->text(); - TQString tqfind = m_tqfind->text(); - if(repl.isEmpty() || tqfind.isEmpty()) + TQString repl = m_replace->text(); + TQString find = m_find->text(); + if(repl.isEmpty() || find.isEmpty()) { KMessageBox::sorry( 0L, i18n( "An area is empty" ) ); return; } - if(repl==tqfind) + if(repl==find) { KMessageBox::sorry( 0L, i18n( "Find string is the same as replace string!" ) ); return; @@ -904,18 +904,18 @@ void KoAutoFormatDia::slotAddEntry() { if ( newEntry ) { - newEntry->changeReplace( m_tqreplace->text()); - addEntryList(tqfind, newEntry); + newEntry->changeReplace( m_replace->text()); + addEntryList(find, newEntry); delete tmp; newEntry = 0L; } else - addEntryList(tqfind, tmp); + addEntryList(find, tmp); } else - editEntryList(tqfind, tqfind, tmp); - m_tqreplace->clear(); - m_tqfind->clear(); + editEntryList(find, find, tmp); + m_replace->clear(); + m_find->clear(); refreshEntryList(); autocorrectionEntryChanged= true; @@ -926,15 +926,15 @@ void KoAutoFormatDia::chooseSpecialChar1() { TQString f = font().family(); TQChar c = ' '; - bool const focus = m_tqfind->hasFocus(); + bool const focus = m_find->hasFocus(); if ( KoCharSelectDia::selectChar( f, c, false ) ) { - int const cursorpos = m_tqfind->cursorPosition(); + int const cursorpos = m_find->cursorPosition(); if (focus) - m_tqfind->setText( m_tqfind->text().insert( cursorpos, c ) ); + m_find->setText( m_find->text().insert( cursorpos, c ) ); else - m_tqfind->setText( m_tqfind->text().append(c) ); - m_tqfind->setCursorPosition( cursorpos+1 ); + m_find->setText( m_find->text().append(c) ); + m_find->setCursorPosition( cursorpos+1 ); } } @@ -943,15 +943,15 @@ void KoAutoFormatDia::chooseSpecialChar2() { TQString f = font().family(); TQChar c = ' '; - bool const focus = m_tqreplace->hasFocus(); + bool const focus = m_replace->hasFocus(); if ( KoCharSelectDia::selectChar( f, c, false ) ) { - int const cursorpos = m_tqreplace->cursorPosition(); + int const cursorpos = m_replace->cursorPosition(); if (focus) - m_tqreplace->setText( m_tqreplace->text().insert(m_tqreplace->cursorPosition(), c ) ); + m_replace->setText( m_replace->text().insert(m_replace->cursorPosition(), c ) ); else - m_tqreplace->setText( m_tqreplace->text().append(c) ); - m_tqreplace->setCursorPosition( cursorpos+1 ); + m_replace->setText( m_replace->text().append(c) ); + m_replace->setCursorPosition( cursorpos+1 ); } } @@ -969,9 +969,9 @@ void KoAutoFormatDia::slotEditEntry() return; delete newEntry; newEntry=0L; - m_tqfind->setText(m_pListView->currentItem()->text(0)); - m_tqreplace->setText(m_pListView->currentItem()->text(1)); - bool state = !m_tqreplace->text().isEmpty() && !m_tqfind->text().isEmpty(); + m_find->setText(m_pListView->currentItem()->text(0)); + m_replace->setText(m_pListView->currentItem()->text(1)); + bool state = !m_replace->text().isEmpty() && !m_find->text().isEmpty(); pbRemove->setEnabled(state); pbChangeFormat->setEnabled( state ); pbClearFormat->setEnabled(state); @@ -983,13 +983,13 @@ bool KoAutoFormatDia::applyConfig() { // First tab KoAutoFormat::TypographicQuotes tq = m_autoFormat.getConfigTypographicSimpleQuotes(); - tq.tqreplace = cbTypographicSimpleQuotes->isChecked(); + tq.replace = cbTypographicSimpleQuotes->isChecked(); tq.begin = pbSimpleQuote1->text()[ 0 ]; tq.end = pbSimpleQuote2->text()[ 0 ]; m_docAutoFormat->configTypographicSimpleQuotes( tq ); tq = m_autoFormat.getConfigTypographicDoubleQuotes(); - tq.tqreplace = cbTypographicDoubleQuotes->isChecked(); + tq.replace = cbTypographicDoubleQuotes->isChecked(); tq.begin = pbDoubleQuote1->text()[ 0 ]; tq.end = pbDoubleQuote2->text()[ 0 ]; m_docAutoFormat->configTypographicDoubleQuotes( tq ); @@ -1024,7 +1024,7 @@ bool KoAutoFormatDia::applyConfig() m_docAutoFormat->configIncludeTwoUpperUpperLetterException( twoUpperLetter->autoInclude()); m_docAutoFormat->configIncludeAbbreviation( abbreviation->autoInclude()); - TQString lang = exceptionLanguageName.tqfind(autoFormatLanguage->currentText()).data(); + TQString lang = exceptionLanguageName.find(autoFormatLanguage->currentText()).data(); if ( lang == i18n("Default") ) m_docAutoFormat->configAutoFormatLanguage(TQString()); else -- cgit v1.2.1