summaryrefslogtreecommitdiffstats
path: root/tqtinterface/qt4/tools/linguist/linguist/trwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tqtinterface/qt4/tools/linguist/linguist/trwindow.cpp')
-rw-r--r--tqtinterface/qt4/tools/linguist/linguist/trwindow.cpp102
1 files changed, 51 insertions, 51 deletions
diff --git a/tqtinterface/qt4/tools/linguist/linguist/trwindow.cpp b/tqtinterface/qt4/tools/linguist/linguist/trwindow.cpp
index 8ebc932..564845f 100644
--- a/tqtinterface/qt4/tools/linguist/linguist/trwindow.cpp
+++ b/tqtinterface/qt4/tools/linguist/linguist/trwindow.cpp
@@ -290,12 +290,12 @@ TrWindow::TrWindow()
phraseBooks.setAutoDelete( TRUE );
- f = new FindDialog( FALSE, this, "tqfind", FALSE );
+ f = new FindDialog( FALSE, this, "find", FALSE );
f->setCaption( tqtr("TQt Linguist") );
- h = new FindDialog( TRUE, this, "tqreplace", FALSE );
+ h = new FindDialog( TRUE, this, "replace", FALSE );
h->setCaption( tqtr("TQt Linguist") );
- tqfindMatchCase = FALSE;
- tqfindWhere = 0;
+ findMatchCase = FALSE;
+ findWhere = 0;
foundItem = 0;
foundScope = 0;
foundWhere = 0;
@@ -320,8 +320,8 @@ TrWindow::TrWindow()
connect( me, TQT_SIGNAL(nextUnfinished()), this, TQT_SLOT(nextUnfinished()) );
connect( me, TQT_SIGNAL(focusSourceList()), this, TQT_SLOT(focusSourceList()) );
connect( me, TQT_SIGNAL(focusPhraseList()), this, TQT_SLOT(focusPhraseList()) );
- connect( f, TQT_SIGNAL(tqfindNext(const TQString&, int, bool)),
- this, TQT_SLOT(tqfindNext(const TQString&, int, bool)) );
+ connect( f, TQT_SIGNAL(findNext(const TQString&, int, bool)),
+ this, TQT_SLOT(findNext(const TQString&, int, bool)) );
TQWhatsThis::add( lv, tqtr("This panel lists the source contexts.") );
@@ -378,7 +378,7 @@ void TrWindow::openFile( const TQString& name )
srcCharsSpc = 0;
for ( it = all.begin(); it != all.end(); ++it ) {
tqApp->processEvents();
- ContextLVI *c = contexts.tqfind( TQString((*it).context()) );
+ ContextLVI *c = contexts.find( TQString((*it).context()) );
if ( c == 0 ) {
c = new ContextLVI( lv, tor.toUnicode((*it).context(),
(*it).utf8()) );
@@ -434,10 +434,10 @@ void TrWindow::openFile( const TQString& name )
foundWhere = 0;
foundOffset = 0;
if ( lv->childCount() > 0 ) {
- tqfindAct->setEnabled( TRUE );
- tqfindAgainAct->setEnabled( FALSE );
+ findAct->setEnabled( TRUE );
+ findAgainAct->setEnabled( FALSE );
#ifdef notyet
- tqreplaceAct->setEnabled( TRUE );
+ replaceAct->setEnabled( TRUE );
#endif
lv->setCurrentItem( lv->firstChild() );
}
@@ -493,7 +493,7 @@ void TrWindow::saveAs()
void TrWindow::release()
{
TQString newFilename = filename;
- newFilename.tqreplace( TQRegExp(".ts$"), "" );
+ newFilename.replace( TQRegExp(".ts$"), "" );
newFilename += TQString( ".qm" );
newFilename = TQFileDialog::getSaveFileName( newFilename,
@@ -580,7 +580,7 @@ void TrWindow::print()
}
}
-void TrWindow::tqfind()
+void TrWindow::find()
{
h->hide();
f->show();
@@ -588,7 +588,7 @@ void TrWindow::tqfind()
f->raise();
}
-void TrWindow::tqfindAgain()
+void TrWindow::findAgain()
{
int pass = 0;
int oldItemNo = itemToIndex( slv, slv->currentItem() );
@@ -685,13 +685,13 @@ void TrWindow::tqfindAgain()
slv->triggerUpdate();
tqApp->beep();
TQMessageBox::warning( this, tqtr("TQt Linguist"),
- TQString( tqtr("Cannot tqfind the string '%1'.") ).arg(tqfindText) );
+ TQString( tqtr("Cannot find the string '%1'.") ).arg(findText) );
foundItem = 0;
foundWhere = 0;
foundOffset = 0;
}
-void TrWindow::tqreplace()
+void TrWindow::replace()
{
f->hide();
h->show();
@@ -729,8 +729,8 @@ TQListViewItem * TrWindow::indexToItem( TQListView * view, int index )
bool TrWindow::searchItem( const TQString & searchWhat, TQListViewItem * j,
TQListViewItem * k )
{
- if ( (tqfindWhere & foundWhere) != 0 ) {
- foundOffset = searchWhat.tqfind( tqfindText, foundOffset, tqfindMatchCase );
+ if ( (findWhere & foundWhere) != 0 ) {
+ foundOffset = searchWhat.find( findText, foundOffset, findMatchCase );
if ( foundOffset >= 0 ) {
foundItem = itemToIndex( slv, k );
foundScope = j;
@@ -776,7 +776,7 @@ void TrWindow::openPhraseBook()
"All files (*)"),
this, "open_phrasebook",
tqtr("Open Phrase Book") );
- if ( !name.isEmpty() && !phraseBookNames.tqcontains(name) ) {
+ if ( !name.isEmpty() && !phraseBookNames.contains(name) ) {
if ( openPhraseBook(name) ) {
int n = (int)(phraseBooks.at( phraseBooks.count() - 1 )->count());
statusBar()->message( tqtr("%1 phrase(s) loaded.").arg(n),
@@ -958,7 +958,7 @@ void TrWindow::showNewScope( TQListViewItem *item )
// Make sure that we update the source text and translation text. Use the first message in the new scope.
setCurrentMessageItem(slv->firstChild());
- // This must be explicitly called since the signal is not emitted if the context only tqcontains one item
+ // This must be explicitly called since the signal is not emitted if the context only contains one item
showNewCurrent(slv->firstChild());
slv->viewport()->setUpdatesEnabled( upe );
slv->setUpdatesEnabled( upe );
@@ -1342,15 +1342,15 @@ void TrWindow::next()
}
-void TrWindow::tqfindNext( const TQString& text, int where, bool matchCase )
+void TrWindow::findNext( const TQString& text, int where, bool matchCase )
{
- tqfindText = text;
- if ( tqfindText.isEmpty() )
- tqfindText = TQString( "magicwordthatyoushouldavoid" );
- tqfindWhere = where;
- tqfindMatchCase = matchCase;
- tqfindAgainAct->setEnabled( TRUE );
- tqfindAgain();
+ findText = text;
+ if ( findText.isEmpty() )
+ findText = TQString( "magicwordthatyoushouldavoid" );
+ findWhere = where;
+ findMatchCase = matchCase;
+ findAgainAct->setEnabled( TRUE );
+ findAgain();
}
void TrWindow::revalidate()
@@ -1384,8 +1384,8 @@ void TrWindow::revalidate()
TQString TrWindow::friendlyString( const TQString& str )
{
TQString f = str.lower();
- f.tqreplace( TQRegExp(TQString("[.,:;!?()-]")), TQString(" ") );
- f.tqreplace( "&", TQString("") );
+ f.replace( TQRegExp(TQString("[.,:;!?()-]")), TQString(" ") );
+ f.replace( "&", TQString("") );
f = f.simplifyWhiteSpace();
f = f.lower();
return f;
@@ -1478,16 +1478,16 @@ void TrWindow::setupMenuBar()
TQString(), TQAccel::stringToKey(tqtr("Ctrl+A")) );
selectAllAct->setEnabled( FALSE );
editp->insertSeparator();
- tqfindAct = new Action( editp, tqtr("&Find..."), TQT_TQOBJECT(this), TQT_SLOT(tqfind()),
+ findAct = new Action( editp, tqtr("&Find..."), TQT_TQOBJECT(this), TQT_SLOT(find()),
"searchfind.png", TQAccel::stringToKey(tqtr("Ctrl+F")) );
- tqfindAct->setEnabled( FALSE );
- tqfindAgainAct = new Action( editp, tqtr("Find &Next"),
- TQT_TQOBJECT(this), TQT_SLOT(tqfindAgain()), TQString(), Qt::Key_F3 );
- tqfindAgainAct->setEnabled( FALSE );
+ findAct->setEnabled( FALSE );
+ findAgainAct = new Action( editp, tqtr("Find &Next"),
+ TQT_TQOBJECT(this), TQT_SLOT(findAgain()), TQString(), Qt::Key_F3 );
+ findAgainAct->setEnabled( FALSE );
#ifdef notyet
- tqreplaceAct = new Action( editp, tqtr("&Replace..."), TQT_TQOBJECT(this), TQT_SLOT(tqreplace()),
+ replaceAct = new Action( editp, tqtr("&Replace..."), TQT_TQOBJECT(this), TQT_SLOT(replace()),
TQAccel::stringToKey(tqtr("Ctrl+H")) );
- tqreplaceAct->setEnabled( FALSE );
+ replaceAct->setEnabled( FALSE );
#endif
// Translation menu
@@ -1591,12 +1591,12 @@ void TrWindow::setupMenuBar()
pasteAct->setWhatsThis( tqtr("Paste the clipboard text into the"
" translation.") );
selectAllAct->setWhatsThis( tqtr("Select the whole translation text.") );
- tqfindAct->setWhatsThis( tqtr("Search for some text in the translation "
+ findAct->setWhatsThis( tqtr("Search for some text in the translation "
"source file.") );
- tqfindAgainAct->setWhatsThis( tqtr("Continue the search where it was left.") );
+ findAgainAct->setWhatsThis( tqtr("Continue the search where it was left.") );
#ifdef notyet
- tqreplaceAct->setWhatsThis( tqtr("Search for some text in the translation"
- " source file and tqreplace it by another"
+ replaceAct->setWhatsThis( tqtr("Search for some text in the translation"
+ " source file and replace it by another"
" text.") );
#endif
@@ -1654,13 +1654,13 @@ void TrWindow::setupToolBars()
copyAct->addToToolbar( editt, tqtr("Copy") );
pasteAct->addToToolbar( editt, tqtr("Paste") );
editt->addSeparator();
- tqfindAct->addToToolbar( editt, tqtr("Find") );
+ findAct->addToToolbar( editt, tqtr("Find") );
#ifdef notyet
- tqreplaceAct->addToToolbar( editt, tqtr("Replace") );
+ replaceAct->addToToolbar( editt, tqtr("Replace") );
#endif
// beginFromSourceAct->addToToolbar( translationst,
- // tqtr("Begin from Source"), "searchtqfind" );
+ // tqtr("Begin from Source"), "searchfind" );
prevAct->addToToolbar( translationst, tqtr("Prev") );
nextAct->addToToolbar( translationst, tqtr("Next") );
prevUnfinishedAct->addToToolbar( translationst, tqtr("Prev Unfinished") );
@@ -1718,7 +1718,7 @@ bool TrWindow::openPhraseBook( const TQString& name )
bool TrWindow::savePhraseBook( TQString& name, const PhraseBook& pb )
{
- if ( !name.tqcontains( ".qph" ) && !name.tqcontains(".") )
+ if ( !name.contains( ".qph" ) && !name.contains(".") )
name += ".qph";
if ( !pb.save(name) ) {
@@ -1754,7 +1754,7 @@ void TrWindow::updatePhraseDict()
TQString f = friendlyString( (*p).source() );
if ( f.length() > 0 ) {
f = TQStringList::split( TQChar(' '), f ).first();
- ent = phraseDict.tqfind( f );
+ ent = phraseDict.find( f );
if ( ent == 0 ) {
ent = new PhraseBook;
phraseDict.insert( f, ent );
@@ -1776,10 +1776,10 @@ PhraseBook TrWindow::getPhrases( const TQString& source )
PhraseBook::Iterator p;
for ( w = lookupWords.begin(); w != lookupWords.end(); ++w ) {
- PhraseBook *ent = phraseDict.tqfind( *w );
+ PhraseBook *ent = phraseDict.find( *w );
if ( ent != 0 ) {
for ( p = ent->begin(); p != ent->end(); ++p ) {
- if ( f.tqfind(friendlyString((*p).source())) >= 0 )
+ if ( f.find(friendlyString((*p).source())) >= 0 )
phrases.append( *p );
}
}
@@ -1822,11 +1822,11 @@ bool TrWindow::danger( const TQString& source, const TQString& translation,
PhraseBook::Iterator p;
for ( w = lookupWords.begin(); w != lookupWords.end(); ++w ) {
- PhraseBook *ent = phraseDict.tqfind( *w );
+ PhraseBook *ent = phraseDict.find( *w );
if ( ent != 0 ) {
for ( p = ent->begin(); p != ent->end(); ++p ) {
- if ( fsource.tqfind(friendlyString((*p).source())) < 0 ||
- ftranslation.tqfind(friendlyString((*p).target())) >= 0 )
+ if ( fsource.find(friendlyString((*p).source())) < 0 ||
+ ftranslation.find(friendlyString((*p).target())) >= 0 )
break;
}
if ( p == ent->end() ) {
@@ -1977,7 +1977,7 @@ void TrWindow::recentFileActivated( int id )
void TrWindow::addRecentlyOpenedFile( const TQString &fn, TQStringList &lst )
{
- if ( lst.tqfind( fn ) != lst.end() )
+ if ( lst.find( fn ) != lst.end() )
return;
if ( lst.count() >= 10 )
lst.remove( lst.begin() );