summaryrefslogtreecommitdiffstats
path: root/kbabel/kbabel/kbabelview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kbabel/kbabel/kbabelview.cpp')
-rw-r--r--kbabel/kbabel/kbabelview.cpp258
1 files changed, 129 insertions, 129 deletions
diff --git a/kbabel/kbabel/kbabelview.cpp b/kbabel/kbabel/kbabelview.cpp
index ca41a7ad..0e685f0c 100644
--- a/kbabel/kbabel/kbabelview.cpp
+++ b/kbabel/kbabel/kbabelview.cpp
@@ -21,11 +21,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.
@@ -115,11 +115,11 @@ using namespace KBabel;
TQPtrList<KBabelView> *KBabelView::viewList = 0;
-KBabelView::KBabelView(KBCatalog* catalog,KBabelMW *parent, Project::Ptr project)
- : TQWidget(parent)
+KBabelView::KBabelView(KBCatalog* catalog,KBabelMW *tqparent, Project::Ptr project)
+ : TQWidget(tqparent)
, _redirectedBackSearch (false)
, _project (project)
- , m_mainwindow (parent)
+ , m_mainwindow (tqparent)
, m_sourceview (0)
{
if(!viewList)
@@ -307,7 +307,7 @@ void KBabelView::initDockWidgets()
TQWidget *tempWidget=new TQWidget(this,"msgidWidget");
tempWidget->setMinimumSize(350,150);
- TQVBoxLayout *layout=new TQVBoxLayout(tempWidget);
+ TQVBoxLayout *tqlayout=new TQVBoxLayout(tempWidget);
msgidLabel = new HidingMsgEdit(2, this, 0, tempWidget,"msgidLabel");
msgidLabel->installEventFilter(this);
@@ -328,16 +328,16 @@ void KBabelView::initDockWidgets()
"and the behavior of KBabel and to Stephan Kulow, who always\n"
"lends me a helping hand.\n\n"
"Many good ideas, especially for the Catalog Manager, are taken\n"
-"from KTranslator by Andrea Rizzi.").arg(VERSION).arg(2006));
+"from KTranslator by Andrea Rizzi.").tqarg(VERSION).tqarg(2006));
TQLabel *label=new TQLabel(msgidLabel,i18n("O&riginal string (msgid):"),tempWidget);
- TQHBoxLayout* hb=new TQHBoxLayout(layout);
+ TQHBoxLayout* hb=new TQHBoxLayout(tqlayout);
hb->addSpacing(KDialog::marginHint());
hb->addWidget(label);
- layout->addWidget(msgidLabel);
- layout->setStretchFactor(msgidLabel,1);
+ tqlayout->addWidget(msgidLabel);
+ tqlayout->setStretchFactor(msgidLabel,1);
TQWhatsThis::add(tempWidget,
i18n("<qt><p><b>Original String</b></p>\n\
@@ -382,7 +382,7 @@ of the currently displayed entry.</p></qt>"));
tempWidget=new TQWidget(this,"msgstrWidget");
tempWidget->setMinimumSize(350,150);
- layout=new TQVBoxLayout(tempWidget);
+ tqlayout=new TQVBoxLayout(tempWidget);
// if undefined number of plural forms, use 1
int pf = _catalog->defaultNumberOfPluralForms();
@@ -395,7 +395,7 @@ of the currently displayed entry.</p></qt>"));
label=new TQLabel(msgstrEdit,i18n("Trans&lated string (msgstr):"),tempWidget);
- hb=new TQHBoxLayout(layout);
+ hb=new TQHBoxLayout(tqlayout);
hb->setSpacing(KDialog::spacingHint());
hb->addSpacing(KDialog::marginHint());
@@ -404,7 +404,7 @@ of the currently displayed entry.</p></qt>"));
if(! KBabelSettings::ledInStatusbar())
{
- _fuzzyLed = new KLed(Qt::red,KLed::Off,KLed::Sunken,KLed::Rectangular
+ _fuzzyLed = new KLed(TQt::red,KLed::Off,KLed::Sunken,KLed::Rectangular
,tempWidget);
_fuzzyLed->setFixedSize(15,12);
label = new TQLabel(i18n("fuzzy"),tempWidget);
@@ -413,7 +413,7 @@ of the currently displayed entry.</p></qt>"));
hb->addSpacing(KDialog::spacingHint());
- _untransLed = new KLed(Qt::red,KLed::Off,KLed::Sunken,KLed::Rectangular
+ _untransLed = new KLed(TQt::red,KLed::Off,KLed::Sunken,KLed::Rectangular
,tempWidget);
_untransLed->setFixedSize(15,12);
label = new TQLabel(i18n("untranslated"),tempWidget);
@@ -422,7 +422,7 @@ of the currently displayed entry.</p></qt>"));
hb->addSpacing(KDialog::marginHint());
- _errorLed = new KLed(Qt::red,KLed::Off,KLed::Sunken,KLed::Rectangular
+ _errorLed = new KLed(TQt::red,KLed::Off,KLed::Sunken,KLed::Rectangular
,tempWidget);
_errorLed->setFixedSize(15,12);
label = new TQLabel(i18n("faulty"),tempWidget);
@@ -434,7 +434,7 @@ of the currently displayed entry.</p></qt>"));
hb->addStretch(1);
// ### TODO: perhaps it should be moreprecise where the setting can be changed
- TQString ledMsg=i18n("<qt><p><b>Status LEDs</b></p>\n"
+ TQString ledMsg=i18n("<qt><p><b>tqStatus LEDs</b></p>\n"
"<p>These LEDs display the status of the currently displayed message.\n"
"You can change their color in the preferences dialog section\n"
"<b>Editor</b> on page <b>Appearance</b></p></qt>");
@@ -443,8 +443,8 @@ of the currently displayed entry.</p></qt>"));
TQWhatsThis::add(_errorLed,ledMsg);
}
- layout->addWidget(msgstrEdit);
- layout->setStretchFactor(msgstrEdit,1);
+ tqlayout->addWidget(msgstrEdit);
+ tqlayout->setStretchFactor(msgstrEdit,1);
TQWhatsThis::add(tempWidget,
i18n("<qt><p><b>Translation Editor</b></p>\n\
@@ -685,7 +685,7 @@ void KBabelView::readSettings(KConfig* config)
if(KBabelSettings::autoUnsetFuzzy())
{
connect(msgstrEdit,TQT_SIGNAL(textChanged())
- ,this,TQT_SLOT(autoRemoveFuzzyStatus()));
+ ,this,TQT_SLOT(autoRemoveFuzzytqStatus()));
}
setupAutoCheckTools();
@@ -788,7 +788,7 @@ void KBabelView::readProject(Project::Ptr project)
{
// turn off spellchecker
msgstrEdit->setSpellChecker(0);
- // invalidate the current settings, to make sure they are updated when needed
+ // tqinvalidate the current settings, to make sure they are updated when needed
_spellcheckSettings.valid = false;
}
@@ -854,12 +854,12 @@ void KBabelView::updateSettings()
}
disconnect(msgstrEdit,TQT_SIGNAL(textChanged())
- ,this,TQT_SLOT(autoRemoveFuzzyStatus()));
+ ,this,TQT_SLOT(autoRemoveFuzzytqStatus()));
if(KBabelSettings::autoUnsetFuzzy())
{
connect(msgstrEdit,TQT_SIGNAL(textChanged())
- ,this,TQT_SLOT(autoRemoveFuzzyStatus()));
+ ,this,TQT_SLOT(autoRemoveFuzzytqStatus()));
}
msgstrEdit->setCleverEditing(KBabelSettings::cleverEditing());
@@ -931,7 +931,7 @@ void KBabelView::setupAutoCheckTools()
TQValueList<KDataToolInfo>::Iterator it;
for( it=tools.begin(); it!=tools.end() ; ++it )
{
- if(KBabelSettings::autoCheckTools().contains((*it).service()->library()) )
+ if(KBabelSettings::autoCheckTools().tqcontains((*it).service()->library()) )
{
// maybe we can reuse the tools
KDataTool* t = (*it).createTool();
@@ -1013,7 +1013,7 @@ void KBabelView::restoreSession(KConfig* config)
if(!url.isEmpty())
{
- open(KURL( url ), TQString::null, false,true);
+ open(KURL( url ), TQString(), false,true);
}
@@ -1116,7 +1116,7 @@ void KBabelView::open(const KURL& _url, const TQString & package, bool checkIfMo
cu.cleanPath();
if(checkIfModified && !url.isEmpty() && cu==url)
{
- KWin::activateWindow(topLevelWidget()->winId());
+ KWin::activateWindow(tqtopLevelWidget()->winId());
return;
}
@@ -1155,12 +1155,12 @@ void KBabelView::open(const KURL& _url, const TQString & package, bool checkIfMo
return;
}
else {
- KWin::activateWindow(v->topLevelWidget()->winId());
+ KWin::activateWindow(v->tqtopLevelWidget()->winId());
return;
}
}
- ConversionStatus stat=_catalog->openURL(url, package);
+ ConversiontqStatus stat=_catalog->openURL(url, package);
switch(stat)
{
@@ -1180,14 +1180,14 @@ void KBabelView::open(const KURL& _url, const TQString & package, bool checkIfMo
{
KMessageBox::error(this
,i18n("Error while trying to read file:\n %1\n"
- "Maybe it is not a valid PO file.").arg(url.prettyURL()));
+ "Maybe it is not a valid PO file.").tqarg(url.prettyURL()));
break;
}
case NO_ENTRY_ERROR:
{
KMessageBox::error(this
,i18n("Error while reading the file:\n %1\n"
- "No entry found.").arg(url.prettyURL()));
+ "No entry found.").tqarg(url.prettyURL()));
break;
}
case RECOVERED_PARSE_ERROR:
@@ -1204,25 +1204,25 @@ void KBabelView::open(const KURL& _url, const TQString & package, bool checkIfMo
case NO_PERMISSIONS:
{
KMessageBox::error(this,i18n(
- "You do not have permissions to read file:\n %1").arg(url.prettyURL()));
+ "You do not have permissions to read file:\n %1").tqarg(url.prettyURL()));
break;
}
case NO_FILE:
{
KMessageBox::error(this,i18n(
- "You have not specified a valid file:\n %1").arg(url.prettyURL()));
+ "You have not specified a valid file:\n %1").tqarg(url.prettyURL()));
break;
}
case NO_PLUGIN:
{
KMessageBox::error(this,i18n(
- "KBabel cannot find a corresponding plugin for the MIME type of the file:\n %1").arg(url.prettyURL()));
+ "KBabel cannot find a corresponding plugin for the MIME type of the file:\n %1").tqarg(url.prettyURL()));
break;
}
case UNSUPPORTED_TYPE:
{
KMessageBox::error(this,i18n(
- "The import plugin cannot handle this type of the file:\n %1").arg(url.prettyURL()));
+ "The import plugin cannot handle this type of the file:\n %1").tqarg(url.prettyURL()));
break;
}
case STOPPED:
@@ -1230,7 +1230,7 @@ void KBabelView::open(const KURL& _url, const TQString & package, bool checkIfMo
default:
{
KMessageBox::error(this,i18n(
- "Error while trying to open file:\n %1").arg(url.prettyURL()));
+ "Error while trying to open file:\n %1").tqarg(url.prettyURL()));
break;
}
@@ -1268,7 +1268,7 @@ void KBabelView::revertToSaved()
}
}
- open(_catalog->currentURL(),TQString::null,false);
+ open(_catalog->currentURL(),TQString(),false);
}
void KBabelView::openTemplate(const KURL& openURL, const KURL& saveURL)
@@ -1282,7 +1282,7 @@ void KBabelView::openTemplate(const KURL& openURL, const KURL& saveURL)
setCursor(KCursor::waitCursor());*/
- ConversionStatus stat=_catalog->openURL(openURL,saveURL);
+ ConversiontqStatus stat=_catalog->openURL(openURL,saveURL);
switch(stat)
{
@@ -1295,21 +1295,21 @@ void KBabelView::openTemplate(const KURL& openURL, const KURL& saveURL)
// For a template, recoverable errors are disqualifying
KMessageBox::sorry(this,
i18n("There was an error while reading the file header of file:\n %1")
- .arg(openURL.prettyURL()));
+ .tqarg(openURL.prettyURL()));
break;
}
case PARSE_ERROR:
{
KMessageBox::error(this
,i18n("Error while trying to read file:\n %1\n"
- "Maybe it is not a valid PO file.").arg(openURL.prettyURL()));
+ "Maybe it is not a valid PO file.").tqarg(openURL.prettyURL()));
break;
}
case NO_ENTRY_ERROR:
{
KMessageBox::error(this
,i18n("Error while reading the file:\n %1\n"
- "No entry found.").arg(openURL.prettyURL()));
+ "No entry found.").tqarg(openURL.prettyURL()));
break;
}
case RECOVERED_PARSE_ERROR:
@@ -1317,36 +1317,36 @@ void KBabelView::openTemplate(const KURL& openURL, const KURL& saveURL)
// For a template, recoverable errors are disqualifying
KMessageBox::sorry(this,
i18n("Minor syntax errors were found while reading file:\n %1")
- .arg(openURL.prettyURL()));
+ .tqarg(openURL.prettyURL()));
break;
}
case NO_PERMISSIONS:
{
- KMessageBox::error(this,i18n("You do not have permissions to read file:\n %1").arg(openURL.prettyURL()));
+ KMessageBox::error(this,i18n("You do not have permissions to read file:\n %1").tqarg(openURL.prettyURL()));
break;
}
case NO_FILE:
{
- KMessageBox::error(this,i18n("You have not specified a valid file:\n %1").arg(openURL.prettyURL()));
+ KMessageBox::error(this,i18n("You have not specified a valid file:\n %1").tqarg(openURL.prettyURL()));
break;
}
case NO_PLUGIN:
{
KMessageBox::error(this,i18n(
- "KBabel cannot find a corresponding plugin for the MIME type of the file:\n %1").arg(openURL.prettyURL()));
+ "KBabel cannot find a corresponding plugin for the MIME type of the file:\n %1").tqarg(openURL.prettyURL()));
break;
}
case UNSUPPORTED_TYPE:
{
KMessageBox::error(this,i18n(
- "The import plugin cannot handle this type of the file:\n %1").arg(openURL.prettyURL()));
+ "The import plugin cannot handle this type of the file:\n %1").tqarg(openURL.prettyURL()));
break;
}
case STOPPED:
break;
default:
{
- KMessageBox::error(this,i18n("Error while trying to open file:\n %1").arg(openURL.prettyURL()));
+ KMessageBox::error(this,i18n("Error while trying to open file:\n %1").tqarg(openURL.prettyURL()));
break;
}
@@ -1368,7 +1368,7 @@ bool KBabelView::saveFile(bool syntaxCheck)
}
else
{
- ConversionStatus stat=_catalog->saveFile();
+ ConversiontqStatus stat=_catalog->saveFile();
int whatToDo = -1;
@@ -1386,20 +1386,20 @@ bool KBabelView::saveFile(bool syntaxCheck)
{
whatToDo=KMessageBox::warningContinueCancel(this,
i18n("You do not have permission to write to file:\n%1\n"
- "Do you want to save to another file or cancel?").arg(_catalog->currentURL().prettyURL()),
+ "Do you want to save to another file or cancel?").tqarg(_catalog->currentURL().prettyURL()),
i18n("Error"),KStdGuiItem::save());
break;
}
case NO_PLUGIN:
{
KMessageBox::error(this,i18n(
- "KBabel cannot find a corresponding plugin for the MIME type of file:\n %1").arg(_catalog->currentURL().prettyURL()));
+ "KBabel cannot find a corresponding plugin for the MIME type of file:\n %1").tqarg(_catalog->currentURL().prettyURL()));
break;
}
case UNSUPPORTED_TYPE:
{
KMessageBox::error(this,i18n(
- "The export plugin cannot handle this type of file:\n %1").arg(_catalog->currentURL().prettyURL()));
+ "The export plugin cannot handle this type of file:\n %1").tqarg(_catalog->currentURL().prettyURL()));
break;
}
case BUSY:
@@ -1415,7 +1415,7 @@ bool KBabelView::saveFile(bool syntaxCheck)
{
whatToDo=KMessageBox::warningContinueCancel(this,
i18n("An error occurred while trying to write to file:\n%1\n"
- "Do you want to save to another file or cancel?").arg(_catalog->currentURL().prettyURL()),
+ "Do you want to save to another file or cancel?").tqarg(_catalog->currentURL().prettyURL()),
i18n("Error"),KStdGuiItem::save());
break;
}
@@ -1448,8 +1448,8 @@ bool KBabelView::saveFileAs(KURL url, bool syntaxCheck)
if (KIO::NetAccess::exists(url, false, this))
{
- if(KMessageBox::warningContinueCancel(this,TQString("<qt>%1</qt>").arg(i18n("The file %1 already exists. "
- "Do you want to overwrite it?").arg(url.prettyURL())),i18n("Warning"),i18n("&Overwrite"))==KMessageBox::Cancel)
+ if(KMessageBox::warningContinueCancel(this,TQString("<qt>%1</qt>").tqarg(i18n("The file %1 already exists. "
+ "Do you want to overwrite it?").tqarg(url.prettyURL())),i18n("Warning"),i18n("&Overwrite"))==KMessageBox::Cancel)
{
return false;
}
@@ -1458,7 +1458,7 @@ bool KBabelView::saveFileAs(KURL url, bool syntaxCheck)
bool wasReadOnly=_catalog->isReadOnly();
- ConversionStatus stat=_catalog->saveFileAs(url,true);
+ ConversiontqStatus stat=_catalog->saveFileAs(url,true);
// if the file was not saved sucessfully ask for saving to another file
@@ -1474,30 +1474,30 @@ bool KBabelView::saveFileAs(KURL url, bool syntaxCheck)
case NO_PERMISSIONS:
{
message=i18n("You do not have permission to write to file:\n%1\n"
- "Do you want to save to another file or cancel?").arg(url.prettyURL());
+ "Do you want to save to another file or cancel?").tqarg(url.prettyURL());
break;
}
case NO_FILE:
{
message=i18n("You have specified a folder:\n%1\n"
- "Do you want to save to another file or cancel?").arg(url.prettyURL());
+ "Do you want to save to another file or cancel?").tqarg(url.prettyURL());
break;
}
case NO_PLUGIN:
{
- message=i18n("KBabel cannot find a corresponding plugin for the MIME type of the file:\n %1").arg(url.prettyURL());
+ message=i18n("KBabel cannot find a corresponding plugin for the MIME type of the file:\n %1").tqarg(url.prettyURL());
break;
}
case UNSUPPORTED_TYPE:
{
message=i18n(
- "The export plugin cannot handle this type of the file:\n %1").arg(url.prettyURL());
+ "The export plugin cannot handle this type of the file:\n %1").tqarg(url.prettyURL());
break;
}
default:
{
message=i18n("An error occurred while trying to write to file:\n%1\n"
- "Do you want to save to another file or cancel?").arg(url.prettyURL());
+ "Do you want to save to another file or cancel?").tqarg(url.prettyURL());
break;
}
}
@@ -1518,7 +1518,7 @@ bool KBabelView::saveFileAs(KURL url, bool syntaxCheck)
if (KIO::NetAccess::exists(url, false, this))
{
if(KMessageBox::warningContinueCancel(this,i18n("The file %1 already exists.\n"
- "Do you want to overwrite it?").arg(url.prettyURL()),i18n("Warning"),i18n("&Overwrite"))==KMessageBox::Continue)
+ "Do you want to overwrite it?").tqarg(url.prettyURL()),i18n("Warning"),i18n("&Overwrite"))==KMessageBox::Continue)
{
stat=_catalog->saveFileAs(url);
if(stat!=OK)
@@ -1625,7 +1625,7 @@ bool KBabelView::checkSyntax(bool msgOnlyAtError,bool question)
bool returnCode=true;
TQString output;
- Msgfmt::Status result=_catalog->checkSyntax( output );
+ Msgfmt::tqStatus result=_catalog->checkSyntax( output );
const TQStringList outputLines = TQStringList::split("\n",output);
@@ -1831,20 +1831,20 @@ void KBabelView::updateEditor(int form, bool delay)
if(KBabelSettings::autoUnsetFuzzy() && !msgstrEdit->isModified())
{
- disconnect(msgstrEdit,TQT_SIGNAL(textChanged()),this,TQT_SLOT(autoRemoveFuzzyStatus()));
+ disconnect(msgstrEdit,TQT_SIGNAL(textChanged()),this,TQT_SLOT(autoRemoveFuzzytqStatus()));
}
msgidLabel->setText(_catalog->msgid(_currentIndex), _catalog->msgctxt(_currentIndex));
- msgidLabel->repaint();
+ msgidLabel->tqrepaint();
msgstrEdit->setText(_catalog->msgstr(_currentIndex));
msgstrEdit->showForm( form );
- msgstrEdit->repaint();
+ msgstrEdit->tqrepaint();
m_cataloglistview->setSelectedItem(_currentIndex);
if(KBabelSettings::autoUnsetFuzzy() && _catalog->isFuzzy(_currentIndex))
{
- connect(msgstrEdit,TQT_SIGNAL(textChanged()),this,TQT_SLOT(autoRemoveFuzzyStatus()));
+ connect(msgstrEdit,TQT_SIGNAL(textChanged()),this,TQT_SLOT(autoRemoveFuzzytqStatus()));
}
msgstrEdit->blockSignals(false);
@@ -2034,7 +2034,7 @@ bool KBabelView::findNext_internal(DocPosition& pos, bool forReplace, bool gui)
r = KMessageBox::questionYesNo(this,
i18n("<qt>%n replacement made.<br>End of document reached.<br>Continue from the beginning?</qt>",
"<qt>%n replacements made.<br>End of document reached.<br>Continue from the beginning?</qt>",
- _replacesTotal), TQString::null, KStdGuiItem::cont(), KStdGuiItem::cancel());
+ _replacesTotal), TQString(), KStdGuiItem::cont(), KStdGuiItem::cancel());
}
else {
r = KMessageBox::Yes;
@@ -2042,7 +2042,7 @@ bool KBabelView::findNext_internal(DocPosition& pos, bool forReplace, bool gui)
}
else {
r = KMessageBox::questionYesNo(this,i18n("End of document reached.\n"
- "Continue from the beginning?"), TQString::null, KStdGuiItem::cont(), KStdGuiItem::cancel());
+ "Continue from the beginning?"), TQString(), KStdGuiItem::cont(), KStdGuiItem::cancel());
}
if(r == KMessageBox::Yes) {
if(opts.inMsgid && !forReplace)
@@ -2078,7 +2078,7 @@ bool KBabelView::findNext_internal(DocPosition& pos, bool forReplace, bool gui)
if( opts.askForNextFile )
{
int r = KMessageBox::questionYesNo(this,i18n("End of document reached.\n"
- "Continue in the next file?"), TQString::null, KStdGuiItem::cont(), KStdGuiItem::cancel());
+ "Continue in the next file?"), TQString(), KStdGuiItem::cont(), KStdGuiItem::cancel());
if( r != KMessageBox::Yes ) return false;
}
@@ -2219,7 +2219,7 @@ bool KBabelView::findPrev_internal(DocPosition& pos, bool forReplace, bool gui)
r = KMessageBox::questionYesNo(this,
i18n("<qt>%n replacement made.<br>Beginning of document reached.<br>Continue from the end?</qt>",
"<qt>%n replacements made.<br>Beginning of document reached.<br>Continue from the end?</qt>",
- _replacesTotal),TQString::null, KStdGuiItem::cont(), KStdGuiItem::cancel());
+ _replacesTotal),TQString(), KStdGuiItem::cont(), KStdGuiItem::cancel());
}
else {
r = KMessageBox::Yes;
@@ -2228,7 +2228,7 @@ bool KBabelView::findPrev_internal(DocPosition& pos, bool forReplace, bool gui)
}
else {
r = KMessageBox::questionYesNo(this,i18n("Beginning of document reached.\n"
- "Continue from the end?"), TQString::null, KStdGuiItem::cont(), KStdGuiItem::cancel());
+ "Continue from the end?"), TQString(), KStdGuiItem::cont(), KStdGuiItem::cancel());
}
if(r == KMessageBox::Yes) {
pos.item = _catalog->numberOfEntries()-1;
@@ -2331,7 +2331,7 @@ bool KBabelView::findPrev_internal(DocPosition& pos, bool forReplace, bool gui)
}
-void KBabelView::find()
+void KBabelView::tqfind()
{
Part hadFocus;
if(msgidLabel->hasFocus())
@@ -2425,7 +2425,7 @@ void KBabelView::find()
}
}
-void KBabelView::replace()
+void KBabelView::tqreplace()
{
_replacesTotal=0;
_replaceLen=0;
@@ -2518,7 +2518,7 @@ void KBabelView::replace()
if(success) {
if(!_replaceAskDialog) {
_replaceAskDialog = new ReplaceDialog(this);
- connect(_replaceAskDialog,TQT_SIGNAL(replace()),this,TQT_SLOT(replaceNext()));
+ connect(_replaceAskDialog,TQT_SIGNAL(tqreplace()),this,TQT_SLOT(replaceNext()));
connect(_replaceAskDialog,TQT_SIGNAL(next()),this,TQT_SLOT(findNextReplace()));
connect(_replaceAskDialog,TQT_SIGNAL(replaceAll()),this,TQT_SLOT(replaceAll()));
}
@@ -2749,7 +2749,7 @@ void KBabelView::replaceInFile(TQCString fileSource, KBabel::ReplaceOptions opti
else {
if(!_replaceAskDialog) {
_replaceAskDialog = new ReplaceDialog(this);
- connect(_replaceAskDialog,TQT_SIGNAL(replace()),this,TQT_SLOT(replaceNext()));
+ connect(_replaceAskDialog,TQT_SIGNAL(tqreplace()),this,TQT_SLOT(replaceNext()));
connect(_replaceAskDialog,TQT_SIGNAL(next()),this,TQT_SLOT(findNextReplace()));
connect(_replaceAskDialog,TQT_SIGNAL(replaceAll()),this,TQT_SLOT(replaceAll()));
}
@@ -2803,37 +2803,37 @@ void KBabelView::msgid2msgstr()
TQString text = _catalog->msgid(_currentIndex).first();
// this is KDE specific:
- if(text.find("_: NAME OF TRANSLATORS\\n")==0)
+ if(text.tqfind("_: NAME OF TRANSLATORS\\n")==0)
{
text=_catalog->identitySettings().authorLocalizedName;
}
- else if(text.find("_: EMAIL OF TRANSLATORS\\n")==0)
+ else if(text.tqfind("_: EMAIL OF TRANSLATORS\\n")==0)
{
text=_catalog->identitySettings().authorEmail;
}
- else if(_catalog->isGeneratedFromDocbook() && text.find("ROLES_OF_TRANSLATORS")==0)
+ else if(_catalog->isGeneratedFromDocbook() && text.tqfind("ROLES_OF_TRANSLATORS")==0)
{
text="<othercredit role=\\\"translator\\\">\n"
"<firstname></firstname><surname></surname>\n"
"<affiliation><address><email>"+_catalog->identitySettings().authorEmail+"</email></address>\n"
"</affiliation><contrib></contrib></othercredit>";
}
- else if(_catalog->isGeneratedFromDocbook() && text.find("CREDIT_FOR_TRANSLATORS")==0)
+ else if(_catalog->isGeneratedFromDocbook() && text.tqfind("CREDIT_FOR_TRANSLATORS")==0)
{
text="<para>"+_catalog->identitySettings().authorLocalizedName+"\n"+
"<email>"+_catalog->identitySettings().authorEmail+"</email></para>";
}
- else if(text.contains(_catalog->miscSettings().singularPlural))
+ else if(text.tqcontains(_catalog->miscSettings().singularPlural))
{
- text.replace(_catalog->miscSettings().singularPlural,"");
+ text.tqreplace(_catalog->miscSettings().singularPlural,"");
}
// end of KDE specific part
TQRegExp reg=_catalog->miscSettings().contextInfo;
- if(text.contains(reg))
+ if(text.tqcontains(reg))
{
- text.replace(reg,"");
+ text.tqreplace(reg,"");
}
modifyMsgstrText(0,text,true);
@@ -3159,7 +3159,7 @@ void KBabelView::forwardHistory()
}
}
-void KBabelView::removeFuzzyStatus()
+void KBabelView::removeFuzzytqStatus()
{
bool newState = !_catalog->isFuzzy(_currentIndex);
_catalog->setFuzzy(_currentIndex,newState);
@@ -3204,9 +3204,9 @@ void KBabelView::startSearch(bool delay)
{
TQString msg = _catalog->msgid(_currentIndex,true).first();
TQRegExp reg=_catalog->miscSettings().contextInfo;
- if(msg.contains(reg))
+ if(msg.tqcontains(reg))
{
- msg.replace(reg,"");
+ msg.tqreplace(reg,"");
}
dictBox->setActiveModule(KBabelSettings::defaultModule());
@@ -3225,9 +3225,9 @@ void KBabelView::startSearch(const TQString module)
// FIXME: should care about plural forms
TQString msg = _catalog->msgid(_currentIndex,true).first();
TQRegExp reg=_catalog->miscSettings().contextInfo;
- if(msg.contains(reg))
+ if(msg.tqcontains(reg))
{
- msg.replace(reg,"");
+ msg.tqreplace(reg,"");
}
dictBox->setActiveModule(module);
@@ -3258,9 +3258,9 @@ void KBabelView::startSelectionSearch(const TQString module)
// should care about plural forms
TQString msg = _catalog->msgid(_currentIndex,true).first();
TQRegExp reg=_catalog->miscSettings().contextInfo;
- if(msg.contains(reg))
+ if(msg.tqcontains(reg))
{
- msg.replace(reg,"");
+ msg.tqreplace(reg,"");
}
dictBox->startSearch(msg);
@@ -3302,12 +3302,12 @@ void KBabelView::emitEntryState()
TQPalette palette=msgstrEdit->palette();
palette.setColor( TQColorGroup::Text, red );
- if( _catalog->itemStatus(_currentIndex).contains("syntax error"))
+ if( _catalog->itemtqStatus(_currentIndex).tqcontains("syntax error"))
{
msgstrEdit->setCurrentColor( MsgMultiLineEdit::ErrorColor );
}
else
- if( !_catalog->itemStatus(_currentIndex).isEmpty() && KBabelSettings::autoCheckColorError())
+ if( !_catalog->itemtqStatus(_currentIndex).isEmpty() && KBabelSettings::autoCheckColorError())
{
msgstrEdit->setCurrentColor( MsgMultiLineEdit::ErrorColor );
}
@@ -3332,12 +3332,12 @@ void KBabelView::checkUntranslated()
emit signalUntranslatedInFront(_catalog->hasUntranslatedInFront(_currentIndex));
}
-void KBabelView::autoRemoveFuzzyStatus()
+void KBabelView::autoRemoveFuzzytqStatus()
{
// only at first text change remove fuzzy status
- disconnect(msgstrEdit,TQT_SIGNAL(textChanged()),this,TQT_SLOT(autoRemoveFuzzyStatus()));
+ disconnect(msgstrEdit,TQT_SIGNAL(textChanged()),this,TQT_SLOT(autoRemoveFuzzytqStatus()));
- //removeFuzzyStatus();
+ //removeFuzzytqStatus();
}
void KBabelView::toggleFuzzyLed(bool on)
@@ -3446,7 +3446,7 @@ bool KBabelView::eventFilter( TQObject* object, TQEvent* event)
{
// This is a little workaround to use CTRL+ALT+Home, CTRL+ALT+End, Undo keys
// to go to the first and the last entry. Because otherwise
- // CTRL+Home and CTRL+End and Undo are caught by QTextEdit
+ // CTRL+Home and CTRL+End and Undo are caught by TQTextEdit
TQKeyEvent *ke = (TQKeyEvent*)event;
if(ke->key() == Key_Home && ke->state() == (AltButton | ControlButton))
@@ -3541,7 +3541,7 @@ void KBabelView::forwardMsgstrEditCmd(EditCommand* cmd)
_catalog->applyBeginCommand(_currentIndex,Msgstr,this);
- removeFuzzyStatus();
+ removeFuzzytqStatus();
}
cmd->setPart(Msgstr);
@@ -3576,13 +3576,13 @@ void KBabelView::autoCheck(bool onlyWhenChanged)
{
if( !_autocheckTools.isEmpty() )
{
- TQStringList oldStatus = _catalog->itemStatus(_currentIndex);
+ TQStringList oldtqStatus = _catalog->itemtqStatus(_currentIndex);
- TQStringList status = _catalog->itemStatus( _currentIndex,true, _autocheckTools );
+ TQStringList status = _catalog->itemtqStatus( _currentIndex,true, _autocheckTools );
// if there is more than one view, the status changes only in
// one view, so we have to update always.
- if(_catalog->isLastView() && onlyWhenChanged && oldStatus == status)
+ if(_catalog->isLastView() && onlyWhenChanged && oldtqStatus == status)
return;
if( !status.isEmpty() )
@@ -3598,8 +3598,8 @@ void KBabelView::autoCheck(bool onlyWhenChanged)
else msg += ", "+locale->translate("what check found errors",(*it).utf8());
}
- //i18n: translators: Status bar text that automatic checks have found some errors
- emit signalChangeStatusbar(i18n("1 error: %1", "%n errors: %1", status.size ()).arg(msg));
+ //i18n: translators: tqStatus bar text that automatic checks have found some errors
+ emit signalChangeStatusbar(i18n("1 error: %1", "%n errors: %1", status.size ()).tqarg(msg));
emit signalFaultyDisplayed(true);
if(KBabelSettings::autoCheckColorError())
@@ -3611,7 +3611,7 @@ void KBabelView::autoCheck(bool onlyWhenChanged)
{
if(onlyWhenChanged)
{
- if(oldStatus != status && oldStatus.isEmpty() )
+ if(oldtqStatus != status && oldtqStatus.isEmpty() )
{
KNotifyClient::beep();
}
@@ -3622,7 +3622,7 @@ void KBabelView::autoCheck(bool onlyWhenChanged)
}
}
}
- else if( _catalog->itemStatus(_currentIndex).isEmpty() )
+ else if( _catalog->itemtqStatus(_currentIndex).isEmpty() )
{
_catalog->removeFromErrorList(_currentIndex);
@@ -3732,7 +3732,7 @@ void KBabelView::addSpellcheckWords( uint pos, TQString text, uint index, uint f
}
else if( c == '\\')
{
- if(pos+1 < textLength && spclChars.contains(text[pos+1]) )
+ if(pos+1 < textLength && spclChars.tqcontains(text[pos+1]) )
{
pos+=2;
}
@@ -3895,7 +3895,7 @@ void KBabelView::spellcheck()
uint lastPercent=0;
for(uint i=first; i <= last; i++)
{
- if(emitProgress && 100*i/ QMAX(total,1) > lastPercent)
+ if(emitProgress && 100*i/ TQMAX(total,1) > lastPercent)
{
lastPercent++;
emit signalProgress(lastPercent);
@@ -3981,9 +3981,9 @@ void KBabelView::spellStart(KSpell *)
if(_spellcheckSettings.rememberIgnored)
{
TQString urlString = _spellcheckSettings.ignoreURL;
- if(urlString.contains("@PACKAGE@"))
+ if(urlString.tqcontains("@PACKAGE@"))
{
- urlString.replace("@PACKAGE@",_catalog->packageName());
+ urlString.tqreplace("@PACKAGE@",_catalog->packageName());
}
// ### TODO: correctly set the URL; support for MostLocalURL
KURL url(urlString);
@@ -4004,7 +4004,7 @@ void KBabelView::spellStart(KSpell *)
KMessageBox::sorry(this,
i18n("Error opening the file that contains words "
"to ignore during spell checking:\n"
- "%1").arg(file.name()));
+ "%1").tqarg(file.name()));
}
}
else
@@ -4012,7 +4012,7 @@ void KBabelView::spellStart(KSpell *)
KMessageBox::sorry(this,
i18n("Only local files are allowed for saving "
"ignored words to during spell checking:\n"
- "%1").arg(urlString));
+ "%1").tqarg(urlString));
}
if(spell.ignoreList.count() > 0)
@@ -4085,13 +4085,13 @@ bool KBabelView::markMisspelled(const TQString &orig, unsigned int pos)
text=text.mid(begin,end-begin);
TQChar accelMarker=_catalog->miscSettings().accelMarker;
- if(text.contains(accelMarker))
+ if(text.tqcontains(accelMarker))
{
- text.replace(accelMarker,"");
+ text.tqreplace(accelMarker,"");
}
- if(text.contains('\n'))
+ if(text.tqcontains('\n'))
{
- text.replace("\n","");
+ text.tqreplace("\n","");
}
bool textOk=true;
@@ -4099,8 +4099,8 @@ bool KBabelView::markMisspelled(const TQString &orig, unsigned int pos)
{
// if text and orig are not the same,
// maybe it was a word with hyphens
- int n=text.contains('-');
- n+=text.contains('\'');
+ int n=text.tqcontains('-');
+ n+=text.tqcontains('\'');
if( n > 0 )
{
// re-get the original text since we replace some things above
@@ -4113,8 +4113,8 @@ bool KBabelView::markMisspelled(const TQString &orig, unsigned int pos)
while(!textFound && i <= n)
{
int lastPos=e+1;
- e = text.find('-',lastPos);
- int tmp = text.find('\'',lastPos);
+ e = text.tqfind('-',lastPos);
+ int tmp = text.tqfind('\'',lastPos);
if(e < 0 && tmp > 0)
{
e=tmp;
@@ -4127,13 +4127,13 @@ bool KBabelView::markMisspelled(const TQString &orig, unsigned int pos)
if(e<0) e=text.length();
TQString w=text.mid(lastPos,e-lastPos);
- if(w.contains(accelMarker))
+ if(w.tqcontains(accelMarker))
{
- w.replace(accelMarker,"");
+ w.tqreplace(accelMarker,"");
}
- if(text.contains('\n'))
+ if(text.tqcontains('\n'))
{
- text.replace("\n","");
+ text.tqreplace("\n","");
}
if( w == orig)
{
@@ -4225,15 +4225,15 @@ void KBabelView::spellCorrected(const TQString &orig, const TQString &word, unsi
TQString marked=msgstrEdit->selectedText();
spell.origWords.append(marked);
- if(marked.contains("\n") && !newWord.contains('\n'))
+ if(marked.tqcontains("\n") && !newWord.tqcontains('\n'))
{
TQString s1=newWord;
- s1.replace(" ","\n");
+ s1.tqreplace(" ","\n");
// if only a newline has been replaced with a white space
if(s1==marked)
{
- newWord.replace(" "," \n");
+ newWord.tqreplace(" "," \n");
}
}
@@ -4241,11 +4241,11 @@ void KBabelView::spellCorrected(const TQString &orig, const TQString &word, unsi
// word has no accelerator, try to add the accelerator for
// the same char else add in at the same position
TQChar accelMarker=_catalog->miscSettings().accelMarker;
- if(marked.contains(accelMarker) && !newWord.contains(accelMarker))
+ if(marked.tqcontains(accelMarker) && !newWord.tqcontains(accelMarker))
{
- int b=marked.find(accelMarker);
+ int b=marked.tqfind(accelMarker);
TQChar accel=marked[b+1];
- int nb=newWord.find(accel,0,false);
+ int nb=newWord.tqfind(accel,0,false);
if(nb>=0)
{
newWord.insert(nb,accelMarker);
@@ -4379,7 +4379,7 @@ void KBabelView::spellCleanDone()
// if the pointer is cleared, you have finished correcly
if( !spell.kspell ) return;
- KSpell::spellStatus status = spell.kspell->status();
+ KSpell::spelltqStatus status = spell.kspell->status();
if(status == KSpell::Error || status == KSpell::Crashed)
{
@@ -4422,7 +4422,7 @@ void KBabelView::cancelSpellcheck()
void KBabelView::spellAddIgnore(const TQString &word)
{
- if(!spell.ignoreList.contains(word))
+ if(!spell.ignoreList.tqcontains(word))
{
spell.newIgnoreList.append(word);
}