diff options
Diffstat (limited to 'kbabel/kbabeldict/modules/poauxiliary/poauxiliary.cpp')
-rw-r--r-- | kbabel/kbabeldict/modules/poauxiliary/poauxiliary.cpp | 84 |
1 files changed, 42 insertions, 42 deletions
diff --git a/kbabel/kbabeldict/modules/poauxiliary/poauxiliary.cpp b/kbabel/kbabeldict/modules/poauxiliary/poauxiliary.cpp index 373f123d..eae86d65 100644 --- a/kbabel/kbabeldict/modules/poauxiliary/poauxiliary.cpp +++ b/kbabel/kbabeldict/modules/poauxiliary/poauxiliary.cpp @@ -37,9 +37,9 @@ #include <kglobal.h> #include <kinstance.h> -#include <qregexp.h> -#include <qtimer.h> -#include <qstylesheet.h> +#include <tqregexp.h> +#include <tqtimer.h> +#include <tqstylesheet.h> #include "poauxiliary.h" #include "preferenceswidget.h" @@ -50,7 +50,7 @@ using namespace KBabel; -PoAuxiliary::PoAuxiliary(QObject *parent, const char *name) +PoAuxiliary::PoAuxiliary(TQObject *parent, const char *name) : SearchEngine(parent, name) { catalog = new Catalog(this, "PoAuxiliary::catalog"); @@ -63,8 +63,8 @@ PoAuxiliary::PoAuxiliary(QObject *parent, const char *name) ignoreFuzzy=true; - loadTimer = new QTimer(this); - connect(loadTimer,SIGNAL(timeout()),this,SLOT(loadAuxiliary())); + loadTimer = new TQTimer(this); + connect(loadTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(loadAuxiliary())); msgidDict.setAutoDelete(true); } @@ -101,7 +101,7 @@ void PoAuxiliary::readSettings(KConfigBase *config) { bool needLoading=false; - QString newPath = config->readEntry("Auxiliary" + TQString newPath = config->readEntry("Auxiliary" ,"../../../de/messages/@DIR1@/@PACKAGE@.po"); if(!initialized) { @@ -124,12 +124,12 @@ void PoAuxiliary::readSettings(KConfigBase *config) restoreSettings(); } -PrefWidget *PoAuxiliary::preferencesWidget(QWidget *parent) +PrefWidget *PoAuxiliary::preferencesWidget(TQWidget *parent) { prefWidget = new AuxiliaryPreferencesWidget(parent,"pocompendium_prefwidget"); - connect(prefWidget, SIGNAL(applySettings()), this, SLOT(applySettings())); - connect(prefWidget, SIGNAL(restoreSettings()) - , this, SLOT(restoreSettings())); + connect(prefWidget, TQT_SIGNAL(applySettings()), this, TQT_SLOT(applySettings())); + connect(prefWidget, TQT_SIGNAL(restoreSettings()) + , this, TQT_SLOT(restoreSettings())); restoreSettings(); @@ -142,24 +142,24 @@ const KAboutData *PoAuxiliary::about() const } -QString PoAuxiliary::name() const +TQString PoAuxiliary::name() const { return i18n("PO Auxiliary"); } -QString PoAuxiliary::id() const +TQString PoAuxiliary::id() const { return "poauxiliary"; } -QString PoAuxiliary::lastError() +TQString PoAuxiliary::lastError() { return errorMsg; } -bool PoAuxiliary::startSearch(const QString& t, uint pluralForm, const SearchFilter*filter) +bool PoAuxiliary::startSearch(const TQString& t, uint pluralForm, const SearchFilter*filter) { - QString text(t); + TQString text(t); if(autoUpdate && prefWidget && prefWidget->settingsChanged()) { applySettings(); @@ -192,10 +192,10 @@ bool PoAuxiliary::startSearch(const QString& t, uint pluralForm, const SearchFil if( !(entry->fuzzy && ignoreFuzzy) ) { SearchResult *result = new SearchResult; - result->requested =QStyleSheet::convertFromPlainText(text); - result->found = QStyleSheet::convertFromPlainText(text); + result->requested =TQStyleSheet::convertFromPlainText(text); + result->found = TQStyleSheet::convertFromPlainText(text); result->translation = - QStyleSheet::convertFromPlainText(entry->translation); + TQStyleSheet::convertFromPlainText(entry->translation); result->plainRequested = text; result->plainFound=text; @@ -231,7 +231,7 @@ bool PoAuxiliary::startSearch(const QString& t, uint pluralForm, const SearchFil } -bool PoAuxiliary::startSearchInTranslation(const QString& text) +bool PoAuxiliary::startSearchInTranslation(const TQString& text) { if(autoUpdate && prefWidget && prefWidget->settingsChanged()) { @@ -263,10 +263,10 @@ bool PoAuxiliary::startSearchInTranslation(const QString& text) if( !(entry->fuzzy && ignoreFuzzy) ) { SearchResult *result = new SearchResult; - result->requested =QStyleSheet::convertFromPlainText(entry->orig); - result->found = QStyleSheet::convertFromPlainText(entry->orig); + result->requested =TQStyleSheet::convertFromPlainText(entry->orig); + result->found = TQStyleSheet::convertFromPlainText(entry->orig); result->translation = - QStyleSheet::convertFromPlainText(text); + TQStyleSheet::convertFromPlainText(text); result->plainRequested = entry->orig; result->plainFound=entry->orig; @@ -317,7 +317,7 @@ void PoAuxiliary::applySettings() if(isSearching()) stopSearch(); - QString newPath = prefWidget->url(); + TQString newPath = prefWidget->url(); if(!initialized) { url = newPath; @@ -356,7 +356,7 @@ void PoAuxiliary::loadAuxiliary() loading=true; error=false; - QString path=url; + TQString path=url; if(path.contains("@LANG@")) { @@ -370,14 +370,14 @@ void PoAuxiliary::loadAuxiliary() } if(path.contains("@PACKAGEDIR@")) { - QString packagedir; + TQString packagedir; int pos=package.findRev("/"); if( pos > 0 ) packagedir=package.left(pos); else packagedir=""; path.replace("@PACKAGEDIR@",packagedir); kdDebug(KBABEL_SEARCH) << "Packagedir found " << packagedir << endl; } - QRegExp reg("@DIR[0-9]+@"); + TQRegExp reg("@DIR[0-9]+@"); if(path.contains(reg)) { int pos=reg.search(path); @@ -385,14 +385,14 @@ void PoAuxiliary::loadAuxiliary() while(pos>=0) { - QString num=path.mid(pos+4,len-5); + TQString num=path.mid(pos+4,len-5); bool ok; int number=num.toInt(&ok); if(ok) { - QString dir=directory(editedFile,number); - QString s("@DIR%1@"); + TQString dir=directory(editedFile,number); + TQString s("@DIR%1@"); path.replace(s.arg(number),dir); pos+=dir.length(); @@ -404,7 +404,7 @@ void PoAuxiliary::loadAuxiliary() } KURL u; - QRegExp rel("^[a-zA-Z]+:"); + TQRegExp rel("^[a-zA-Z]+:"); if(rel.search(path) >= 0) { u=path; @@ -412,7 +412,7 @@ void PoAuxiliary::loadAuxiliary() else if(path[0] != '/') // relative path { KURL temp(editedFile); - QString dir = temp.directory(); + TQString dir = temp.directory(); kdDebug(KBABEL_SEARCH) << dir << endl; u.setPath(dir+"/"+path); u.cleanPath(); @@ -424,8 +424,8 @@ void PoAuxiliary::loadAuxiliary() } emit progressStarts(i18n("Loading PO auxiliary")); - connect(catalog, SIGNAL(signalProgress(int)) - , this, SIGNAL(progress(int))); + connect(catalog, TQT_SIGNAL(signalProgress(int)) + , this, TQT_SIGNAL(progress(int))); ConversionStatus stat = catalog->openURL(u); if( stat != OK && stat != RECOVERED_PARSE_ERROR) @@ -476,8 +476,8 @@ void PoAuxiliary::loadAuxiliary() auxTranslator = catalog->lastTranslator(); } - disconnect(catalog, SIGNAL(signalProgress(int)) - , this, SIGNAL(progress(int))); + disconnect(catalog, TQT_SIGNAL(signalProgress(int)) + , this, TQT_SIGNAL(progress(int))); emit progressEnds(); @@ -489,7 +489,7 @@ void PoAuxiliary::loadAuxiliary() } -void PoAuxiliary::setEditedFile(const QString& file) +void PoAuxiliary::setEditedFile(const TQString& file) { if(initialized && (url.contains("@DIR") || KURL::isRelativeURL(url)) && file!=editedFile && !loadTimer->isActive() ) @@ -501,7 +501,7 @@ void PoAuxiliary::setEditedFile(const QString& file) } -void PoAuxiliary::setEditedPackage(const QString& pack) +void PoAuxiliary::setEditedPackage(const TQString& pack) { if(initialized && url.contains("@PACKAGE@") && pack!=package && !loadTimer->isActive() ) @@ -513,7 +513,7 @@ void PoAuxiliary::setEditedPackage(const QString& pack) } -void PoAuxiliary::setLanguageCode(const QString& lang) +void PoAuxiliary::setLanguageCode(const TQString& lang) { if(initialized && url.contains("@LANG@") && lang!=langCode && !loadTimer->isActive() ) @@ -529,7 +529,7 @@ bool PoAuxiliary::usesRichTextResults() return true; } -QString PoAuxiliary::translate(const QString& text, uint pluralForm) +TQString PoAuxiliary::translate(const TQString& text, uint pluralForm) { if(!initialized) { @@ -538,7 +538,7 @@ QString PoAuxiliary::translate(const QString& text, uint pluralForm) if(error) { - return QString::null; + return TQString::null; } Entry *entry = msgidDict[text]; @@ -547,7 +547,7 @@ QString PoAuxiliary::translate(const QString& text, uint pluralForm) return entry->translation; } - return QString::null; + return TQString::null; } |