summaryrefslogtreecommitdiffstats
path: root/kbabel/kbabeldict/modules/poauxiliary
diff options
context:
space:
mode:
Diffstat (limited to 'kbabel/kbabeldict/modules/poauxiliary')
-rw-r--r--kbabel/kbabeldict/modules/poauxiliary/pa_factory.cpp8
-rw-r--r--kbabel/kbabeldict/modules/poauxiliary/pa_factory.h8
-rw-r--r--kbabel/kbabeldict/modules/poauxiliary/poauxiliary.cpp84
-rw-r--r--kbabel/kbabeldict/modules/poauxiliary/poauxiliary.h56
-rw-r--r--kbabel/kbabeldict/modules/poauxiliary/preferenceswidget.cpp20
-rw-r--r--kbabel/kbabeldict/modules/poauxiliary/preferenceswidget.h6
6 files changed, 91 insertions, 91 deletions
diff --git a/kbabel/kbabeldict/modules/poauxiliary/pa_factory.cpp b/kbabel/kbabeldict/modules/poauxiliary/pa_factory.cpp
index 1448e2b0..c8d8c1db 100644
--- a/kbabel/kbabeldict/modules/poauxiliary/pa_factory.cpp
+++ b/kbabel/kbabeldict/modules/poauxiliary/pa_factory.cpp
@@ -54,7 +54,7 @@ KInstance *PaFactory::s_instance = 0;
KAboutData *PaFactory::s_about = 0;
-PaFactory::PaFactory( QObject *parent, const char *name)
+PaFactory::PaFactory( TQObject *parent, const char *name)
: KLibFactory(parent,name)
{
}
@@ -75,10 +75,10 @@ PaFactory::~PaFactory()
}
-QObject *PaFactory::createObject( QObject *parent, const char *name
- , const char *classname, const QStringList &)
+TQObject *PaFactory::createObject( TQObject *parent, const char *name
+ , const char *classname, const TQStringList &)
{
- if(QCString(classname) != "SearchEngine")
+ if(TQCString(classname) != "SearchEngine")
{
kdError() << "not a SearchEngine requested" << endl;
return 0;
diff --git a/kbabel/kbabeldict/modules/poauxiliary/pa_factory.h b/kbabel/kbabeldict/modules/poauxiliary/pa_factory.h
index 8871a538..901351c7 100644
--- a/kbabel/kbabeldict/modules/poauxiliary/pa_factory.h
+++ b/kbabel/kbabeldict/modules/poauxiliary/pa_factory.h
@@ -43,12 +43,12 @@ class PaFactory : public KLibFactory
{
Q_OBJECT
public:
- PaFactory( QObject *parent=0, const char *name=0);
+ PaFactory( TQObject *parent=0, const char *name=0);
~PaFactory();
- virtual QObject *createObject( QObject *parent=0, const char *name=0
- , const char *classname="QObject"
- , const QStringList &args = QStringList());
+ virtual TQObject *createObject( TQObject *parent=0, const char *name=0
+ , const char *classname="TQObject"
+ , const TQStringList &args = TQStringList());
static KInstance *instance();
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;
}
diff --git a/kbabel/kbabeldict/modules/poauxiliary/poauxiliary.h b/kbabel/kbabeldict/modules/poauxiliary/poauxiliary.h
index 27fecba6..e0f4fe5d 100644
--- a/kbabel/kbabeldict/modules/poauxiliary/poauxiliary.h
+++ b/kbabel/kbabeldict/modules/poauxiliary/poauxiliary.h
@@ -36,8 +36,8 @@
#include "searchengine.h"
-#include <qguardedptr.h>
-#include <qdict.h>
+#include <tqguardedptr.h>
+#include <tqdict.h>
class QTimer;
namespace KBabel
@@ -52,40 +52,40 @@ class PoAuxiliary : public SearchEngine
Q_OBJECT
public:
- PoAuxiliary(QObject *parent=0, const char *name=0);
+ PoAuxiliary(TQObject *parent=0, const char *name=0);
virtual ~PoAuxiliary();
virtual bool isReady() const;
- virtual QString translate(const QString& text, uint pluralForm);
+ virtual TQString translate(const TQString& text, uint pluralForm);
virtual bool isSearching() const;
virtual void saveSettings(KConfigBase *config);
virtual void readSettings(KConfigBase *config);
- virtual PrefWidget *preferencesWidget(QWidget *parent);
+ virtual PrefWidget *preferencesWidget(TQWidget *parent);
virtual const KAboutData *about() const;
- virtual QString name() const;
+ virtual TQString name() const;
- virtual QString id() const;
+ virtual TQString id() const;
- virtual QString lastError();
+ virtual TQString lastError();
virtual bool usesRichTextResults();
public slots:
- virtual bool startSearch(const QString& text, unsigned int pluralForm
+ virtual bool startSearch(const TQString& text, unsigned int pluralForm
, const SearchFilter*filter);
- virtual bool startSearchInTranslation(const QString& text);
+ virtual bool startSearchInTranslation(const TQString& text);
virtual void stopSearch();
- virtual void setEditedFile(const QString&);
- virtual void setEditedPackage(const QString&);
- virtual void setLanguageCode(const QString&);
+ virtual void setEditedFile(const TQString&);
+ virtual void setEditedPackage(const TQString&);
+ virtual void setLanguageCode(const TQString&);
protected slots:
@@ -98,39 +98,39 @@ protected slots:
void loadAuxiliary();
private:
- QGuardedPtr<AuxiliaryPreferencesWidget> prefWidget;
+ TQGuardedPtr<AuxiliaryPreferencesWidget> prefWidget;
KBabel::Catalog *catalog;
- QString auxPackage;
- QString auxTranslator;
- QString auxURL;
+ TQString auxPackage;
+ TQString auxTranslator;
+ TQString auxURL;
- QString url;
+ TQString url;
bool ignoreFuzzy;
- QString editedFile;
- QString package;
- QString langCode;
+ TQString editedFile;
+ TQString package;
+ TQString langCode;
bool error;
- QString errorMsg;
+ TQString errorMsg;
bool stop;
bool active;
bool loading;
bool initialized;
- QTimer *loadTimer;
+ TQTimer *loadTimer;
struct Entry
{
- QString orig;
- QString translation;
- QString comment;
+ TQString orig;
+ TQString translation;
+ TQString comment;
bool fuzzy;
};
- QDict<Entry> msgidDict;
- QDict<Entry> msgstrDict;
+ TQDict<Entry> msgidDict;
+ TQDict<Entry> msgstrDict;
};
#endif
diff --git a/kbabel/kbabeldict/modules/poauxiliary/preferenceswidget.cpp b/kbabel/kbabeldict/modules/poauxiliary/preferenceswidget.cpp
index e8d48032..5a534ecf 100644
--- a/kbabel/kbabeldict/modules/poauxiliary/preferenceswidget.cpp
+++ b/kbabel/kbabeldict/modules/poauxiliary/preferenceswidget.cpp
@@ -30,12 +30,12 @@
your version.
**************************************************************************** */
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <kfiledialog.h>
-#include <qpushbutton.h>
+#include <tqpushbutton.h>
#include <klineedit.h>
#include <klocale.h>
#include <kurlrequester.h>
@@ -43,18 +43,18 @@
#include "preferenceswidget.h"
#include "pwidget.h"
-AuxiliaryPreferencesWidget::AuxiliaryPreferencesWidget(QWidget *parent, const char* name)
+AuxiliaryPreferencesWidget::AuxiliaryPreferencesWidget(TQWidget *parent, const char* name)
: PrefWidget(parent,name)
, changed(false)
{
- QVBoxLayout *layout = new QVBoxLayout(this);
+ TQVBoxLayout *layout = new TQVBoxLayout(this);
prefWidget = new PWidget(this);
layout->addWidget(prefWidget);
- connect(prefWidget->urlInput->lineEdit(),SIGNAL(textChanged(const QString&))
- , this, SLOT(setChanged()));
+ connect(prefWidget->urlInput->lineEdit(),TQT_SIGNAL(textChanged(const TQString&))
+ , this, TQT_SLOT(setChanged()));
}
AuxiliaryPreferencesWidget::~AuxiliaryPreferencesWidget()
@@ -78,13 +78,13 @@ void AuxiliaryPreferencesWidget::standard()
changed=true;
}
-void AuxiliaryPreferencesWidget::setURL(const QString url)
+void AuxiliaryPreferencesWidget::setURL(const TQString url)
{
prefWidget->urlInput->setURL(url);
changed=false;
}
-QString AuxiliaryPreferencesWidget::url()
+TQString AuxiliaryPreferencesWidget::url()
{
changed = false;
return prefWidget->urlInput->url();
diff --git a/kbabel/kbabeldict/modules/poauxiliary/preferenceswidget.h b/kbabel/kbabeldict/modules/poauxiliary/preferenceswidget.h
index 45488158..3f0862b2 100644
--- a/kbabel/kbabeldict/modules/poauxiliary/preferenceswidget.h
+++ b/kbabel/kbabeldict/modules/poauxiliary/preferenceswidget.h
@@ -44,15 +44,15 @@ class AuxiliaryPreferencesWidget : public PrefWidget
Q_OBJECT
public:
- AuxiliaryPreferencesWidget(QWidget *parent=0, const char* name=0);
+ AuxiliaryPreferencesWidget(TQWidget *parent=0, const char* name=0);
virtual ~AuxiliaryPreferencesWidget();
virtual void apply();
virtual void cancel();
virtual void standard();
- void setURL(const QString url);
- QString url();
+ void setURL(const TQString url);
+ TQString url();
void setIgnoreFuzzy(bool);
bool ignoreFuzzy();