summaryrefslogtreecommitdiffstats
path: root/kbabel/commonui/roughtransdlg.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kbabel/commonui/roughtransdlg.cpp')
-rw-r--r--kbabel/commonui/roughtransdlg.cpp92
1 files changed, 46 insertions, 46 deletions
diff --git a/kbabel/commonui/roughtransdlg.cpp b/kbabel/commonui/roughtransdlg.cpp
index 75395630..5c8f76a6 100644
--- a/kbabel/commonui/roughtransdlg.cpp
+++ b/kbabel/commonui/roughtransdlg.cpp
@@ -22,11 +22,11 @@
In addition, as a special exception, the copyright holders give
permission to link the code of this program with any edition of
- the Qt library by Trolltech AS, Norway (or with modified versions
- of Qt that use the same license as Qt), and distribute linked
+ the TQt library by Trolltech AS, Norway (or with modified versions
+ of TQt that use the same license as TQt), and distribute linked
combinations including the two. You must obey the GNU General
Public License in all respects for all of the code used other than
- Qt. If you modify this file, you may extend this exception to
+ TQt. If you modify this file, you may extend this exception to
your version of the file, but you are not obligated to do so. If
you do not wish to do so, delete this exception statement from
your version.
@@ -64,8 +64,8 @@
using namespace KBabel;
RoughTransDlg::RoughTransDlg(KBabelDictBox *dict, Catalog *cat
- , TQWidget *parent,const char *name)
- : KDialogBase(parent,name,true
+ , TQWidget *tqparent,const char *name)
+ : KDialogBase(tqparent,name,true
,i18n("Caption of dialog","Rough Translation")
, User1|User2|User3|Close)
,catalog(cat)
@@ -77,7 +77,7 @@ RoughTransDlg::RoughTransDlg(KBabelDictBox *dict, Catalog *cat
,partTransCounter(0)
,totalTried(0)
{
- setButtonBoxOrientation(Vertical);
+ setButtonBoxQt::OrientationQt::Vertical);
setButtonText(User1,i18n("&Start"));
setButtonText(User2,i18n("S&top"));
setButtonText(User3,i18n("C&ancel"));
@@ -187,9 +187,9 @@ RoughTransDlg::RoughTransDlg(KBabelDictBox *dict, Catalog *cat
progressbar = new KProgress(mw,"progressbar");
progressbar->setTextEnabled(true);
progressbar->setFormat("%v/%m (%p%)");
- TQHBoxLayout* pblayout= new TQHBoxLayout(mainLayout);
- pblayout->add(label);
- pblayout->add(progressbar);
+ TQHBoxLayout* pbtqlayout= new TQHBoxLayout(mainLayout);
+ pbtqlayout->add(label);
+ pbtqlayout->add(progressbar);
transButton->setChecked(config->readBoolEntry("Translated",false));
untransButton->setChecked(config->readBoolEntry("Untranslated",true));
@@ -292,7 +292,7 @@ void RoughTransDlg::translate()
if( catalog->pluralForm(i) == NoPluralForm )
{
TQString origTrans = catalog->msgstr(i).first();
- if(msg.find("_: NAME OF TRANSLATORS\\n")==0)
+ if(msg.tqfind("_: NAME OF TRANSLATORS\\n")==0)
{
TQString authorName;
if( !catalog->identitySettings().authorLocalizedName.isEmpty() )
@@ -302,24 +302,24 @@ void RoughTransDlg::translate()
authorName = catalog->identitySettings().authorName;
else continue; // there is no name to be inserted
- if( !TQStringList::split(',', origTrans).contains(authorName) )
+ if( !TQStringList::split(',', origTrans).tqcontains(authorName) )
{
if(origTrans.isEmpty() ) translation=authorName;
else translation+=origTrans+","+authorName;
}
}
- else if(msg.find("_: EMAIL OF TRANSLATORS\\n")==0)
+ else if(msg.tqfind("_: EMAIL OF TRANSLATORS\\n")==0)
{
// skip, if email is not specified in settings
if( catalog->identitySettings().authorEmail.isEmpty() ) continue;
- if( !TQStringList::split(',', origTrans).contains(catalog->identitySettings().authorEmail) )
+ if( !TQStringList::split(',', origTrans).tqcontains(catalog->identitySettings().authorEmail) )
{
if(origTrans.isEmpty() ) translation=catalog->identitySettings().authorEmail;
else translation=origTrans+","+catalog->identitySettings().authorEmail;
}
}
- else if (msg.find("ROLES_OF_TRANSLATORS") == 0)
+ else if (msg.tqfind("ROLES_OF_TRANSLATORS") == 0)
{
TQString temp = "<othercredit role=\\\"translator\\\">\n<firstname></firstname>"
"<surname></surname>\n<affiliation><address><email>" +
@@ -327,10 +327,10 @@ void RoughTransDlg::translate()
"</affiliation><contrib></contrib></othercredit>";
if (origTrans.isEmpty( ))
translation = temp;
- else if (origTrans.find(catalog->identitySettings( ).authorEmail) < 0)
+ else if (origTrans.tqfind(catalog->identitySettings( ).authorEmail) < 0)
translation = origTrans + "\n" + temp;
}
- else if (msg.find("CREDIT_FOR_TRANSLATORS") == 0)
+ else if (msg.tqfind("CREDIT_FOR_TRANSLATORS") == 0)
{
TQString authorName;
if (!catalog->identitySettings( ).authorLocalizedName.isEmpty( ))
@@ -341,8 +341,8 @@ void RoughTransDlg::translate()
catalog->identitySettings( ).authorEmail + "</email></para>";
if (origTrans.isEmpty( ))
translation = temp;
- else if (origTrans.find(authorName) < 0 &&
- origTrans.find(catalog->identitySettings( ).authorEmail) < 0)
+ else if (origTrans.tqfind(authorName) < 0 &&
+ origTrans.tqfind(catalog->identitySettings( ).authorEmail) < 0)
translation = origTrans + "\n" + temp;
}
}
@@ -350,8 +350,8 @@ void RoughTransDlg::translate()
else // not kdeSpecific
{
// skip KDE specific texts
- if( msg.find("_: EMAIL OF TRANSLATORS\\n")==0 || msg.find("_: NAME OF TRANSLATORS\\n")==0 ||
- msg.find("ROLES_OF_TRANSLATORS")==0 || msg.find("CREDIT_FOR_TRANSLATORS")==0)
+ if( msg.tqfind("_: EMAIL OF TRANSLATORS\\n")==0 || msg.tqfind("_: NAME OF TRANSLATORS\\n")==0 ||
+ msg.tqfind("ROLES_OF_TRANSLATORS")==0 || msg.tqfind("CREDIT_FOR_TRANSLATORS")==0)
continue;
}
@@ -364,9 +364,9 @@ void RoughTransDlg::translate()
totalTried++;
- if(msg.contains(contextReg))
+ if(msg.tqcontains(contextReg))
{
- msg.replace(contextReg,"");
+ msg.tqreplace(contextReg,"");
}
// try exact translation
@@ -442,7 +442,7 @@ void RoughTransDlg::translate()
TQStringList wordList;
TQChar accel;
TQString endingPunctuation;
- int pos = msg.findRev(endPunctReg);
+ int pos = msg.tqfindRev(endPunctReg);
if(pos >= 0)
{
endingPunctuation = msg.right(msg.length()-pos);
@@ -475,18 +475,18 @@ void RoughTransDlg::translate()
}
else if(!word.isEmpty() )
{
- if(!word.contains(digitReg))
+ if(!word.tqcontains(digitReg))
wordList.append(word);
- word=TQString::null;
+ word=TQString();
}
}
else if(!word.isEmpty())
{
- if(!word.contains(digitReg))
+ if(!word.tqcontains(digitReg))
wordList.append(word);
- word=TQString::null;
+ word=TQString();
}
}
@@ -500,37 +500,37 @@ void RoughTransDlg::translate()
{
if(msg[index+1]=='n' && msg[index+2].isSpace())
{
- if(!word.isEmpty() && !word.contains(digitReg))
+ if(!word.isEmpty() && !word.tqcontains(digitReg))
wordList.append(word);
- word=TQString::null;
+ word=TQString();
wordList.append("\\n\n");
index+=2;
}
else if(!word.isEmpty() )
{
- if(!word.contains(digitReg))
+ if(!word.tqcontains(digitReg))
wordList.append(word);
- word=TQString::null;
+ word=TQString();
}
}
else if(!word.isEmpty())
{
- if(!word.contains(digitReg))
+ if(!word.tqcontains(digitReg))
wordList.append(word);
- word=TQString::null;
+ word=TQString();
}
}
else if(!word.isEmpty())
{
- if(!word.contains(digitReg)) {
+ if(!word.tqcontains(digitReg)) {
wordList.append(word);
}
- word=TQString::null;
+ word=TQString();
}
}
@@ -571,7 +571,7 @@ void RoughTransDlg::translate()
}
if(wordCounter==0)
- translation=TQString::null;
+ translation=TQString();
++dit;
}
@@ -582,7 +582,7 @@ void RoughTransDlg::translate()
// try to set the correct keyboard accelerator
if(!accel.isNull())
{
- int index = translation.find(accel,0,false);
+ int index = translation.tqfind(accel,0,false);
if(index >= 0)
{
translation.insert(index,accelMarker);
@@ -673,13 +673,13 @@ void RoughTransDlg::showStatistics()
"Exact translations: %2 (%3%)\n"
"Approximate translations: %4 (%5%)\n"
"Nothing found: %6 (%7%)")
- .arg( locale->formatNumber(totalTried,0) )
- .arg( locale->formatNumber(exactTransCounter,0) )
- .arg( locale->formatNumber( ((double)(10000*exactTransCounter/QMAX(totalTried,1)))/100) )
- .arg( locale->formatNumber(partTransCounter,0) )
- .arg( locale->formatNumber(((double)(10000*partTransCounter/QMAX(totalTried,1)))/100) )
- .arg( locale->formatNumber(nothing,0) )
- .arg( locale->formatNumber(((double)(10000*nothing/QMAX(totalTried,1)))/100) );
+ .tqarg( locale->formatNumber(totalTried,0) )
+ .tqarg( locale->formatNumber(exactTransCounter,0) )
+ .tqarg( locale->formatNumber( ((double)(10000*exactTransCounter/TQMAX(totalTried,1)))/100) )
+ .tqarg( locale->formatNumber(partTransCounter,0) )
+ .tqarg( locale->formatNumber(((double)(10000*partTransCounter/TQMAX(totalTried,1)))/100) )
+ .tqarg( locale->formatNumber(nothing,0) )
+ .tqarg( locale->formatNumber(((double)(10000*nothing/TQMAX(totalTried,1)))/100) );
KMessageBox::information(this, statMsg
, i18n("Rough Translation Statistics"));
@@ -717,7 +717,7 @@ void RoughTransDlg::msgButtonClicked(int id)
if(!transButton->isChecked() && !untransButton->isChecked()
&& !fuzzyButton->isChecked())
{
- TQButton *button = whatBox->find(id);
+ TQButton *button = whatBox->tqfind(id);
if(button == transButton)
{
transButton->setChecked(true);
@@ -748,7 +748,7 @@ void RoughTransDlg::fuzzyButtonToggled(bool on)
"check the results carefully. Deactivate this option only if "
"you know what you are doing.</p></qt>");
- KMessageBox::information(this, msg, TQString::null,"MarkFuzzyWarningInRoughTransDlg");
+ KMessageBox::information(this, msg, TQString(),"MarkFuzzyWarningInRoughTransDlg");
}
}