summaryrefslogtreecommitdiffstats
path: root/kbabel/kbabeldict/modules
diff options
context:
space:
mode:
Diffstat (limited to 'kbabel/kbabeldict/modules')
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine/KDBSearchEngine.cpp322
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine/KDBSearchEngine.h86
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine/database.cpp122
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine/database.h74
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine/dbscan.cpp30
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine/dbscan.h8
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine/dbse_factory.cpp8
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine/dbse_factory.h8
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine/preferenceswidget.cpp28
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine/preferenceswidget.h4
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine2/KDBSearchEngine2.cpp118
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine2/KDBSearchEngine2.h48
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine2/algorithms.cpp86
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine2/algorithms.h24
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine2/chunk.cpp52
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine2/chunk.h64
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine2/database.cpp166
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine2/database.h82
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine2/dbentries.cpp38
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine2/dbentries.h62
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine2/dbscan.cpp44
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine2/dbscan.h18
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine2/dbse2_factory.cpp8
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine2/dbse2_factory.h8
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine2/preferenceswidget.cpp24
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine2/preferenceswidget.h2
-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
-rw-r--r--kbabel/kbabeldict/modules/pocompendium/compendiumdata.cpp52
-rw-r--r--kbabel/kbabeldict/modules/pocompendium/compendiumdata.h44
-rw-r--r--kbabel/kbabeldict/modules/pocompendium/pc_factory.cpp8
-rw-r--r--kbabel/kbabeldict/modules/pocompendium/pc_factory.h8
-rw-r--r--kbabel/kbabeldict/modules/pocompendium/pocompendium.cpp196
-rw-r--r--kbabel/kbabeldict/modules/pocompendium/pocompendium.h58
-rw-r--r--kbabel/kbabeldict/modules/pocompendium/preferenceswidget.cpp100
-rw-r--r--kbabel/kbabeldict/modules/pocompendium/preferenceswidget.h6
-rw-r--r--kbabel/kbabeldict/modules/tmx/pc_factory.cpp8
-rw-r--r--kbabel/kbabeldict/modules/tmx/pc_factory.h8
-rw-r--r--kbabel/kbabeldict/modules/tmx/preferenceswidget.cpp94
-rw-r--r--kbabel/kbabeldict/modules/tmx/preferenceswidget.h6
-rw-r--r--kbabel/kbabeldict/modules/tmx/tmxcompendium.cpp164
-rw-r--r--kbabel/kbabeldict/modules/tmx/tmxcompendium.h42
-rw-r--r--kbabel/kbabeldict/modules/tmx/tmxcompendiumdata.cpp64
-rw-r--r--kbabel/kbabeldict/modules/tmx/tmxcompendiumdata.h52
48 files changed, 1313 insertions, 1313 deletions
diff --git a/kbabel/kbabeldict/modules/dbsearchengine/KDBSearchEngine.cpp b/kbabel/kbabeldict/modules/dbsearchengine/KDBSearchEngine.cpp
index ac55335d..5c5c6a6d 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine/KDBSearchEngine.cpp
+++ b/kbabel/kbabeldict/modules/dbsearchengine/KDBSearchEngine.cpp
@@ -28,10 +28,10 @@
* your version. *
*/
-#include <qtextedit.h>
-#include <qprogressdialog.h>
+#include <tqtextedit.h>
+#include <tqprogressdialog.h>
-#include <qinputdialog.h>
+#include <tqinputdialog.h>
#include <kdeversion.h>
#include <klocale.h>
#include <kdebug.h>
@@ -52,17 +52,17 @@
#include <sys/time.h>
#include "preferenceswidget.h"
#include "dbse_factory.h"
-#include <qprogressbar.h>
-#include <qpushbutton.h>
+#include <tqprogressbar.h>
+#include <tqpushbutton.h>
#include <klineedit.h>
#include <kconfig.h>
-#include <qdir.h>
-#include <qradiobutton.h>
-#include <qcheckbox.h>
-#include <qspinbox.h>
-#include <qslider.h>
-#include <qmemarray.h>
+#include <tqdir.h>
+#include <tqradiobutton.h>
+#include <tqcheckbox.h>
+#include <tqspinbox.h>
+#include <tqslider.h>
+#include <tqmemarray.h>
#include "database.h"
@@ -72,7 +72,7 @@
using namespace KBabel;
-KDBSearchEngine::KDBSearchEngine (QObject * parent, const char *name):
+KDBSearchEngine::KDBSearchEngine (TQObject * parent, const char *name):
SearchEngine (parent, name)
{
edited = "unknown";
@@ -82,8 +82,8 @@ SearchEngine (parent, name)
dbOpened = false;
dbname = "";
lasterror = i18n ("No error");
- connect (this, SIGNAL (hasError (const QString &)),
- SLOT (setLastError (const QString &)));
+ connect (this, TQT_SIGNAL (hasError (const TQString &)),
+ TQT_SLOT (setLastError (const TQString &)));
IAmReady = true; // I don't know if it is a good idea, no DB loaded!!!
@@ -104,7 +104,7 @@ KDBSearchEngine::~KDBSearchEngine ()
bool
-KDBSearchEngine::loadDatabase (QString database, bool noask = false)
+KDBSearchEngine::loadDatabase (TQString database, bool noask = false)
{
bool ret = true;
bool asked = false;
@@ -116,7 +116,7 @@ KDBSearchEngine::loadDatabase (QString database, bool noask = false)
dm = 0;
}
- QDir dir (database);
+ TQDir dir (database);
if (!dir.exists ())
{
if (asked
@@ -124,19 +124,19 @@ KDBSearchEngine::loadDatabase (QString database, bool noask = false)
i18n
("Database folder does not exist:\n%1\n"
"Do you want to create it now?").
- arg (database), QString::null, i18n("Create Folder"), i18n("Do Not Create")) ==
+ arg (database), TQString::null, i18n("Create Folder"), i18n("Do Not Create")) ==
KMessageBox::Yes)
{
asked = true;
- QStringList dirList;
+ TQStringList dirList;
while (!dir.exists () && !dir.dirName ().isEmpty ())
{
dirList.prepend (dir.dirName ());
dir.setPath (dir.path () + "/..");
}
- for (QStringList::Iterator it = dirList.begin ();
+ for (TQStringList::Iterator it = dirList.begin ();
it != dirList.end (); ++it)
{
if (!dir.mkdir (*it))
@@ -161,10 +161,10 @@ KDBSearchEngine::loadDatabase (QString database, bool noask = false)
if (ret)
{
// test, if there are both of ,old and standard databases
- QString transFile = database + "/translations." + lang + ".db";
+ TQString transFile = database + "/translations." + lang + ".db";
- bool oldstuff = QFile::exists (transFile + ",old");
- bool newstuff = QFile::exists (transFile);
+ bool oldstuff = TQFile::exists (transFile + ",old");
+ bool newstuff = TQFile::exists (transFile);
if (oldstuff && newstuff)
{
@@ -188,11 +188,11 @@ KDBSearchEngine::loadDatabase (QString database, bool noask = false)
KMessageBox::Yes)
{
// remove the new files
- QFile::remove (transFile);
- QFile::remove (database + "/wordsindex." + lang +
+ TQFile::remove (transFile);
+ TQFile::remove (database + "/wordsindex." + lang +
".db");
- QFile::remove (database + "/keysindex." + lang + ".db");
- QFile::remove (database + "/catalogsinfo." + lang +
+ TQFile::remove (database + "/keysindex." + lang + ".db");
+ TQFile::remove (database + "/catalogsinfo." + lang +
".db");
// rename the old files
@@ -216,12 +216,12 @@ KDBSearchEngine::loadDatabase (QString database, bool noask = false)
KURL (database + "/catalogsinfo." + lang +
".db"), 0);
- QFile::remove (transFile + ",old");
- QFile::remove (database + "/wordsindex." + lang +
+ TQFile::remove (transFile + ",old");
+ TQFile::remove (database + "/wordsindex." + lang +
".db,old");
- QFile::remove (database + "/keysindex." + lang +
+ TQFile::remove (database + "/keysindex." + lang +
".db,old");
- QFile::remove (database + "/catalogsinfo." + lang +
+ TQFile::remove (database + "/catalogsinfo." + lang +
".db,old");
}
}
@@ -241,10 +241,10 @@ KDBSearchEngine::loadDatabase (QString database, bool noask = false)
(database + "/catalogsinfo." + lang + ".db,old"),
KURL (database + "/catalogsinfo." + lang + ".db"), 0);
- QFile::remove (transFile + ",old");
- QFile::remove (database + "/wordsindex." + lang + ".db,old");
- QFile::remove (database + "/keysindex." + lang + ".db,old");
- QFile::remove (database + "/catalogsinfo." + lang +
+ TQFile::remove (transFile + ",old");
+ TQFile::remove (database + "/wordsindex." + lang + ".db,old");
+ TQFile::remove (database + "/keysindex." + lang + ".db,old");
+ TQFile::remove (database + "/catalogsinfo." + lang +
".db,old");
}
@@ -255,7 +255,7 @@ KDBSearchEngine::loadDatabase (QString database, bool noask = false)
if (asked
|| KMessageBox::questionYesNo (0,
i18n
- ("Database files not found.\nDo you want to create them now?"), QString::null, i18n("Create"), i18n("Do Not Create"))
+ ("Database files not found.\nDo you want to create them now?"), TQString::null, i18n("Create"), i18n("Do Not Create"))
== KMessageBox::Yes)
{
//fprintf(stderr,"SI\n");
@@ -312,7 +312,7 @@ KDBSearchEngine::setCaseSensitive (bool sensitive)
*/
void
-KDBSearchEngine::setRemoveCharString (QString chartoremove)
+KDBSearchEngine::setRemoveCharString (TQString chartoremove)
{
remchar = chartoremove;
}
@@ -336,12 +336,12 @@ KDBSearchEngine::isSearching () const
*/
int
-KDBSearchEngine::addSearchString (QString searchString, int rule)
+KDBSearchEngine::addSearchString (TQString searchString, int rule)
{
if (searching || scanInProgress)
return -1;
SearchEntry e;
- e.string = QString (searchString);
+ e.string = TQString (searchString);
e.rules = rule;
searchStringList.append (e);
return searchStringList.count ();
@@ -354,7 +354,7 @@ KDBSearchEngine::addSearchString (QString searchString, int rule)
*/
bool
-KDBSearchEngine::startSearch (const QString & str, uint pluralForm,
+KDBSearchEngine::startSearch (const TQString & str, uint pluralForm,
const SearchFilter * filter)
{
@@ -376,7 +376,7 @@ KDBSearchEngine::startSearch (const QString & str, uint pluralForm,
}
bool
-KDBSearchEngine::startSearchInTranslation (QString s)
+KDBSearchEngine::startSearchInTranslation (TQString s)
{
if (autoUpdate)
@@ -418,8 +418,8 @@ KDBSearchEngine::openDb (bool noask = false)
bool
KDBSearchEngine::messagesForFilter (const SearchFilter * filter,
- QValueList < SearchResult > &resultList,
- QString & error)
+ TQValueList < SearchResult > &resultList,
+ TQString & error)
{
int count = 0;
@@ -452,7 +452,7 @@ KDBSearchEngine::messagesForFilter (const SearchFilter * filter,
return false;
}
- QString package = filter->location ();
+ TQString package = filter->location ();
int step = (totalRecord / 30) + 1;
int ntra, nref;
@@ -544,17 +544,17 @@ KDBSearchEngine::repeat ()
kdDebug (0) << "No kdelibs.po found!" << endl;
- QProgressDialog *pd =
- new QProgressDialog (i18n ("Looking for repetitions"), i18n ("Stop"),
+ TQProgressDialog *pd =
+ new TQProgressDialog (i18n ("Looking for repetitions"), i18n ("Stop"),
100);
- connect (this, SIGNAL (progress (int)), pd, SLOT (setProgress (int)));
- connect (this, SIGNAL (finished ()), pd, SLOT (close ()));
- connect (pd, SIGNAL (cancelled ()), this, SLOT (stopSearch ()));
+ connect (this, TQT_SIGNAL (progress (int)), pd, TQT_SLOT (setProgress (int)));
+ connect (this, TQT_SIGNAL (finished ()), pd, TQT_SLOT (close ()));
+ connect (pd, TQT_SIGNAL (cancelled ()), this, TQT_SLOT (stopSearch ()));
- QString txt = "// %1 repetitions, %2 translation(s)\ni18n(\"%3\");\n";
- QString id;
+ TQString txt = "// %1 repetitions, %2 translation(s)\ni18n(\"%3\");\n";
+ TQString id;
int min;
bool ok = false;
@@ -571,7 +571,7 @@ KDBSearchEngine::repeat ()
progressStarts (i18n ("Searching repeated string"));
- static QTextEdit *mle = new QTextEdit ();
+ static TQTextEdit *mle = new TQTextEdit ();
mle->clear ();
bool inlibs;
@@ -671,10 +671,10 @@ KDBSearchEngine::startSearchNow (int searchmode)
intra = searchmode & MD_IN_TRANSLATION;
- QString msgIdFound;
- QString msgId;
- QString msgStr;
- //QString msgIdRequested;
+ TQString msgIdFound;
+ TQString msgId;
+ TQString msgStr;
+ //TQString msgIdRequested;
SearchResult *aresult;
TranslationInfo *adescription;
SearchList searchList;
@@ -682,13 +682,13 @@ KDBSearchEngine::startSearchNow (int searchmode)
len = remchar.length ();
int n, m; //,word;
- QString *id;
+ TQString *id;
- QString mainRequest = searchStringList[0].string;
+ TQString mainRequest = searchStringList[0].string;
SearchList::Iterator it, it1;
- QString *idMod;
+ TQString *idMod;
bool foundSomething = false;
searchList = searchStringList; //Create a copy and modify it
@@ -705,7 +705,7 @@ KDBSearchEngine::startSearchNow (int searchmode)
}
if (comm)
- idMod->replace (QRegExp ("\\_\\:.*\\\\n"), ""); //Read it from catalog !!! (NOT ONLY HERE)
+ idMod->replace (TQRegExp ("\\_\\:.*\\\\n"), ""); //Read it from catalog !!! (NOT ONLY HERE)
if (norm)
@@ -728,7 +728,7 @@ KDBSearchEngine::startSearchNow (int searchmode)
//Now we can browse the whole db or the "good keys"
- QValueList < KeyAndScore > goodkeys;
+ TQValueList < KeyAndScore > goodkeys;
int totalprogress;
bool gk = (searchmode == MD_GOOD_KEYS) || allkey;
@@ -807,7 +807,7 @@ KDBSearchEngine::startSearchNow (int searchmode)
//Remove context information from id found
if (comm)
- msgId.replace (QRegExp ("\\_\\:.*\\\\n"), "");
+ msgId.replace (TQRegExp ("\\_\\:.*\\\\n"), "");
if (norm)
@@ -845,7 +845,7 @@ KDBSearchEngine::startSearchNow (int searchmode)
//Remove context information from id found
if (comm)
msgId.
- replace (QRegExp ("\\_\\:.*\\\\n"),
+ replace (TQRegExp ("\\_\\:.*\\\\n"),
"");
@@ -878,7 +878,7 @@ KDBSearchEngine::startSearchNow (int searchmode)
if (!foundExact && (rules & RegExp))
{
- QRegExp reg (*idMod);
+ TQRegExp reg (*idMod);
regexp = (reg.search (msgId) != -1);
}
else
@@ -996,7 +996,7 @@ KDBSearchEngine::startSearchNow (int searchmode)
*/
bool
-KDBSearchEngine::startSingleSearch (QString searchString,
+KDBSearchEngine::startSingleSearch (TQString searchString,
unsigned int pattern1Limit,
unsigned int /*pattern2Limit */ ,
bool inTranslation)
@@ -1013,7 +1013,7 @@ KDBSearchEngine::startSingleSearch (QString searchString,
- QRegExp reg ("[a-zA-Z0-9_%" /*+remchar */ + regaddchar + "]+");
+ TQRegExp reg ("[a-zA-Z0-9_%" /*+remchar */ + regaddchar + "]+");
while ((in = reg.search (searchString, in + len)) != -1)
{
nw++;
@@ -1033,7 +1033,7 @@ KDBSearchEngine::startSingleSearch (QString searchString,
{
in = reg.search (searchString, in + len);
len = reg.matchedLength ();
- QString regToAdd = searchString;
+ TQString regToAdd = searchString;
regToAdd.replace (in, len, "[a-zA-Z0-9_%" + regaddchar + "]*");
regToAdd.append ("$");
regToAdd.prepend ("^");
@@ -1055,7 +1055,7 @@ KDBSearchEngine::startSingleSearch (QString searchString,
Start a search for a list of string
*/
-//bool KDBSearchEngine::startListSearch(QPtrList<QString> searchStrList)
+//bool KDBSearchEngine::startListSearch(TQPtrList<TQString> searchStrList)
//{
// searchStringList=searchStrList;
// return startSearchNow();
@@ -1067,7 +1067,7 @@ KDBSearchEngine::startSingleSearch (QString searchString,
void
-KDBSearchEngine::setLanguageCode (const QString & ll)
+KDBSearchEngine::setLanguageCode (const TQString & ll)
{
if (ll == lang)
return;
@@ -1079,8 +1079,8 @@ KDBSearchEngine::setLanguageCode (const QString & ll)
}
void
-KDBSearchEngine::setLanguage (const QString & languageCode,
- const QString & /*languageName */ )
+KDBSearchEngine::setLanguage (const TQString & languageCode,
+ const TQString & /*languageName */ )
{
setLanguageCode (languageCode);
}
@@ -1147,17 +1147,17 @@ KDBSearchEngine::saveSettings (KConfigBase * config)
void
KDBSearchEngine::readSettings (KConfigBase * config)
{
- QString newName;
+ TQString newName;
KConfigGroupSaver cgs (config, "KDBSearchEngine");
- QString defaultLang;
- QString oldLang = lang;
+ TQString defaultLang;
+ TQString oldLang = lang;
Defaults::Identity def;
defaultLang = def.languageCode ();
lang = config->readEntry ("Language", defaultLang);
- QString defaultDir;
+ TQString defaultDir;
KStandardDirs *dirs = KGlobal::dirs ();
if (dirs)
{
@@ -1203,20 +1203,20 @@ KDBSearchEngine::readSettings (KConfigBase * config)
}
PrefWidget *
-KDBSearchEngine::preferencesWidget (QWidget * parent)
+KDBSearchEngine::preferencesWidget (TQWidget * parent)
{
pw = new PreferencesWidget (parent);
setSettings ();
- connect (pw, SIGNAL (restoreNow ()), this, SLOT (setSettings ()));
- connect (pw, SIGNAL (applyNow ()), this, SLOT (updateSettings ()));
- connect (pw, SIGNAL (destroyed ()), this, SLOT (prefDestr ()));
- connect (pw->dbpw->scanPB_2, SIGNAL (clicked ()), this, SLOT (scan ()));
- connect (pw->dbpw->scanrecPB, SIGNAL (clicked ()), this,
- SLOT (scanRecur ()));
- connect (pw->dbpw->scanFilePB, SIGNAL (clicked ()), this,
- SLOT (scanFile ()));
- connect (pw->dbpw->repeatPB, SIGNAL (clicked ()), this, SLOT (repeat ()));
+ connect (pw, TQT_SIGNAL (restoreNow ()), this, TQT_SLOT (setSettings ()));
+ connect (pw, TQT_SIGNAL (applyNow ()), this, TQT_SLOT (updateSettings ()));
+ connect (pw, TQT_SIGNAL (destroyed ()), this, TQT_SLOT (prefDestr ()));
+ connect (pw->dbpw->scanPB_2, TQT_SIGNAL (clicked ()), this, TQT_SLOT (scan ()));
+ connect (pw->dbpw->scanrecPB, TQT_SIGNAL (clicked ()), this,
+ TQT_SLOT (scanRecur ()));
+ connect (pw->dbpw->scanFilePB, TQT_SIGNAL (clicked ()), this,
+ TQT_SLOT (scanFile ()));
+ connect (pw->dbpw->repeatPB, TQT_SIGNAL (clicked ()), this, TQT_SLOT (repeat ()));
return pw;
@@ -1233,7 +1233,7 @@ KDBSearchEngine::scanRecur ()
return;
scanInProgress = true;
PoScanner *sca = new PoScanner (dm, this, "Po Scanner");
- QString cvsdir;
+ TQString cvsdir;
cvsdir =
KFileDialog::getExistingDirectory ("", 0,
i18n
@@ -1246,32 +1246,32 @@ KDBSearchEngine::scanRecur ()
}
if (pw)
{
- connect (sca, SIGNAL (patternProgress (int)), pw->dbpw->totalPB,
- SLOT (setProgress (int)));
- connect (sca, SIGNAL (fileLoading (int)), pw->dbpw->loadingPB,
- SLOT (setProgress (int)));
- connect (sca, SIGNAL (fileProgress (int)), pw->dbpw->processPB,
- SLOT (setProgress (int)));
+ connect (sca, TQT_SIGNAL (patternProgress (int)), pw->dbpw->totalPB,
+ TQT_SLOT (setProgress (int)));
+ connect (sca, TQT_SIGNAL (fileLoading (int)), pw->dbpw->loadingPB,
+ TQT_SLOT (setProgress (int)));
+ connect (sca, TQT_SIGNAL (fileProgress (int)), pw->dbpw->processPB,
+ TQT_SLOT (setProgress (int)));
}
- connect (sca, SIGNAL (patternProgress (int)), SIGNAL (progress (int))); //Kbabel progress bar
+ connect (sca, TQT_SIGNAL (patternProgress (int)), TQT_SIGNAL (progress (int))); //Kbabel progress bar
- connect (sca, SIGNAL (added (int)), pw, SLOT (setEntries (int)));
- connect (sca, SIGNAL (filename (QString)), pw, SLOT (setName (QString)));
+ connect (sca, TQT_SIGNAL (added (int)), pw, TQT_SLOT (setEntries (int)));
+ connect (sca, TQT_SIGNAL (filename (TQString)), pw, TQT_SLOT (setName (TQString)));
progressStarts (i18n ("Scanning folder %1").arg (cvsdir));
- connect (sca, SIGNAL (patternFinished ()), SIGNAL (progressEnds ()));
+ connect (sca, TQT_SIGNAL (patternFinished ()), TQT_SIGNAL (progressEnds ()));
sca->scanPattern (cvsdir, "*.po", true);
- disconnect (this, SIGNAL (progress (int)));
-//disconnect(SIGNAL(patternStarted()),this,SIGNAL(started()) );
- disconnect (this, SIGNAL (progressEnds ()));
+ disconnect (this, TQT_SIGNAL (progress (int)));
+//disconnect(TQT_SIGNAL(patternStarted()),this,TQT_SIGNAL(started()) );
+ disconnect (this, TQT_SIGNAL (progressEnds ()));
if (pw)
{
- disconnect (pw->dbpw->totalPB, SLOT (setProgress (int)));
- disconnect (pw->dbpw->loadingPB, SLOT (setProgress (int)));
- disconnect (pw->dbpw->processPB, SLOT (setProgress (int)));
+ disconnect (pw->dbpw->totalPB, TQT_SLOT (setProgress (int)));
+ disconnect (pw->dbpw->loadingPB, TQT_SLOT (setProgress (int)));
+ disconnect (pw->dbpw->processPB, TQT_SLOT (setProgress (int)));
}
totalRecord = dm->count ();
@@ -1292,7 +1292,7 @@ KDBSearchEngine::scan ()
return;
scanInProgress = true;
PoScanner *sca = new PoScanner (dm, this, "Po Scanner");
- QString cvsdir;
+ TQString cvsdir;
cvsdir =
KFileDialog::getExistingDirectory ("", 0,
@@ -1304,32 +1304,32 @@ KDBSearchEngine::scan ()
}
if (pw)
{
- connect (sca, SIGNAL (patternProgress (int)), pw->dbpw->totalPB,
- SLOT (setProgress (int)));
- connect (sca, SIGNAL (fileLoading (int)), pw->dbpw->loadingPB,
- SLOT (setProgress (int)));
- connect (sca, SIGNAL (fileProgress (int)), pw->dbpw->processPB,
- SLOT (setProgress (int)));
+ connect (sca, TQT_SIGNAL (patternProgress (int)), pw->dbpw->totalPB,
+ TQT_SLOT (setProgress (int)));
+ connect (sca, TQT_SIGNAL (fileLoading (int)), pw->dbpw->loadingPB,
+ TQT_SLOT (setProgress (int)));
+ connect (sca, TQT_SIGNAL (fileProgress (int)), pw->dbpw->processPB,
+ TQT_SLOT (setProgress (int)));
}
- connect (sca, SIGNAL (patternProgress (int)), SIGNAL (progress (int)));
+ connect (sca, TQT_SIGNAL (patternProgress (int)), TQT_SIGNAL (progress (int)));
progressStarts (i18n ("Scanning folder %1").arg (cvsdir));
- connect (sca, SIGNAL (patternFinished ()), SIGNAL (progressEnds ()));
+ connect (sca, TQT_SIGNAL (patternFinished ()), TQT_SIGNAL (progressEnds ()));
- connect (sca, SIGNAL (added (int)), pw, SLOT (setEntries (int)));
- connect (sca, SIGNAL (filename (QString)), pw, SLOT (setName (QString)));
+ connect (sca, TQT_SIGNAL (added (int)), pw, TQT_SLOT (setEntries (int)));
+ connect (sca, TQT_SIGNAL (filename (TQString)), pw, TQT_SLOT (setName (TQString)));
sca->scanPattern (cvsdir, "*.po", false);
- disconnect (this, SIGNAL (progress (int)));
-//disconnect(SIGNAL(patternStarted()),this,SIGNAL(started()) );
- disconnect (this, SIGNAL (progressEnds ()));
+ disconnect (this, TQT_SIGNAL (progress (int)));
+//disconnect(TQT_SIGNAL(patternStarted()),this,TQT_SIGNAL(started()) );
+ disconnect (this, TQT_SIGNAL (progressEnds ()));
if (pw)
{
- disconnect (pw->dbpw->totalPB, SLOT (setProgress (int)));
- disconnect (pw->dbpw->loadingPB, SLOT (setProgress (int)));
- disconnect (pw->dbpw->processPB, SLOT (setProgress (int)));
+ disconnect (pw->dbpw->totalPB, TQT_SLOT (setProgress (int)));
+ disconnect (pw->dbpw->loadingPB, TQT_SLOT (setProgress (int)));
+ disconnect (pw->dbpw->processPB, TQT_SLOT (setProgress (int)));
}
totalRecord = dm->count ();
@@ -1350,7 +1350,7 @@ KDBSearchEngine::scanFile ()
return;
scanInProgress = true;
PoScanner *sca = new PoScanner (dm, this, "Po Scanner");
- QString cvsdir;
+ TQString cvsdir;
pw->dbpw->totalPB->setProgress (0);
cvsdir =
@@ -1363,31 +1363,31 @@ KDBSearchEngine::scanFile ()
}
if (pw)
{
- connect (sca, SIGNAL (fileLoading (int)), pw->dbpw->loadingPB,
- SLOT (setProgress (int)));
- connect (sca, SIGNAL (fileProgress (int)), pw->dbpw->processPB,
- SLOT (setProgress (int)));
+ connect (sca, TQT_SIGNAL (fileLoading (int)), pw->dbpw->loadingPB,
+ TQT_SLOT (setProgress (int)));
+ connect (sca, TQT_SIGNAL (fileProgress (int)), pw->dbpw->processPB,
+ TQT_SLOT (setProgress (int)));
}
- connect (sca, SIGNAL (fileProgress (int)), SIGNAL (progress (int)));
+ connect (sca, TQT_SIGNAL (fileProgress (int)), TQT_SIGNAL (progress (int)));
progressStarts (i18n ("Scanning file %1").arg (directory (cvsdir, 0)));
- connect (sca, SIGNAL (fileFinished ()), SIGNAL (progressEnds ()));
+ connect (sca, TQT_SIGNAL (fileFinished ()), TQT_SIGNAL (progressEnds ()));
- connect (sca, SIGNAL (added (int)), pw, SLOT (setEntries (int)));
- connect (sca, SIGNAL (filename (QString)), pw, SLOT (setName (QString)));
+ connect (sca, TQT_SIGNAL (added (int)), pw, TQT_SLOT (setEntries (int)));
+ connect (sca, TQT_SIGNAL (filename (TQString)), pw, TQT_SLOT (setName (TQString)));
sca->scanFile (cvsdir);
- sca->disconnect (SIGNAL (fileProgress (int)), this,
- SIGNAL (progress (int)));
-//disconnect(SIGNAL(patternStarted()),this,SIGNAL(started()) );
- sca->disconnect (SIGNAL (fileFinished ()), this,
- SIGNAL (progressEnds ()));
+ sca->disconnect (TQT_SIGNAL (fileProgress (int)), this,
+ TQT_SIGNAL (progress (int)));
+//disconnect(TQT_SIGNAL(patternStarted()),this,TQT_SIGNAL(started()) );
+ sca->disconnect (TQT_SIGNAL (fileFinished ()), this,
+ TQT_SIGNAL (progressEnds ()));
if (pw)
{
- disconnect (pw->dbpw->loadingPB, SLOT (setProgress (int)));
- disconnect (pw->dbpw->processPB, SLOT (setProgress (int)));
+ disconnect (pw->dbpw->loadingPB, TQT_SLOT (setProgress (int)));
+ disconnect (pw->dbpw->processPB, TQT_SLOT (setProgress (int)));
}
totalRecord = dm->count ();
@@ -1415,7 +1415,7 @@ KDBSearchEngine::name () const
QString
KDBSearchEngine::id () const
{
- return QString ("KDBSearchEngine");
+ return TQString ("KDBSearchEngine");
}
QString
@@ -1488,7 +1488,7 @@ KDBSearchEngine::updateSettings ()
if (pw == 0)
return;
- QString newName = pw->dbpw->dirInput->url ();
+ TQString newName = pw->dbpw->dirInput->url ();
if (newName != dbname)
{
@@ -1547,16 +1547,16 @@ KDBSearchEngine::updateSettings ()
}
void
-KDBSearchEngine::setLastError (const QString & er)
+KDBSearchEngine::setLastError (const TQString & er)
{
lasterror = er;
}
QString
-KDBSearchEngine::translate (const QString & text, const uint pluralForm)
+KDBSearchEngine::translate (const TQString & text, const uint pluralForm)
{
if (!openDb ())
- return QString::null;
+ return TQString::null;
/*
if(!dbOpened)
@@ -1566,7 +1566,7 @@ if(!dbOpened)
{
//emit anerror
hasError(i18n("Database not opened"));
- return QString::null;
+ return TQString::null;
}
}
*/
@@ -1574,7 +1574,7 @@ if(!dbOpened)
DataBaseItem dbit = dm->getItem (text);
if (dbit.isNull ())
- return QString::null;
+ return TQString::null;
if (dbit.numTra == 1)
return dbit.translations[0].translation;
@@ -1592,34 +1592,34 @@ if(!dbOpened)
}
-QValueList < KeyAndScore > KDBSearchEngine::searchWords (QString phrase,
+TQValueList < KeyAndScore > KDBSearchEngine::searchWords (TQString phrase,
int threshold,
int thresholdorig,
uint32 max)
{
- QValueList < QString > wordlist;
+ TQValueList < TQString > wordlist;
if (!openDb ())
{
- QValueList < KeyAndScore > a;
+ TQValueList < KeyAndScore > a;
return a;
}
progressStarts (i18n ("Searching words"));
- QValueList < QString >::Iterator wlit;
+ TQValueList < TQString >::Iterator wlit;
wordlist = dm->wordsIn (phrase);
int
nw = wordlist.count ();
-//QMemArray<WordItem> wi(nw);
- QMemArray < uint32 > numofloc (nw), currentloc (nw);
- QMemArray < int >
+//TQMemArray<WordItem> wi(nw);
+ TQMemArray < uint32 > numofloc (nw), currentloc (nw);
+ TQMemArray < int >
score (nw);
- QMemArray < uint32 * >loc (nw), locorig (nw);
- QValueList < uint32 > resloc;
- QValueList < int >
+ TQMemArray < uint32 * >loc (nw), locorig (nw);
+ TQValueList < uint32 > resloc;
+ TQValueList < int >
resfound;
- QValueList < KeyAndScore > keylist;
+ TQValueList < KeyAndScore > keylist;
//wi.resize(wordlist.count());
int
totalprogress = 0;
@@ -1837,7 +1837,7 @@ QValueList < KeyAndScore > KDBSearchEngine::searchWords (QString phrase,
KeyAndScore
key (strkey, sc);
-// kdDebug(0) << (QString) key << " [" << key.score << "]" << endl;
+// kdDebug(0) << (TQString) key << " [" << key.score << "]" << endl;
keylist.append (key);
}
@@ -1852,12 +1852,12 @@ QValueList < KeyAndScore > KDBSearchEngine::searchWords (QString phrase,
}
void
-KDBSearchEngine::stringChanged (const QStringList & o,
- const QString & translated, const uint,
- const QString &)
+KDBSearchEngine::stringChanged (const TQStringList & o,
+ const TQString & translated, const uint,
+ const TQString &)
{
- QString orig = o.first (); // FIXME: plural forms
+ TQString orig = o.first (); // FIXME: plural forms
// skip empty originals or translated texts
if (orig.isEmpty () || translated.isEmpty ())
@@ -1879,19 +1879,19 @@ KDBSearchEngine::stringChanged (const QStringList & o,
}
void
-KDBSearchEngine::setEditedFile (const QString & file)
+KDBSearchEngine::setEditedFile (const TQString & file)
{
edited = file; //kdDebug(0) << edited << endl;
}
-KeyAndScore::KeyAndScore (const QString & a, int sc):
-QString (a)
+KeyAndScore::KeyAndScore (const TQString & a, int sc):
+TQString (a)
{
score = sc;
}
-KeyAndScore::KeyAndScore ():QString ()
+KeyAndScore::KeyAndScore ():TQString ()
{
score = 0;
}
diff --git a/kbabel/kbabeldict/modules/dbsearchengine/KDBSearchEngine.h b/kbabel/kbabeldict/modules/dbsearchengine/KDBSearchEngine.h
index 058444db..d948bbd4 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine/KDBSearchEngine.h
+++ b/kbabel/kbabeldict/modules/dbsearchengine/KDBSearchEngine.h
@@ -42,11 +42,11 @@
#ifndef _KDBSEARCH_ENGINE_
#define _KDBSEARCH_ENGINE_
-#include <qobject.h>
-#include <qptrlist.h>
-#include <qstring.h>
-#include <qmemarray.h>
-#include <qvaluelist.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
+#include <tqmemarray.h>
+#include <tqvaluelist.h>
#include "database.h"
@@ -63,7 +63,7 @@
class SearchEntry
{
public:
- QString string;
+ TQString string;
int rules;
};
@@ -71,22 +71,22 @@ class KeyAndScore : public QString
{
public:
KeyAndScore();
- KeyAndScore(const QString &a,int sc);
+ KeyAndScore(const TQString &a,int sc);
int score;
};
-typedef QValueList<SearchEntry> SearchList;
+typedef TQValueList<SearchEntry> SearchList;
/* USE searchengine.h structure
class CatalogDescription
{
public:
char language[6]; // How many character chinese language needs?
- // QString is better ?
- QString filename;
- QString dateOfScan; //When you add this to database (last time)
- QString authorOfScan;
- QString fileHeader; //msgid ""
+ // TQString is better ?
+ TQString filename;
+ TQString dateOfScan; //When you add this to database (last time)
+ TQString authorOfScan;
+ TQString fileHeader; //msgid ""
};
*/
@@ -98,7 +98,7 @@ class KDBSearchEngine : public SearchEngine
public:
- KDBSearchEngine(QObject *parent=0,const char *name=0);
+ KDBSearchEngine(TQObject *parent=0,const char *name=0);
~KDBSearchEngine();
enum Rules {Equal = 1, Contains = 2, Contained = 4, RegExp = 8};
enum FormatRules { Dots = 1, Ampersand = 2, FirstWordUpper = 4, //Not yet used
@@ -108,7 +108,7 @@ public:
Set the directory where db file are located
*/
- void setDBName(QString filename);
+ void setDBName(TQString filename);
/*
Set if the research have to consider multiple spaces as a single one.
@@ -136,7 +136,7 @@ public:
*/
- void setRemoveCharString(QString chartoremove);
+ void setRemoveCharString(TQString chartoremove);
/*
Enable an output filter that format Uppercase/lowercase
@@ -179,13 +179,13 @@ public:
virtual bool messagesForFilter(const SearchFilter* filter
- , QValueList<SearchResult>& resultList, QString& error);
+ , TQValueList<SearchResult>& resultList, TQString& error);
- virtual void setLanguageCode(const QString& lang);
- virtual void setLanguage(const QString& languageCode, const QString& languageName);
+ virtual void setLanguageCode(const TQString& lang);
+ virtual void setLanguage(const TQString& languageCode, const TQString& languageName);
- virtual void setEditedFile(const QString& file);
+ virtual void setEditedFile(const TQString& file);
virtual bool isReady() const ;
virtual bool isSearching() const;
@@ -193,20 +193,20 @@ public:
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 QString translate(const QString& text, uint pluralForm);
+ virtual TQString translate(const TQString& text, uint pluralForm);
- virtual void stringChanged( const QStringList& orig, const QString& translated
- , const uint translationPluralForm, const QString& description);
+ virtual void stringChanged( const TQStringList& orig, const TQString& translated
+ , const uint translationPluralForm, const TQString& description);
public slots:
@@ -221,7 +221,7 @@ public slots:
progress)
*/
- int addSearchString(QString searchString, int rule=Equal);
+ int addSearchString(TQString searchString, int rule=Equal);
/*
Start the research in the database of all the string in the list
@@ -244,14 +244,14 @@ public slots:
*/
- bool startSingleSearch(QString searchString,unsigned int pattern1Limit,unsigned int pattern2Limit,
+ bool startSingleSearch(TQString searchString,unsigned int pattern1Limit,unsigned int pattern2Limit,
bool inTranslation=false);
/*
Start a search for a list of string
*/
-// bool startListSearch(QPtrList<QString> searchStrList);
+// bool startListSearch(TQPtrList<TQString> searchStrList);
/*
* Return a list of key in database that contains some
@@ -263,7 +263,7 @@ public slots:
* max is the maximum number of results
*/
-QValueList<KeyAndScore> searchWords(QString phrase,int threshold,
+TQValueList<KeyAndScore> searchWords(TQString phrase,int threshold,
int thresholdorig ,uint32 max);
@@ -272,8 +272,8 @@ QValueList<KeyAndScore> searchWords(QString phrase,int threshold,
*/
virtual void stopSearch();
- virtual bool startSearch(const QString& text, uint pluralForm, const SearchFilter* filter);
- virtual bool startSearchInTranslation(QString s);
+ virtual bool startSearch(const TQString& text, uint pluralForm, const SearchFilter* filter);
+ virtual bool startSearchInTranslation(TQString s);
void clearList();
signals:
@@ -282,13 +282,13 @@ private slots:
void updateSettings(); //Use widget settings
void setSettings(); //Fill widget with actual settings
void prefDestr();
- void setLastError(const QString&);
+ void setLastError(const TQString&);
void repeat();
private:
/*
Reload database info (and keep the dbase opened).
*/
- bool loadDatabase(QString database,bool);
+ bool loadDatabase(TQString database,bool);
bool openDb(bool);
@@ -312,22 +312,22 @@ private:
bool norm,sens,comm;
int numofresult;
char * filename;
- QString remchar;
- QString regaddchar;
- QString dbname;
+ TQString remchar;
+ TQString regaddchar;
+ TQString dbname;
bool dbOpened;
// GDBM_FILE db;
DataBaseManager * dm;
// datum key, value;
-// QMemArray<CatalogDescription *> catinfo;
+// TQMemArray<CatalogDescription *> catinfo;
SearchList searchStringList;
int totalRecord;
- QString lasterror;
- QString lang;
+ TQString lasterror;
+ TQString lang;
bool scanInProgress;
- QString edited;
+ TQString edited;
bool autoup;
- QString autoauthor;
+ TQString autoauthor;
};
#endif
diff --git a/kbabel/kbabeldict/modules/dbsearchengine/database.cpp b/kbabel/kbabeldict/modules/dbsearchengine/database.cpp
index 003a3a95..0847d594 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine/database.cpp
+++ b/kbabel/kbabeldict/modules/dbsearchengine/database.cpp
@@ -36,12 +36,12 @@
#include "database.h"
#include <unistd.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <ktempfile.h>
#include <kio/netaccess.h>
-WordItem::WordItem (char *data, QString w)
+WordItem::WordItem (char *data, TQString w)
{
word = w;
@@ -58,7 +58,7 @@ WordItem::WordItem (char *data, QString w)
}
-WordItem::WordItem (QString w)
+WordItem::WordItem (TQString w)
{
locations = NULL;
count = 0;
@@ -100,7 +100,7 @@ InfoItem::InfoItem ()
language = "No language";
}
-InfoItem::InfoItem (const char *rawData, QString lang)
+InfoItem::InfoItem (const char *rawData, TQString lang)
{
const char *rd;
rd = rawData;
@@ -110,16 +110,16 @@ InfoItem::InfoItem (const char *rawData, QString lang)
charset = "Utf8";
- catalogName = QString::fromUtf8 (rd);
+ catalogName = TQString::fromUtf8 (rd);
len = strlen (rd) + 1;
rd += len;
- lastTranslator = QString::fromUtf8 (rd);
+ lastTranslator = TQString::fromUtf8 (rd);
len = strlen (rd) + 1;
rd += len;
secs = *(unsigned int *) rd;
revisionDate.setTime_t (secs);
rd += 4;
- lastFullPath = QString::fromUtf8 (rd);
+ lastFullPath = TQString::fromUtf8 (rd);
len = strlen (rd) + 1;
rd += len;
@@ -139,8 +139,8 @@ InfoItem::rawData (char *rawData)
rd += strlen (rd) + 1;
- //QDate Time problem!!!!!!!!!!!
- QDateTime zeroDate;
+ //TQDate Time problem!!!!!!!!!!!
+ TQDateTime zeroDate;
zeroDate.setTime_t (0);
*(unsigned int *) rd = -revisionDate.secsTo (zeroDate);
rd += 4;
@@ -168,7 +168,7 @@ InfoItem::size ()
// this is a quick hack to copy a local file
int
-copy_hack (QFile & input, QFile & output)
+copy_hack (TQFile & input, TQFile & output)
{
if (!input.isOpen ())
{
@@ -204,7 +204,7 @@ DataBaseItem::DataBaseItem (char *_key, char *_data)
{
char *data = _data;
- key = QString::fromUtf8 (_key);
+ key = TQString::fromUtf8 (_key);
unsigned int i, r;
numTra = *(uint32 *) data;
@@ -228,7 +228,7 @@ DataBaseItem::DataBaseItem (char *_key, char *_data)
tr.infoRef.append (ref);
}
- tr.translation = QString::fromUtf8 ((const char *) data);
+ tr.translation = TQString::fromUtf8 ((const char *) data);
translations.append (tr);
data += strlen (data) + 1;
@@ -293,11 +293,11 @@ DataBaseItem::toRawData (char *_data)
}
-DataBaseManager::DataBaseManager (QString directory, QString lang,
- QObject * parent, const char *name):
-QObject (parent, name)
+DataBaseManager::DataBaseManager (TQString directory, TQString lang,
+ TQObject * parent, const char *name):
+TQObject (parent, name)
{
- QString filename;
+ TQString filename;
language = lang;
iAmOk = true;
@@ -312,22 +312,22 @@ void
DataBaseManager::openDataBase ()
{
kdDebug () << "Opendatabase" << endl;
- QString directory;
+ TQString directory;
directory = basedir;
- QString ll = "." + language;
+ TQString ll = "." + language;
if (ll == ".")
ll = ".NOLANG";
- QString transfilename = "%1/translations%2.db";
+ TQString transfilename = "%1/translations%2.db";
transfilename = transfilename.arg (directory).arg (ll);
- QString infofilename = "%1/catalogsinfo%2.db";
+ TQString infofilename = "%1/catalogsinfo%2.db";
infofilename = infofilename.arg (directory).arg (ll);
- QString wordsfilename = "%1/wordsindex%2.db";
+ TQString wordsfilename = "%1/wordsindex%2.db";
wordsfilename = wordsfilename.arg (directory).arg (ll);
- QString keysfilename = "%1/keysindex%2.db";
+ TQString keysfilename = "%1/keysindex%2.db";
keysfilename = keysfilename.arg (directory).arg (ll);
cursor = 0;
@@ -354,7 +354,7 @@ DataBaseManager::openDataBase ()
KTempFile transFile, infoFile, keysFile, wordsFile;
// do the upgrade on the translation file
- QFile transfilenameFile (transfilename);
+ TQFile transfilenameFile (transfilename);
if ((ret = copy_hack (transfilenameFile, *transFile.file ())) == 0)
{
@@ -373,7 +373,7 @@ DataBaseManager::openDataBase ()
}
// do the upgrade on the info file
- QFile infofilenameFile (infofilename);
+ TQFile infofilenameFile (infofilename);
if ((ret = copy_hack (infofilenameFile, *infoFile.file ())) == 0)
{
ret =
@@ -394,7 +394,7 @@ DataBaseManager::openDataBase ()
}
// do the upgrade on the words file
- QFile wordfilenameFile (wordsfilename);
+ TQFile wordfilenameFile (wordsfilename);
if ((ret = copy_hack (wordfilenameFile, *wordsFile.file ())) == 0)
{
ret =
@@ -415,7 +415,7 @@ DataBaseManager::openDataBase ()
}
// do the upgrade on the keys file
- QFile keysfilenameFile (keysfilename);
+ TQFile keysfilenameFile (keysfilename);
if ((ret = copy_hack (keysfilenameFile, *keysFile.file ())) == 0)
{
ret =
@@ -620,11 +620,11 @@ DataBaseManager::putItem (DataBaseItem * item, bool ow)
{
uint32 location = loc;
- QValueList < QString > wlist;
+ TQValueList < TQString > wlist;
wlist = wordsIn (item->key);
- QValueList < QString >::Iterator wlistit;
+ TQValueList < TQString >::Iterator wlistit;
for (wlistit = wlist.begin (); wlistit != wlist.end (); ++wlistit)
{
@@ -641,7 +641,7 @@ DataBaseManager::putItem (DataBaseItem * item, bool ow)
}
DataBaseItem
-DataBaseManager::getItem (QString key)
+DataBaseManager::getItem (TQString key)
{
if (!iAmOk)
return DataBaseItem ();
@@ -702,7 +702,7 @@ DataBaseManager::cursorGet (uint32 flags)
}
else
{
- kdDebug (KBABEL_SEARCH) << QString ("...cursor getting...%1").
+ kdDebug (KBABEL_SEARCH) << TQString ("...cursor getting...%1").
arg (ret) << endl;
return DataBaseItem ();
@@ -770,11 +770,11 @@ DataBaseManager::current ()
}
int
-DataBaseManager::createDataBase (QString directory,
- QString language, int mode)
+DataBaseManager::createDataBase (TQString directory,
+ TQString language, int mode)
{
- QString filename;
- QString ll = "." + language;
+ TQString filename;
+ TQString ll = "." + language;
if (ll == ".")
ll = ".NOLANG";
filename = "%1/translations%2.db";
@@ -782,7 +782,7 @@ DataBaseManager::createDataBase (QString directory,
rename (filename.local8Bit (), filename.local8Bit () + ",old");
-//kdDebug(0) << QString("Creating %1").arg(filename) << endl;
+//kdDebug(0) << TQString("Creating %1").arg(filename) << endl;
iAmOk = true;
@@ -860,7 +860,7 @@ DataBaseManager::createDataBase (QString directory,
if (iAmOk)
loadInfo ();
else
- kdDebug (KBABEL_SEARCH) << QString ("I am NOT ok : %1").
+ kdDebug (KBABEL_SEARCH) << TQString ("I am NOT ok : %1").
arg (ret) << endl;
//THIS IS WRONG, rewrite the error handling.
@@ -889,7 +889,7 @@ DataBaseManager::getCatalogInfo (int n)
return InfoItem ();
}
-// kdDebug(0) << QString("Trad %1").arg(ret) << endl;
+// kdDebug(0) << TQString("Trad %1").arg(ret) << endl;
InfoItem it ((char *) data.data, language);
//free(data.data); // Read docu for this!!!!
@@ -936,10 +936,10 @@ DataBaseManager::addCatalogInfo (InfoItem * catInfo, int cat = -1)
}
int
-DataBaseManager::searchCatalogInfo (QString location)
+DataBaseManager::searchCatalogInfo (TQString location)
{
int n = 0;
- QValueList < InfoItem >::Iterator it;
+ TQValueList < InfoItem >::Iterator it;
for (it = info.begin (); it != info.end (); ++it)
{
n++;
@@ -998,11 +998,11 @@ DataBaseManager::loadInfo ()
}
-QValueList < QString > DataBaseManager::wordsIn (QString string)
+TQValueList < TQString > DataBaseManager::wordsIn (TQString string)
{
QString
a;
- QValueList < QString > words;
+ TQValueList < TQString > words;
int
i,
l;
@@ -1036,10 +1036,10 @@ QValueList < QString > DataBaseManager::wordsIn (QString string)
WordItem
-DataBaseManager::getWordLocations (QString word)
+DataBaseManager::getWordLocations (TQString word)
{
- QString keystring = word.lower ();
+ TQString keystring = word.lower ();
DBT key;
DBT data;
@@ -1080,10 +1080,10 @@ DataBaseManager::getWordLocations (QString word)
bool
-DataBaseManager::addLocation (QString word, unsigned int location)
+DataBaseManager::addLocation (TQString word, unsigned int location)
{
- QString keystring = word.lower ();
+ TQString keystring = word.lower ();
DBT key;
@@ -1289,7 +1289,7 @@ DataBaseManager::addLocation (QString word, unsigned int location)
bool
-DataBaseManager::removeLocation (QString /*word */ , int /*location */ )
+DataBaseManager::removeLocation (TQString /*word */ , int /*location */ )
{
//#warning TODO: REMOVE LOCATION
@@ -1298,7 +1298,7 @@ DataBaseManager::removeLocation (QString /*word */ , int /*location */ )
}
uint32
-DataBaseManager::appendKey (QString _key)
+DataBaseManager::appendKey (TQString _key)
{
DBT key;
@@ -1324,7 +1324,7 @@ DataBaseManager::appendKey (QString _key)
else
ret = *(uint32 *) key.data;
-//kdDebug(0) << QString("Append result %1,err = %1").arg(ret).arg(err) << endl;
+//kdDebug(0) << TQString("Append result %1,err = %1").arg(ret).arg(err) << endl;
free (data.data);
@@ -1349,16 +1349,16 @@ DataBaseManager::getKey (uint32 n)
//Check for errors
int ret = indexDb->get (indexDb, 0, &key, &data, 0); //DB_SET_RECNO);
if (ret)
- return QString::null;
+ return TQString::null;
- return QString::fromUtf8 ((char *) data.data);
+ return TQString::fromUtf8 ((char *) data.data);
-// kdDebug(0) << QString("Trad %1").arg(ret) << endl;
+// kdDebug(0) << TQString("Trad %1").arg(ret) << endl;
}
int
-DataBaseManager::catalogRef (QString location, QString author, QString path)
+DataBaseManager::catalogRef (TQString location, TQString author, TQString path)
{
InfoItem cinfo;
int cat, catnum;
@@ -1397,19 +1397,19 @@ DataBaseManager::catalogRef (QString location, QString author, QString path)
}
int
-DataBaseManager::putNewTranslation (QString key, QString tran, int catalog,
+DataBaseManager::putNewTranslation (TQString key, TQString tran, int catalog,
bool ow)
{
int catnum = catalog;
int count = 0;
- QString msgid = key;
+ TQString msgid = key;
DataBaseItem dbit = getItem (msgid);
if (dbit.numTra == 0) //Not found
{
dbit.numTra += 1;
- // use local variable, dbit.translations is QValueList and
+ // use local variable, dbit.translations is TQValueList and
// will create own copy
TranslationItem tra;
tra.numRef = 1;
@@ -1423,16 +1423,16 @@ DataBaseManager::putNewTranslation (QString key, QString tran, int catalog,
int aa = putItem (&dbit);
if (aa)
- kdDebug (0) << QString ("-----------put code ") << aa << endl;
+ kdDebug (0) << TQString ("-----------put code ") << aa << endl;
}
else
{
// key exists
- QString msgstr = tran;
+ TQString msgstr = tran;
bool found_catalog_info = false, foundTr = false, isThisOne = false;
- QValueList < TranslationItem >::Iterator ittr;
+ TQValueList < TranslationItem >::Iterator ittr;
bool rem = false;
// check all translations in the list
@@ -1493,7 +1493,7 @@ DataBaseManager::putNewTranslation (QString key, QString tran, int catalog,
//Check ret value
int aa = putItem (&dbit, true);
if (aa)
- kdDebug (0) << QString ("-----------put code ") << aa << endl;
+ kdDebug (0) << TQString ("-----------put code ") << aa << endl;
}
return count;
@@ -1513,11 +1513,11 @@ DataBaseManager::rebuildIndexes ()
uint32 location = loc;
- QValueList < QString > wlist;
+ TQValueList < TQString > wlist;
wlist = wordsIn (item->key);
- QValueList < QString >::Iterator wlistit;
+ TQValueList < TQString >::Iterator wlistit;
for (wlistit = wlist.begin (); wlistit != wlist.end (); ++wlistit)
{
diff --git a/kbabel/kbabeldict/modules/dbsearchengine/database.h b/kbabel/kbabeldict/modules/dbsearchengine/database.h
index bf4767df..3e68e01d 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine/database.h
+++ b/kbabel/kbabeldict/modules/dbsearchengine/database.h
@@ -52,29 +52,29 @@
#define uint32 u_int32_t
-#include <qvaluelist.h>
-#include <qptrlist.h>
-#include <qstring.h>
-#include <qobject.h>
-#include <qdatetime.h>
-#include <qcstring.h> //bytearray
+#include <tqvaluelist.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
+#include <tqobject.h>
+#include <tqdatetime.h>
+#include <tqcstring.h> //bytearray
class WordItem // Returned by getWordLocations
{
public:
- WordItem(char *data,QString w);
- WordItem(QString w);
+ WordItem(char *data,TQString w);
+ WordItem(TQString w);
//WordItem(const WordItem &wi);
//WordItem& operator=(const WordItem & wi );
//The word (key in database)
- QString word;
+ TQString word;
//Sorted locations
- //QByteArray locations; //too many problems with this..
+ //TQByteArray locations; //too many problems with this..
//NOTE:
- //This is allocated only if you call WordItem(char *data,QString w);
+ //This is allocated only if you call WordItem(char *data,TQString w);
//YOU MUST FREE IT when you do not need it anymore
//No destructor will do it !!!
@@ -97,15 +97,15 @@ class InfoItem
InfoItem();
// Create an info item from raw data
- InfoItem(const char *rawData,QString lang);
+ InfoItem(const char *rawData,TQString lang);
- QString catalogName;
- QString lastFullPath;
+ TQString catalogName;
+ TQString lastFullPath;
- QString lastTranslator;
- QDateTime revisionDate;
- QString charset;
- QString language;
+ TQString lastTranslator;
+ TQDateTime revisionDate;
+ TQString charset;
+ TQString language;
int size();
@@ -116,8 +116,8 @@ class InfoItem
class TranslationItem
{
public:
- QString translation;
- QValueList<int> infoRef;
+ TQString translation;
+ TQValueList<int> infoRef;
uint32 numRef;
};
@@ -149,8 +149,8 @@ class DataBaseItem
void toRawData(char *_data);
void toRawKey(char *_key);
- QString key;
- QValueList<TranslationItem> translations;
+ TQString key;
+ TQValueList<TranslationItem> translations;
uint32 numTra;
uint32 location;
};
@@ -175,13 +175,13 @@ class DataBaseManager : public QObject
*/
- DataBaseManager(QString directory,QString lang,QObject *parent=0,const char *name=0);
+ DataBaseManager(TQString directory,TQString lang,TQObject *parent=0,const char *name=0);
~DataBaseManager();
/*
Create a new databse structure.
*/
- int createDataBase(QString directory,QString language,int mode=0664);
+ int createDataBase(TQString directory,TQString language,int mode=0664);
@@ -198,7 +198,7 @@ class DataBaseManager : public QObject
int putItem(DataBaseItem *item,bool ow=false);
- DataBaseItem getItem(QString key);
+ DataBaseItem getItem(TQString key);
/*
@return the first entry in the database.
@@ -226,7 +226,7 @@ class DataBaseManager : public QObject
* overwritten if you provide a new translation
*/
- int putNewTranslation(QString key,QString tran,int catalog,bool ow=true);
+ int putNewTranslation(TQString key,TQString tran,int catalog,bool ow=true);
/*
@return info about catalog n
@@ -246,14 +246,14 @@ class DataBaseManager : public QObject
@return its refnum.
*/
- int searchCatalogInfo(QString location);
+ int searchCatalogInfo(TQString location);
/* Get a catalog info for location,
* if it doesn't exist it will create one.
* @return the refnum
*/
- int catalogRef(QString location,QString author,QString path);
+ int catalogRef(TQString location,TQString author,TQString path);
/*
Put at refnum the catInfo
@@ -265,17 +265,17 @@ class DataBaseManager : public QObject
/*
Get word info
*/
- WordItem getWordLocations(QString word);
+ WordItem getWordLocations(TQString word);
/*
Add a location for word
*/
- bool addLocation(QString word, unsigned int location);
+ bool addLocation(TQString word, unsigned int location);
/*
Remove location for word
*/
- bool removeLocation(QString word, int location);
+ bool removeLocation(TQString word, int location);
/*
@@ -283,9 +283,9 @@ class DataBaseManager : public QObject
*/
void rebuildIndexes();
- uint32 appendKey(class QString);
+ uint32 appendKey(class TQString);
- QString getKey(uint32 n);
+ TQString getKey(uint32 n);
/*
Load the catalogs info.
@@ -302,7 +302,7 @@ class DataBaseManager : public QObject
void openDataBase();
void closeDataBase();
- static QValueList<QString> wordsIn(QString string);
+ static TQValueList<TQString> wordsIn(TQString string);
signals:
@@ -312,9 +312,9 @@ class DataBaseManager : public QObject
protected:
DataBaseItem cursorGet(uint32 flags);
- QString language;
- QString basedir;
- QValueList<InfoItem> info;
+ TQString language;
+ TQString basedir;
+ TQValueList<InfoItem> info;
DB *db,*infoDb,*wordDb,*indexDb;
DBC *cursor;
diff --git a/kbabel/kbabeldict/modules/dbsearchengine/dbscan.cpp b/kbabel/kbabeldict/modules/dbsearchengine/dbscan.cpp
index 87b39e61..0ee1ba4b 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine/dbscan.cpp
+++ b/kbabel/kbabeldict/modules/dbsearchengine/dbscan.cpp
@@ -30,8 +30,8 @@
*/
#include "dbscan.h"
-#include <qdir.h>
-#include <qfile.h>
+#include <tqdir.h>
+#include <tqfile.h>
#include <kapplication.h>
#include <kurl.h>
#include <kdebug.h>
@@ -39,14 +39,14 @@
using namespace KBabel;
PoScanner::PoScanner(DataBaseManager *dbm,
- QObject *parent,const char *name):QObject(parent,name)
+ TQObject *parent,const char *name):TQObject(parent,name)
{
dm=dbm;
removeOldCatalogTranslation=false; //Check if this flag do something.
count=0;
}
-bool PoScanner::scanPattern(QString pathName,QString pattern,bool rec)
+bool PoScanner::scanPattern(TQString pathName,TQString pattern,bool rec)
{
int tot;
@@ -57,17 +57,17 @@ if (!called)
{ pb=true; count=0;}
called=true;
-kdDebug(0) << QString("cat: %1, %2").arg(pathName).arg(pattern) << endl;
+kdDebug(0) << TQString("cat: %1, %2").arg(pathName).arg(pattern) << endl;
if(pb)
{emit patternStarted();
emit patternProgress(0);
}
- QDir d(pathName,pattern);
+ TQDir d(pathName,pattern);
d.setMatchAllDirs(true);
const QFileInfoList* files = d.entryInfoList();
tot=files->count();
- QPtrListIterator<QFileInfo> it(*files);
+ TQPtrListIterator<TQFileInfo> it(*files);
kdDebug(0) << tot << endl;
for ( int i=0; i<tot; i++ )
{
@@ -110,7 +110,7 @@ return true;
-bool PoScanner::scanFile(QString fileName)
+bool PoScanner::scanFile(TQString fileName)
{
@@ -120,8 +120,8 @@ InfoItem cinfo;
Catalog * catalog=new Catalog(this,"ScanPoCatalog");
-QString location=fileName.right(fileName.length()-fileName.findRev("/")-1);
-connect(catalog,SIGNAL(signalProgress(int)),this,SIGNAL(fileLoading(int)));
+TQString location=fileName.right(fileName.length()-fileName.findRev("/")-1);
+connect(catalog,TQT_SIGNAL(signalProgress(int)),this,TQT_SIGNAL(fileLoading(int)));
emit filename(location);
emit fileProgress(0);
emit fileLoading(0);
@@ -136,10 +136,10 @@ if(rr != OK && rr !=RECOVERED_PARSE_ERROR )
}
emit fileLoading(100);
-QString author;
+TQString author;
if(rr != HEADER_ERROR)
author=catalog->lastTranslator();
-else author=QString("unknown");
+else author=TQString("unknown");
int catnum=dm->catalogRef(location,author,fileName);
@@ -149,7 +149,7 @@ tot=catalog->numberOfEntries();
bool fuzzy;
bool untra;
-//kdDebug(0) << QString("Tot: %1").arg(tot) << endl;
+//kdDebug(0) << TQString("Tot: %1").arg(tot) << endl;
for (i=0;i<tot;i++) //Skip header = ????
{
@@ -169,7 +169,7 @@ for (i=0;i<tot;i++) //Skip header = ????
if(!fuzzy && !untra)
{
int res;
- QString msgid,msgstr;
+ TQString msgid,msgstr;
msgid=catalog->msgid(i,true).first();
kdWarning() << "Translation database does not support plural forms" << endl;
msgstr=catalog->msgstr(i).first();
@@ -181,7 +181,7 @@ for (i=0;i<tot;i++) //Skip header = ????
}
-// kdDebug(0) << QString("File finished") << endl;
+// kdDebug(0) << TQString("File finished") << endl;
emit fileProgress(0);
emit fileLoading(0);
diff --git a/kbabel/kbabeldict/modules/dbsearchengine/dbscan.h b/kbabel/kbabeldict/modules/dbsearchengine/dbscan.h
index c151509e..2390c3d1 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine/dbscan.h
+++ b/kbabel/kbabeldict/modules/dbsearchengine/dbscan.h
@@ -47,17 +47,17 @@ class PoScanner : public QObject
public:
- PoScanner(DataBaseManager *dbm,QObject *parent=0,const char *name=0);
+ PoScanner(DataBaseManager *dbm,TQObject *parent=0,const char *name=0);
/*
Scan a single PO file.
*/
- bool scanFile(QString fileName);
+ bool scanFile(TQString fileName);
/*
Scan a list of space separated files with possible MetaCharacters
*/
- bool scanPattern(QString pathName,QString pattern="*.po",bool rec=false);
+ bool scanPattern(TQString pathName,TQString pattern="*.po",bool rec=false);
@@ -71,7 +71,7 @@ signals:
void patternProgress(int);
void patternFinished();
void added(int);
- void filename(QString);
+ void filename(TQString);
private:
// If true when a translation is found in a CATALOG the old translation for this CATALOG
diff --git a/kbabel/kbabeldict/modules/dbsearchengine/dbse_factory.cpp b/kbabel/kbabeldict/modules/dbsearchengine/dbse_factory.cpp
index 37332167..86975874 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine/dbse_factory.cpp
+++ b/kbabel/kbabeldict/modules/dbsearchengine/dbse_factory.cpp
@@ -21,7 +21,7 @@ KInstance *DbSeFactory::s_instance = 0;
KAboutData *DbSeFactory::s_about = 0;
-DbSeFactory::DbSeFactory( QObject *parent, const char *name)
+DbSeFactory::DbSeFactory( TQObject *parent, const char *name)
: KLibFactory(parent,name)
{
}
@@ -42,10 +42,10 @@ DbSeFactory::~DbSeFactory()
}
-QObject *DbSeFactory::createObject( QObject *parent, const char *name,
- const char *classname, const QStringList &)
+TQObject *DbSeFactory::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/dbsearchengine/dbse_factory.h b/kbabel/kbabeldict/modules/dbsearchengine/dbse_factory.h
index 6a9f9f3d..7ae4f20b 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine/dbse_factory.h
+++ b/kbabel/kbabeldict/modules/dbsearchengine/dbse_factory.h
@@ -9,12 +9,12 @@ class DbSeFactory : public KLibFactory
{
Q_OBJECT
public:
- DbSeFactory( QObject *parent=0, const char *name=0);
+ DbSeFactory( TQObject *parent=0, const char *name=0);
~DbSeFactory();
- 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/dbsearchengine/preferenceswidget.cpp b/kbabel/kbabeldict/modules/dbsearchengine/preferenceswidget.cpp
index 3bb65934..562f0835 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine/preferenceswidget.cpp
+++ b/kbabel/kbabeldict/modules/dbsearchengine/preferenceswidget.cpp
@@ -1,33 +1,33 @@
-#include <qradiobutton.h>
-#include <qslider.h>
-#include <qspinbox.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqradiobutton.h>
+#include <tqslider.h>
+#include <tqspinbox.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <klocale.h>
#include <kfiledialog.h>
#include <kurlrequester.h>
-#include <qtoolbutton.h>
+#include <tqtoolbutton.h>
#include <klineedit.h>
#include <kstandarddirs.h>
#include "dbseprefwidget.h"
#include "preferenceswidget.h"
-PreferencesWidget::PreferencesWidget(QWidget *parent, const char* name)
+PreferencesWidget::PreferencesWidget(TQWidget *parent, const char* name)
: PrefWidget(parent,name)
{
- QVBoxLayout *layout = new QVBoxLayout(this);
-// QLabel *label = new QLabel(i18n("Settings for KDE database search engine"),this);
+ TQVBoxLayout *layout = new TQVBoxLayout(this);
+// TQLabel *label = new TQLabel(i18n("Settings for KDE database search engine"),this);
// layout->addWidget(label);
dbpw = new DBSearchEnginePref(this);
dbpw->dirInput->setMode(KFile::Directory | KFile::LocalOnly);
layout->addWidget(dbpw);
- resize(QSize(200,200).expandedTo(minimumSizeHint()));
+ resize(TQSize(200,200).expandedTo(minimumSizeHint()));
-// connect(dbpw->browseTB_3,SIGNAL(clicked()),SLOT(browse1()));
+// connect(dbpw->browseTB_3,TQT_SIGNAL(clicked()),TQT_SLOT(browse1()));
emit restoreNow(); //Fill with actual params.
@@ -84,7 +84,7 @@ dbpw->ignoreLE->setText("&.:");
dbpw->autoAddCB_2->setChecked(true);
-QString defaultDir;
+TQString defaultDir;
KStandardDirs * dirs = KGlobal::dirs();
if(dirs)
{
@@ -97,7 +97,7 @@ QString defaultDir;
dbpw->dirInput->setURL(defaultDir);
}
-void PreferencesWidget::setName(QString n)
+void PreferencesWidget::setName(TQString n)
{
dbpw->filenameLB->setText(i18n("Scanning file: %1").arg(n));
}
diff --git a/kbabel/kbabeldict/modules/dbsearchengine/preferenceswidget.h b/kbabel/kbabeldict/modules/dbsearchengine/preferenceswidget.h
index 599408cd..5cd1fed8 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine/preferenceswidget.h
+++ b/kbabel/kbabeldict/modules/dbsearchengine/preferenceswidget.h
@@ -9,7 +9,7 @@ class PreferencesWidget : public PrefWidget
Q_OBJECT
public:
- PreferencesWidget(QWidget *parent=0, const char* name=0);
+ PreferencesWidget(TQWidget *parent=0, const char* name=0);
virtual ~PreferencesWidget();
virtual void apply();
@@ -17,7 +17,7 @@ public:
virtual void standard();
DBSearchEnginePref *dbpw;
public slots:
- void setName(QString);
+ void setName(TQString);
void setEntries(int);
signals:
void applyNow();
diff --git a/kbabel/kbabeldict/modules/dbsearchengine2/KDBSearchEngine2.cpp b/kbabel/kbabeldict/modules/dbsearchengine2/KDBSearchEngine2.cpp
index 5bf088b8..41f4319d 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine2/KDBSearchEngine2.cpp
+++ b/kbabel/kbabeldict/modules/dbsearchengine2/KDBSearchEngine2.cpp
@@ -35,19 +35,19 @@
#include "dbscan.h"
#include <klineedit.h>
#include <kapplication.h>
-#include <qpushbutton.h>
+#include <tqpushbutton.h>
#include <kurlrequester.h>
-#include <qcheckbox.h>
+#include <tqcheckbox.h>
#include <knuminput.h>
#include <kstandarddirs.h>
#include <kmessagebox.h>
-#include <qmap.h>
+#include <tqmap.h>
#include <kdebug.h>
#define i18n (const char *)
-KDBSearchEngine2::KDBSearchEngine2(QObject *parent,const char*name)
+KDBSearchEngine2::KDBSearchEngine2(TQObject *parent,const char*name)
: SearchEngine(parent,name)
{
pw=0;
@@ -55,7 +55,7 @@ KDBSearchEngine2::KDBSearchEngine2(QObject *parent,const char*name)
di=0; //Database Interface is not yet initialized
- connect(this,SIGNAL(hasError(QString)),SLOT(setLastError(QString)));
+ connect(this,TQT_SIGNAL(hasError(TQString)),TQT_SLOT(setLastError(TQString)));
searching=false; // i'm not searching
iAmReady=true; //there are no reason to say I'm not ready.
@@ -69,11 +69,11 @@ KDBSearchEngine2::~KDBSearchEngine2()
delete di; //delete database interface
}
-bool KDBSearchEngine2::startSearch(QString str)
+bool KDBSearchEngine2::startSearch(TQString str)
{
kdDebug(0) << "Start a new search. Looking for: " << str << endl;
- static QString queryString;
+ static TQString queryString;
queryString=str; //set the latest query string (note: it is static)
@@ -92,7 +92,7 @@ bool KDBSearchEngine2::startSearch(QString str)
searching=true; //really start searching
- QString searchingString;
+ TQString searchingString;
do //Search loop, it stops only when finished and latest searched string is the actual query string.
{
@@ -134,8 +134,8 @@ bool KDBSearchEngine2::startSearch(QString str)
strategy.addAlgorithm(&wbyw);
- connect(&strategy,SIGNAL(newResult(QueryResult)),this,SLOT(receiveResult(QueryResult)));
- strategy.exec(searchingString); disconnect(&strategy,SIGNAL(newResult(QueryResult)),this,SLOT(receiveResult(QueryResult)));
+ connect(&strategy,TQT_SIGNAL(newResult(QueryResult)),this,TQT_SLOT(receiveResult(QueryResult)));
+ strategy.exec(searchingString); disconnect(&strategy,TQT_SIGNAL(newResult(QueryResult)),this,TQT_SLOT(receiveResult(QueryResult)));
kdDebug(0) << "End of search for " << searchingString << endl;
@@ -158,7 +158,7 @@ bool KDBSearchEngine2::startSearch(QString str)
-bool KDBSearchEngine2::startSearchInTranslation(QString str)
+bool KDBSearchEngine2::startSearchInTranslation(TQString str)
{
if(autoupdate)
{
@@ -172,20 +172,20 @@ bool KDBSearchEngine2::startSearchInTranslation(QString str)
-bool KDBSearchEngine2::messagesForPackage(const QString& package
- , QValueList<Message>& resultList, QString& error)
+bool KDBSearchEngine2::messagesForPackage(const TQString& package
+ , TQValueList<Message>& resultList, TQString& error)
{
//FIXME implement this (needs filters)
return true;
}
-void KDBSearchEngine2::setLastError(QString er)
+void KDBSearchEngine2::setLastError(TQString er)
{
lasterror=er;
}
-QString KDBSearchEngine2::translate(const QString text)
+TQString KDBSearchEngine2::translate(const TQString text)
{
ExactSearchAlgorithm exact(di,&settings);
@@ -212,14 +212,14 @@ void KDBSearchEngine2::receiveResult(QueryResult r)
/* A SEARCH RESULT CONTAINS (see searchengine.h)
- QString requested;
- QString found;
- QString translation;
- QString plainTranslation;
- QString plainFound;
- QString plainRequested;
+ TQString requested;
+ TQString found;
+ TQString translation;
+ TQString plainTranslation;
+ TQString plainFound;
+ TQString plainRequested;
int score;
- QPtrList<TranslationInfo> descriptions;
+ TQPtrList<TranslationInfo> descriptions;
*/
@@ -230,7 +230,7 @@ bool KDBSearchEngine2::init()
else
{
di = new DataBaseInterface(dbDirectory,&settings);
- connect(di,SIGNAL(newResult(QueryResult)),this,SLOT(receiveResult(QueryResult)));
+ connect(di,TQT_SIGNAL(newResult(QueryResult)),this,TQT_SLOT(receiveResult(QueryResult)));
//FIXME: what wbout ready()
if(!di->mainOk()) return false; //check if the main DB is OK.
@@ -243,8 +243,8 @@ const KAboutData *KDBSearchEngine2::about() const
return DbSe2Factory::instance()->aboutData();
}
-void KDBSearchEngine2::stringChanged( QString orig, QString translated
- , QString description)
+void KDBSearchEngine2::stringChanged( TQString orig, TQString translated
+ , TQString description)
{
if(!init()) return;
@@ -255,22 +255,22 @@ void KDBSearchEngine2::stringChanged( QString orig, QString translated
}
-PrefWidget * KDBSearchEngine2::preferencesWidget(QWidget *parent)
+PrefWidget * KDBSearchEngine2::preferencesWidget(TQWidget *parent)
{
pw = new KDB2PreferencesWidget(parent);
kdDebug(0) << "new KDB2 preferences widget" << endl;
setSettings();
- connect(pw,SIGNAL(restoreNow()),this,SLOT(setSettings()));
- connect(pw,SIGNAL(applyNow()),this,SLOT(updateSettings()));
- connect(pw,SIGNAL(destroyed()),this,SLOT(prefDestr()));
+ connect(pw,TQT_SIGNAL(restoreNow()),this,TQT_SLOT(setSettings()));
+ connect(pw,TQT_SIGNAL(applyNow()),this,TQT_SLOT(updateSettings()));
+ connect(pw,TQT_SIGNAL(destroyed()),this,TQT_SLOT(prefDestr()));
- connect(pw->dbpw->scanAll,SIGNAL(clicked()),this,SLOT(scanAllPressed()));
- connect(pw->dbpw->scanSource,SIGNAL(clicked()),this,SLOT(scanNowPressed()));
- connect(pw->dbpw->addSource,SIGNAL(clicked()),this,SLOT(addSource()));
- connect(pw->dbpw->editSource,SIGNAL(clicked()),this,SLOT(editSource()));
- connect(pw->dbpw->removeSource,SIGNAL(clicked()),this,SLOT(removeSource()));
+ connect(pw->dbpw->scanAll,TQT_SIGNAL(clicked()),this,TQT_SLOT(scanAllPressed()));
+ connect(pw->dbpw->scanSource,TQT_SIGNAL(clicked()),this,TQT_SLOT(scanNowPressed()));
+ connect(pw->dbpw->addSource,TQT_SIGNAL(clicked()),this,TQT_SLOT(addSource()));
+ connect(pw->dbpw->editSource,TQT_SIGNAL(clicked()),this,TQT_SLOT(editSource()));
+ connect(pw->dbpw->removeSource,TQT_SIGNAL(clicked()),this,TQT_SLOT(removeSource()));
return pw;
@@ -309,10 +309,10 @@ void KDBSearchEngine2::saveSettings(KConfigBase *config)
uint sourceNumber=0;
config->writeEntry("NumberOfDBImportSources",sources.count());
- for(QMap<QString,MessagesSource>::iterator sourceIt=sources.begin() ; sourceIt!=sources.end(); ++sourceIt)
+ for(TQMap<TQString,MessagesSource>::iterator sourceIt=sources.begin() ; sourceIt!=sources.end(); ++sourceIt)
{
sourceNumber++;
- config->setGroup("DBImportSource-"+QString::number(sourceNumber));
+ config->setGroup("DBImportSource-"+TQString::number(sourceNumber));
config->writeEntry("Name",sourceIt.key());
sourceIt.data().writeConfig(config);
}
@@ -321,7 +321,7 @@ void KDBSearchEngine2::saveSettings(KConfigBase *config)
void KDBSearchEngine2::readSettings(KConfigBase *config)
{
- /*QString defaultDir;
+ /*TQString defaultDir;
KStandardDirs * dirs = KGlobal::dirs();
if(dirs)
{
@@ -361,8 +361,8 @@ void KDBSearchEngine2::readSettings(KConfigBase *config)
kdDebug(0) << "Found "<< numberOfSources << " sources" << endl;
for(uint sourceNumber=1;sourceNumber<=numberOfSources;sourceNumber++)
{
- config->setGroup("DBImportSource-"+QString::number(sourceNumber));
- QString name=config->readEntry("Name");
+ config->setGroup("DBImportSource-"+TQString::number(sourceNumber));
+ TQString name=config->readEntry("Name");
sources[name].readConfig(config);
}
if(pw)
@@ -401,7 +401,7 @@ void KDBSearchEngine2::setSettings()
//pw->dbpw->useFilters->setChecked(false);
//pw->dbpw->dateToday->setChecked(false);
pw->dbpw->sourceList->clear();
- for(QMap<QString,MessagesSource>::iterator sourceIt=sources.begin() ; sourceIt!=sources.end(); ++sourceIt)
+ for(TQMap<TQString,MessagesSource>::iterator sourceIt=sources.begin() ; sourceIt!=sources.end(); ++sourceIt)
{
pw->dbpw->sourceList->insertItem(sourceIt.key());
}
@@ -413,7 +413,7 @@ void KDBSearchEngine2::updateSettings()
{
if(!pw) return;
- QString newdb = pw->dbpw->dbDirectory->url();
+ TQString newdb = pw->dbpw->dbDirectory->url();
if(newdb !=dbDirectory)
{
kdDebug(0) << "Recreate DB-Interface cause dbdir is changed" << endl;
@@ -469,19 +469,19 @@ pw->dbpw->sourceList->
}
-/*void KDBSearchEngine2::scanSource(QString sourceName)
+/*void KDBSearchEngine2::scanSource(TQString sourceName)
{
//FIXME: an error here would be nice
if(!init()) return;
- for(QValueList<MessagesSource>::iterator sourceIt=sources.begin() ; sourceIt!=sources.end(); sourceIt++)
+ for(TQValueList<MessagesSource>::iterator sourceIt=sources.begin() ; sourceIt!=sources.end(); sourceIt++)
{
if((*sourceIt).getName()==sourceName)
{
- QValueList<KURL> urls=(*sourceIt).urls();
+ TQValueList<KURL> urls=(*sourceIt).urls();
PoScanner ps(di);
- for(QValueList<KURL>::iterator urlIt=urls.begin();urlIt!=urls.end();urlIt++)
+ for(TQValueList<KURL>::iterator urlIt=urls.begin();urlIt!=urls.end();urlIt++)
ps.scanFile(*urlIt);
//We suppose name are unique so no need for further scrolling
@@ -496,14 +496,14 @@ void KDBSearchEngine2::scanNowPressed()
kdDebug(0) << "We should not be here, scanNow called without a pw!" << endl;
return;
}
- QString sourceName;
+ TQString sourceName;
sourceName=pw->dbpw->sourceList->currentText();
if(!init()) return;
if(sources.contains(sourceName))
{
- QValueList<KURL> urls=sources[sourceName].urls();
+ TQValueList<KURL> urls=sources[sourceName].urls();
PoScanner ps(di);
- for(QValueList<KURL>::iterator urlIt=urls.begin();urlIt!=urls.end();++urlIt)
+ for(TQValueList<KURL>::iterator urlIt=urls.begin();urlIt!=urls.end();++urlIt)
ps.scanURL(*urlIt);
}
@@ -520,10 +520,10 @@ void KDBSearchEngine2::scanAllPressed()
PoScanner ps(di);
- for(QMap<QString,MessagesSource>::iterator sourceIt=sources.begin() ; sourceIt!=sources.end(); ++sourceIt)
+ for(TQMap<TQString,MessagesSource>::iterator sourceIt=sources.begin() ; sourceIt!=sources.end(); ++sourceIt)
{
- QValueList<KURL> urls=(*sourceIt).urls();
- for(QValueList<KURL>::iterator urlIt=urls.begin();urlIt!=urls.end();++urlIt)
+ TQValueList<KURL> urls=(*sourceIt).urls();
+ for(TQValueList<KURL>::iterator urlIt=urls.begin();urlIt!=urls.end();++urlIt)
ps.scanURL(*urlIt);
}
}
@@ -535,18 +535,18 @@ void KDBSearchEngine2::editSource()
kdDebug(0) << "We should not be here, editSource called without a pw!" << endl;
return;
}
- QString sourceName;
+ TQString sourceName;
sourceName=pw->dbpw->sourceList->currentText();
if(sources.contains(sourceName))
{
bool nameIsNew;
- QString newName;
+ TQString newName;
SourceDialog sd;
do{
sources[sourceName].setDialogValues(&sd);
sd.sourceName->setText(sourceName);
- if(sd.exec()==QDialog::Accepted)
+ if(sd.exec()==TQDialog::Accepted)
{
sources[sourceName].getDialogValues(&sd);
newName= sd.sourceName->text();
@@ -586,7 +586,7 @@ void KDBSearchEngine2::removeSource()
kdDebug(0) << "We should not be here, delteSource called without a pw!" << endl;
return;
}
- QString sourceName;
+ TQString sourceName;
sourceName=pw->dbpw->sourceList->currentText();
sources.remove(sourceName);
pw->dbpw->sourceList->removeItem(pw->dbpw->sourceList->currentItem());
@@ -595,11 +595,11 @@ void KDBSearchEngine2::removeSource()
void KDBSearchEngine2::addSource()
{
- QString newName;
+ TQString newName;
SourceDialog sd;
bool nameIsNew;
do{
- if(sd.exec()==QDialog::Accepted)
+ if(sd.exec()==TQDialog::Accepted)
{
newName= sd.sourceName->text();
nameIsNew=!sources.contains(newName);
@@ -625,7 +625,7 @@ void KDBSearchEngine2::addSource()
}
-QString KDBSearchEngine2::searchTranslation( const QString text, int & score )
+TQString KDBSearchEngine2::searchTranslation( const TQString text, int & score )
{
GenericSearchAlgorithm strategy(di,&settings);
strategy.setMaxResultNumber(1);
@@ -644,7 +644,7 @@ QString KDBSearchEngine2::searchTranslation( const QString text, int & score )
}
-QString KDBSearchEngine2::fuzzyTranslation( const QString text, int & score )
+TQString KDBSearchEngine2::fuzzyTranslation( const TQString text, int & score )
{
GenericSearchAlgorithm strategy(di,&settings);
strategy.setMaxResultNumber(1);
diff --git a/kbabel/kbabeldict/modules/dbsearchengine2/KDBSearchEngine2.h b/kbabel/kbabeldict/modules/dbsearchengine2/KDBSearchEngine2.h
index 0db19c6c..fb9cff70 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine2/KDBSearchEngine2.h
+++ b/kbabel/kbabeldict/modules/dbsearchengine2/KDBSearchEngine2.h
@@ -9,7 +9,7 @@ Andrea Rizzi
#define DBSEARCH_ENGINE2_H
#include <searchengine.h>
-#include <qdialog.h>
+#include <tqdialog.h>
#include "database.h"
#include "dbse2_factory.h"
@@ -25,7 +25,7 @@ class KDBSearchEngine2 : public SearchEngine
public:
- KDBSearchEngine2(QObject *parent=0, const char *name=0);
+ KDBSearchEngine2(TQObject *parent=0, const char *name=0);
virtual ~KDBSearchEngine2();
//init if needed.
@@ -46,10 +46,10 @@ class KDBSearchEngine2 : public SearchEngine
void readSettings(KConfigBase *config);
- QString translate(const QString text);
+ TQString translate(const TQString text);
- QString fuzzyTranslation(const QString text, int &score);
- QString searchTranslation(const QString, int &score );
+ TQString fuzzyTranslation(const TQString text, int &score);
+ TQString searchTranslation(const TQString, int &score );
/**
* Finds all messages belonging to package package. If nothing is found,
@@ -60,8 +60,8 @@ class KDBSearchEngine2 : public SearchEngine
*
* @return true, if successfull
*/
- bool messagesForPackage(const QString& package
- , QValueList<Message>& resultList, QString& error);
+ bool messagesForPackage(const TQString& package
+ , TQValueList<Message>& resultList, TQString& error);
/**
* @returns true, if the searchresults are given as rich text
@@ -79,19 +79,19 @@ class KDBSearchEngine2 : public SearchEngine
* a tabbed widget.
* @param parent the parent of the returned widget
*/
- virtual PrefWidget* preferencesWidget(QWidget *parent);
+ virtual PrefWidget* preferencesWidget(TQWidget *parent);
/** @returns information about this SearchEngine */
virtual const KAboutData *about() const;
/** @returns the i18n name of this search engine */
- QString name() const {return i18n("DB SearchEngine II");}
+ TQString name() const {return i18n("DB SearchEngine II");}
/** @returns a untranslated name of this engine */
- QString id() const {return "dbse2";}
+ TQString id() const {return "dbse2";}
/** @returns the last error message */
- QString lastError() {return lasterror;}
+ TQString lastError() {return lasterror;}
/**
@@ -114,14 +114,14 @@ class KDBSearchEngine2 : public SearchEngine
* @returns false, if an error occured. Use @ref lastError
* to get the last error message
*/
- bool startSearch(QString s);
+ bool startSearch(TQString s);
/**
* starts a search for string s in the translated text
* @returns false, if an error occured. Use @ref lastError
* to get the last error message
*/
- bool startSearchInTranslation(QString s);
+ bool startSearchInTranslation(TQString s);
/** stops a search */
@@ -133,22 +133,22 @@ class KDBSearchEngine2 : public SearchEngine
* on the edited file. The default implementation does nothing.
* @param file The edited file with path
*/
- // virtual void setEditedFile(QString file);
+ // virtual void setEditedFile(TQString file);
/**
* This method allows a search engine to use different settings depending
* on the edited package. The default implementation does nothing.
* @param package The name of the package, that is currently translated.
*/
- // virtual void setEditedPackage(QString package);
+ // virtual void setEditedPackage(TQString package);
/**
* This method allows a search engine to use different settings depending
* on the language code. The default implementation does nothing.
* @param lang The current language code (e.g. de).
*/
- // virtual void setLanguageCode(QString lang);
- // virtual void setLanguage(QString languageCode, QString languageName);
+ // virtual void setLanguageCode(TQString lang);
+ // virtual void setLanguage(TQString languageCode, TQString languageName);
@@ -160,15 +160,15 @@ class KDBSearchEngine2 : public SearchEngine
* @param translation the translated string
*/
- void stringChanged( QString orig, QString translated
- , QString description);
+ void stringChanged( TQString orig, TQString translated
+ , TQString description);
//void scan();
- void setLastError(QString er);
+ void setLastError(TQString er);
//Slots for preference dialog
- // void scanSource(QString sourceName);
+ // void scanSource(TQString sourceName);
void scanNowPressed();
void scanAllPressed();
void editSource();
@@ -181,7 +181,7 @@ class KDBSearchEngine2 : public SearchEngine
bool searching;
bool iAmReady;
bool autoupdate;
- QString lasterror;
+ TQString lasterror;
KDB2PreferencesWidget *pw;
//PrefWidg -> DBSE
@@ -190,11 +190,11 @@ class KDBSearchEngine2 : public SearchEngine
void setSettings();
DBSESettings settings;
- QString dbDirectory;
+ TQString dbDirectory;
bool autoAdd,useSentence,useGlossary,useExact;
bool useDivide,useAlpha,useWordByWord,useDynamic;
uint numberOfResult;
- QMap<QString,MessagesSource> sources;
+ TQMap<TQString,MessagesSource> sources;
};
diff --git a/kbabel/kbabeldict/modules/dbsearchengine2/algorithms.cpp b/kbabel/kbabeldict/modules/dbsearchengine2/algorithms.cpp
index 0ca040e8..466b68e5 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine2/algorithms.cpp
+++ b/kbabel/kbabeldict/modules/dbsearchengine2/algorithms.cpp
@@ -10,20 +10,20 @@
//
//
#include "algorithms.h"
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kdebug.h>
//FIXME: remove
#define i18n (const char*)
-DataBaseInterface::ResultList ExactSearchAlgorithm::exec(const QString& query )
+DataBaseInterface::ResultList ExactSearchAlgorithm::exec(const TQString& query )
{
DataBaseInterface::ResultList res;
DataBaseInterface::MainEntry e=di->get(query,0);
- QStringList trs=e.second.getTranslations();
+ TQStringList trs=e.second.getTranslations();
- for(QStringList::iterator it=trs.begin();it!=trs.end();++it)
+ for(TQStringList::iterator it=trs.begin();it!=trs.end();++it)
{
emit newResult(QueryResult(*it,e.first.getString(),settings->scoreExact));
@@ -35,19 +35,19 @@ DataBaseInterface::ResultList ExactSearchAlgorithm::exec(const QString& query )
}
-DataBaseInterface::ResultList GenericSearchAlgorithm::exec(const QString& query )
+DataBaseInterface::ResultList GenericSearchAlgorithm::exec(const TQString& query )
{
DataBaseInterface::ResultList res;
// ExactSearchAlgorithm exact(query,settings);
uint countResults=0;
- for(QValueList<AbstractSearchAlgorithm *>::iterator algoit = algoChain.begin(); algoit!=algoChain.end() && countResults < maxResults; algoit++)
+ for(TQValueList<AbstractSearchAlgorithm *>::iterator algoit = algoChain.begin(); algoit!=algoChain.end() && countResults < maxResults; algoit++)
{
- connect(*algoit,SIGNAL(newResult(QueryResult)),this,SIGNAL(newResult(QueryResult)));
+ connect(*algoit,TQT_SIGNAL(newResult(QueryResult)),this,TQT_SIGNAL(newResult(QueryResult)));
kdDebug(0) << "Algo pointer" << (*algoit) << endl;
res+=(*algoit)->exec(query);
countResults=res.count();
kdDebug(0) << "Count = " << countResults << endl;
- disconnect(*algoit,SIGNAL(newResult(QueryResult)),this,SIGNAL(newResult(QueryResult)));
+ disconnect(*algoit,TQT_SIGNAL(newResult(QueryResult)),this,TQT_SIGNAL(newResult(QueryResult)));
}
return res;
}
@@ -57,7 +57,7 @@ void GenericSearchAlgorithm::addAlgorithm( AbstractSearchAlgorithm * algo )
algoChain.append(algo);
}
-DataBaseInterface::ResultList AlphaSearchAlgorithm::exec( const QString & query )
+DataBaseInterface::ResultList AlphaSearchAlgorithm::exec( const TQString & query )
{
DataBaseInterface::ResultList res;
DBItemMultiIndex::IndexList il=di->getAlpha(query);
@@ -65,8 +65,8 @@ DataBaseInterface::ResultList AlphaSearchAlgorithm::exec( const QString & query
for(DBItemMultiIndex::IndexList::iterator it=il.begin();it!=il.end()&&!di->stopNow();++it)
{
DataBaseInterface::MainEntry e=di->getFromIndex(*it);
- QStringList trs=e.second.getTranslations();
- for(QStringList::iterator it=trs.begin();it!=trs.end() && !di->stopNow();++it)
+ TQStringList trs=e.second.getTranslations();
+ for(TQStringList::iterator it=trs.begin();it!=trs.end() && !di->stopNow();++it)
{
QueryResult r(di->format(di->simple(*it,true),query),e.first.getString(),settings->scoreAlpha);
emit newResult(r);
@@ -78,17 +78,17 @@ DataBaseInterface::ResultList AlphaSearchAlgorithm::exec( const QString & query
return res;
}
-DataBaseInterface::ResultList SentenceArchiveSearchAlgorithm::exec( const QString & query )
+DataBaseInterface::ResultList SentenceArchiveSearchAlgorithm::exec( const TQString & query )
{
DataBaseInterface::ResultList res;
DataBaseInterface::MainEntry e = di->getSentence(query);
- QStringList trs=e.second.getTranslations();
+ TQStringList trs=e.second.getTranslations();
kdDebug(0) << "Count in sentence archive " << trs.count()<< endl;
- for(QStringList::iterator it=trs.begin();it!=trs.end();++it)
+ for(TQStringList::iterator it=trs.begin();it!=trs.end();++it)
{
QueryResult r(di->format(di->simple(*it,true),query),e.first.getString(),settings->scoreSentence);
emit newResult(r);
@@ -100,31 +100,31 @@ DataBaseInterface::ResultList SentenceArchiveSearchAlgorithm::exec( const QStrin
return res;
}
-DataBaseInterface::ResultList ChunkByChunkSearchAlgorithm::exec( const QString & query )
+DataBaseInterface::ResultList ChunkByChunkSearchAlgorithm::exec( const TQString & query )
{
ResultList res;
factory->setQuery(query);
- QPtrList<AbstractChunk> chunks=factory->chunks();
+ TQPtrList<AbstractChunk> chunks=factory->chunks();
kdDebug(0) << "Number of chunks " << chunks.count() << endl;
chunks.setAutoDelete(true); //I should delete the chunks myself
- QStringList querySeparators=factory->separators();
+ TQStringList querySeparators=factory->separators();
//This prevents recursive loop.
if (chunks.count()<=1) return res;
- QStringList translations,tmpTranslations;
+ TQStringList translations,tmpTranslations;
translations.push_back(""); //FIXME this is needed to start , but is not good
int finalscore=0;
int i=0;
- QMap<QString,bool> translationUsed;
+ TQMap<TQString,bool> translationUsed;
//Loop on all chunk
for(AbstractChunk *it=chunks.first();it && !di->stopNow(); it=chunks.next())
{
kdDebug(0) << "Process next chunk" << endl;
int chunkscore=0;
- QValueList<QueryResult> r=it->translations();
+ TQValueList<QueryResult> r=it->translations();
kdDebug(0) << "Number of results for this chunk " << r.count() << endl;
if(r.count()<1) {
@@ -144,14 +144,14 @@ DataBaseInterface::ResultList ChunkByChunkSearchAlgorithm::exec( const QString &
translationUsed.clear();
for(ResultList::iterator it1=r.begin();it1!=r.end() &&!di->stopNow(); ++it1)
{
- QString chunkTranslation= (*it1).result();
+ TQString chunkTranslation= (*it1).result();
if(!translationUsed.contains(chunkTranslation))
{
translationUsed[chunkTranslation]=true;
kdDebug(0) << "a translation is: " << chunkTranslation << endl;
- for(QStringList::iterator it2=translations.begin();it2!=translations.end() && !di->stopNow() ; it2++)
+ for(TQStringList::iterator it2=translations.begin();it2!=translations.end() && !di->stopNow() ; it2++)
{
- QString prevTranslation=*it2;
+ TQString prevTranslation=*it2;
tmpTranslations.push_back(prevTranslation+chunkTranslation+querySeparators[i]);
kdDebug(0) << "..appending it to " << prevTranslation << endl;
}
@@ -176,9 +176,9 @@ DataBaseInterface::ResultList ChunkByChunkSearchAlgorithm::exec( const QString &
if (finalscore<50) return res;
- for(QStringList::iterator it2=translations.begin();it2!=translations.end() && !di->stopNow() ; it2++)
+ for(TQStringList::iterator it2=translations.begin();it2!=translations.end() && !di->stopNow() ; it2++)
{
- QString theTranslation=*it2;
+ TQString theTranslation=*it2;
QueryResult qr(di->format(theTranslation,query),i18n("CHUNK BY CHUNK"),finalscore);
qr.setRichOriginal(i18n("<h3>Chunk by chunk</h3>CHANGE THIS TEXT!!!!This translation is"
"obtained translating the sentences and using a"
@@ -211,22 +211,22 @@ FuzzyChunkSearchAlgorithm::FuzzyChunkSearchAlgorithm( DataBaseInterface * dbi, D
}
-DataBaseInterface::ResultList FuzzyChunkSearchAlgorithm::exec( const QString & query )
+DataBaseInterface::ResultList FuzzyChunkSearchAlgorithm::exec( const TQString & query )
{
//FIXME: this code is shit too
ResultList res;
factory->setQuery(query);
- QPtrList<AbstractChunk> querychunks = factory->chunks();
+ TQPtrList<AbstractChunk> querychunks = factory->chunks();
querychunks.setAutoDelete(true);
- typedef QMap<QString,QValueList<unsigned int> > ResultMap;
+ typedef TQMap<TQString,TQValueList<unsigned int> > ResultMap;
ResultMap rmap; //result of words index query
unsigned int notfound=0,frequent=0,nchunks = querychunks.count();
//Get index list for each word
for(AbstractChunk *it=querychunks.first(); it &&!di->stopNow() ; it=querychunks.next() )
{
- QValueList<uint> locations = (*it).locationReferences();
+ TQValueList<uint> locations = (*it).locationReferences();
if(locations.count()>0)
{
@@ -246,10 +246,10 @@ DataBaseInterface::ResultList FuzzyChunkSearchAlgorithm::exec( const QString & q
//Now we have a map (rmap) "word in query->list of occurency"
- QValueList<unsigned int>::iterator countpos[nchunks+1];
+ TQValueList<unsigned int>::iterator countpos[nchunks+1];
- QValueList<unsigned int> il;
+ TQValueList<unsigned int> il;
for(int i = 0;i<=nchunks&&!di->stopNow();i++)
countpos[i]=il.end();
@@ -310,12 +310,12 @@ DataBaseInterface::ResultList FuzzyChunkSearchAlgorithm::exec( const QString & q
int bestscore=0;
for(unsigned int wf=nchunks;wf>0;wf-- ){
- for(QValueList<unsigned int>::iterator it=countpos[wf];it!=countpos[wf-1] ;++it)
+ for(TQValueList<unsigned int>::iterator it=countpos[wf];it!=countpos[wf-1] ;++it)
{ //loop on entries with same number of word found
DataBaseInterface::MainEntry e;
e=di->getFromIndex(*it);
- QStringList trs=e.second.getTranslations();
- for(QStringList::iterator it=trs.begin();it!=trs.end()&&!di->stopNow();++it)
+ TQStringList trs=e.second.getTranslations();
+ for(TQStringList::iterator it=trs.begin();it!=trs.end()&&!di->stopNow();++it)
{
unsigned int cinr=factory->chunks(*it).count(); //chunk in result
//compute a score, lets kbabel sort now, it should be fast...
@@ -326,11 +326,11 @@ DataBaseInterface::ResultList FuzzyChunkSearchAlgorithm::exec( const QString & q
// kdDebug(0) << "s: "<<score << " wf: "<<wf<<" nwords: "<<nwords<<" winr: "<<winr
// <<" 90*wf/nwords: "<<90*wf/nwords << " -:" << 90*(((nwords-winr)>0)?(nwords-winr):(winr-nwords))/(nwords*10)<< endl;
// FIXME: format better the richtext
- QString ori=e.first.getString();
- QString re=di->format(di->simple(*it,true),query);
+ TQString ori=e.first.getString();
+ TQString re=di->format(di->simple(*it,true),query);
QueryResult r(re,ori,score);
- for(QPtrListIterator<AbstractChunk> it(querychunks); it.current() && di->stopNow() ; ++it){
- ori=ori.replace(QRegExp((*it)->chunkString(),false),"<font color=#000080><u><b>"+(*it)->chunkString()+"</b></u></font>");
+ for(TQPtrListIterator<AbstractChunk> it(querychunks); it.current() && di->stopNow() ; ++it){
+ ori=ori.replace(TQRegExp((*it)->chunkString(),false),"<font color=#000080><u><b>"+(*it)->chunkString()+"</b></u></font>");
}
r.setRichOriginal(ori);
if(!di->stopNow())
@@ -344,16 +344,16 @@ DataBaseInterface::ResultList FuzzyChunkSearchAlgorithm::exec( const QString & q
}
-DataBaseInterface::ResultList CorrelationSearchAlgorithm::exec( const QString & query )
+DataBaseInterface::ResultList CorrelationSearchAlgorithm::exec( const TQString & query )
{
//FIXME, this code is shit.
DataBaseInterface::ResultList res;
if(di->words(query).count()>1) return res;
- QMap<QString,float> corRes = di->correlation(query,0,false);
+ TQMap<TQString,float> corRes = di->correlation(query,0,false);
float max=0,max1=0,max2=0;
- QString best,best1,best2;
+ TQString best,best1,best2;
- for(QMap<QString,float>::iterator it = corRes.begin(); it !=corRes.end(); ++it)
+ for(TQMap<TQString,float>::iterator it = corRes.begin(); it !=corRes.end(); ++it)
{
if(it.data()>max)
{
@@ -414,7 +414,7 @@ SingleWordSearchAlgorithm::SingleWordSearchAlgorithm( DataBaseInterface * dbi, D
addAlgorithm(&corr);
}
-DataBaseInterface::ResultList SingleWordSearchAlgorithm::exec( const QString & query )
+DataBaseInterface::ResultList SingleWordSearchAlgorithm::exec( const TQString & query )
{
if(di->words(query).count()>1)
return ResultList();
diff --git a/kbabel/kbabeldict/modules/dbsearchengine2/algorithms.h b/kbabel/kbabeldict/modules/dbsearchengine2/algorithms.h
index 5f9ee682..aa049f85 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine2/algorithms.h
+++ b/kbabel/kbabeldict/modules/dbsearchengine2/algorithms.h
@@ -14,14 +14,14 @@
#include "database.h"
#include "chunk.h"
-#include <qobject.h>
+#include <tqobject.h>
class AbstractSearchAlgorithm : public QObject
{
Q_OBJECT
public:
- typedef QValueList<QueryResult> ResultList;
+ typedef TQValueList<QueryResult> ResultList;
AbstractSearchAlgorithm(DataBaseInterface *dbi,DBSESettings *sets)
{
@@ -31,7 +31,7 @@ class AbstractSearchAlgorithm : public QObject
/**
* this contains the algo and return some results.
*/
- virtual DataBaseInterface::ResultList exec(const QString& query)=0;
+ virtual DataBaseInterface::ResultList exec(const TQString& query)=0;
signals:
void newResult(QueryResult);
@@ -50,7 +50,7 @@ class ExactSearchAlgorithm : public AbstractSearchAlgorithm
public:
ExactSearchAlgorithm(DataBaseInterface *dbi,DBSESettings *sets) : AbstractSearchAlgorithm(dbi,sets) {}
- virtual DataBaseInterface::ResultList exec(const QString& query);
+ virtual DataBaseInterface::ResultList exec(const TQString& query);
};
class AlphaSearchAlgorithm : public AbstractSearchAlgorithm
@@ -59,7 +59,7 @@ class AlphaSearchAlgorithm : public AbstractSearchAlgorithm
public:
AlphaSearchAlgorithm(DataBaseInterface *dbi,DBSESettings *sets) : AbstractSearchAlgorithm(dbi,sets) {}
- virtual DataBaseInterface::ResultList exec(const QString& query);
+ virtual DataBaseInterface::ResultList exec(const TQString& query);
};
class SentenceArchiveSearchAlgorithm : public AbstractSearchAlgorithm
@@ -68,7 +68,7 @@ class SentenceArchiveSearchAlgorithm : public AbstractSearchAlgorithm
public:
SentenceArchiveSearchAlgorithm(DataBaseInterface *dbi,DBSESettings *sets) ;
- virtual DataBaseInterface::ResultList exec(const QString& query);
+ virtual DataBaseInterface::ResultList exec(const TQString& query);
};
class ChunkByChunkSearchAlgorithm : public AbstractSearchAlgorithm
@@ -77,7 +77,7 @@ class ChunkByChunkSearchAlgorithm : public AbstractSearchAlgorithm
public:
ChunkByChunkSearchAlgorithm(DataBaseInterface *dbi,DBSESettings *sets);
- virtual DataBaseInterface::ResultList exec(const QString& query);
+ virtual DataBaseInterface::ResultList exec(const TQString& query);
void setChunkFactory(AbstractChunkFactory *_factory)
{
@@ -93,7 +93,7 @@ class FuzzyChunkSearchAlgorithm : public AbstractSearchAlgorithm
public:
FuzzyChunkSearchAlgorithm(DataBaseInterface *dbi,DBSESettings *sets);
- virtual DataBaseInterface::ResultList exec(const QString& query);
+ virtual DataBaseInterface::ResultList exec(const TQString& query);
void setChunkFactory(AbstractChunkFactory *_factory)
{
factory=_factory;
@@ -108,14 +108,14 @@ class GenericSearchAlgorithm : public AbstractSearchAlgorithm
public:
GenericSearchAlgorithm(DataBaseInterface *dbi,DBSESettings *sets) ;
- virtual ResultList exec(const QString& query);
+ virtual ResultList exec(const TQString& query);
void addAlgorithm(AbstractSearchAlgorithm *algo);
void setMaxResultNumber(uint num){maxResults=num;}
protected:
- QValueList<AbstractSearchAlgorithm *> algoChain;
+ TQValueList<AbstractSearchAlgorithm *> algoChain;
uint maxResults;
};
@@ -125,7 +125,7 @@ class CorrelationSearchAlgorithm : public AbstractSearchAlgorithm
Q_OBJECT
public:
CorrelationSearchAlgorithm(DataBaseInterface *dbi,DBSESettings *sets) : AbstractSearchAlgorithm(dbi,sets) {}
- virtual ResultList exec(const QString& query);
+ virtual ResultList exec(const TQString& query);
};
@@ -135,7 +135,7 @@ class SingleWordSearchAlgorithm : public GenericSearchAlgorithm
Q_OBJECT
public:
SingleWordSearchAlgorithm(DataBaseInterface *dbi,DBSESettings *sets);
- virtual DataBaseInterface::ResultList exec(const QString& query);
+ virtual DataBaseInterface::ResultList exec(const TQString& query);
private:
ExactSearchAlgorithm exact;
diff --git a/kbabel/kbabeldict/modules/dbsearchengine2/chunk.cpp b/kbabel/kbabeldict/modules/dbsearchengine2/chunk.cpp
index 7c62748a..ef426d53 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine2/chunk.cpp
+++ b/kbabel/kbabeldict/modules/dbsearchengine2/chunk.cpp
@@ -19,12 +19,12 @@ AbstractChunk::~AbstractChunk( )
{
}
-WordChunk::WordChunk( DataBaseInterface * di, QString _word ) : AbstractChunk(di)
+WordChunk::WordChunk( DataBaseInterface * di, TQString _word ) : AbstractChunk(di)
{
word=_word;
}
-QValueList<QueryResult> WordChunk::translations( )
+TQValueList<QueryResult> WordChunk::translations( )
{
DataBaseInterface::ResultList r;
SingleWordSearchAlgorithm sa(di,di->getSettings());
@@ -32,13 +32,13 @@ QValueList<QueryResult> WordChunk::translations( )
return r;
}
-//QValueList<QueryResult> WordChunk::translationsFromReference( uint reference )
+//TQValueList<QueryResult> WordChunk::translationsFromReference( uint reference )
//{
//}
-QValueList< uint > WordChunk::locationReferences( )
+TQValueList< uint > WordChunk::locationReferences( )
{
- QValueList<uint> res=di->getWordIndex(word);
+ TQValueList<uint> res=di->getWordIndex(word);
kdDebug(0) << "Number of locations " << res.count() <<endl ;
return res;
/* DBItemMainKey *k = new DBItemMainKey(word);
@@ -46,20 +46,20 @@ QValueList< uint > WordChunk::locationReferences( )
if(wordsindex->get(k,d)!=DB_NOTFOUND)
return d->getList();
else
- return QValueList<uint> tmpList;
+ return TQValueList<uint> tmpList;
*/
}
-void WordChunk::setLocationReferences( QValueList< uint > )
+void WordChunk::setLocationReferences( TQValueList< uint > )
{
}
-SentenceChunk::SentenceChunk( DataBaseInterface * di, QString _sentence ): AbstractChunk(di)
+SentenceChunk::SentenceChunk( DataBaseInterface * di, TQString _sentence ): AbstractChunk(di)
{
sentence=_sentence;
}
-QValueList<QueryResult> SentenceChunk::translations( )
+TQValueList<QueryResult> SentenceChunk::translations( )
{
GenericSearchAlgorithm g(di,di->getSettings());
@@ -75,29 +75,29 @@ QValueList<QueryResult> SentenceChunk::translations( )
}
-//QValueList<QueryResult> SentenceChunk::translationsFromReference( uint reference )
+//TQValueList<QueryResult> SentenceChunk::translationsFromReference( uint reference )
//{
//
//}
-QValueList< uint > SentenceChunk::locationReferences( )
+TQValueList< uint > SentenceChunk::locationReferences( )
{
}
-void SentenceChunk::setLocationReferences( QValueList< uint > )
+void SentenceChunk::setLocationReferences( TQValueList< uint > )
{
}
-QPtrList< AbstractChunk> WordChunkFactory::chunks()
+TQPtrList< AbstractChunk> WordChunkFactory::chunks()
{
- QString str=di->simple(string);
- QPtrList<AbstractChunk> list;
+ TQString str=di->simple(string);
+ TQPtrList<AbstractChunk> list;
if(str.isEmpty()) return list;
_separators.clear();
kdDebug(0) << "Word chunks of:" <<str << endl;
int pos;
- QString sep;
- QRegExp r("(\\s)");
+ TQString sep;
+ TQRegExp r("(\\s)");
do {
pos=r.search(str);
@@ -120,10 +120,10 @@ QPtrList< AbstractChunk> WordChunkFactory::chunks()
-QPtrList<AbstractChunk> SentenceChunkFactory::chunks()
+TQPtrList<AbstractChunk> SentenceChunkFactory::chunks()
{
- QString str=string;
- QPtrList<AbstractChunk> list;
+ TQString str=string;
+ TQPtrList<AbstractChunk> list;
if(str.isEmpty()) return list;
// kdDebug(0) << s << endl;
@@ -132,9 +132,9 @@ QPtrList<AbstractChunk> SentenceChunkFactory::chunks()
do {
- QRegExp re("((\\.|;|\\?|\\!|:)( |$|\\\\n\\n))");
+ TQRegExp re("((\\.|;|\\?|\\!|:)( |$|\\\\n\\n))");
pos=re.search(str);
- QString sep=re.cap(1);
+ TQString sep=re.cap(1);
if(!str.left(pos).isEmpty())
{
@@ -154,14 +154,14 @@ QPtrList<AbstractChunk> SentenceChunkFactory::chunks()
return list;
}
-QPtrList< AbstractChunk > CaseBasedWordChunkFactory::chunks( )
+TQPtrList< AbstractChunk > CaseBasedWordChunkFactory::chunks( )
{
- QString str=string;
- QPtrList<AbstractChunk> list;
+ TQString str=string;
+ TQPtrList<AbstractChunk> list;
if(str.isEmpty()) return list;
uint slen=str.length();
kdDebug(0) << "CaseWordChunk string:" << str << endl;
- QString tmpWord;
+ TQString tmpWord;
bool upcase;
for(uint i=0;i<=slen;i++)
{
diff --git a/kbabel/kbabeldict/modules/dbsearchengine2/chunk.h b/kbabel/kbabeldict/modules/dbsearchengine2/chunk.h
index 5c5fcb93..2578e59e 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine2/chunk.h
+++ b/kbabel/kbabeldict/modules/dbsearchengine2/chunk.h
@@ -11,8 +11,8 @@
//
#ifndef DBSE2_CHUNK_H
#define DBSE2_CHUNK_H
-#include <qstring.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
#include "database.h"
/**
@@ -29,13 +29,13 @@ class AbstractChunk
/**
* This function should return a list of translation for the current chunk.
*/
- virtual QValueList<QueryResult> translations()=0;
+ virtual TQValueList<QueryResult> translations()=0;
//FIXME: is this in the right place, better in factory? check that stuff
- //virtual QValueList<QueryResult> translationsFromReference(uint reference)=0;
- virtual QValueList<uint> locationReferences()=0;
- virtual void setLocationReferences(QValueList<uint>)=0;
- virtual QString chunkString()=0;
+ //virtual TQValueList<QueryResult> translationsFromReference(uint reference)=0;
+ virtual TQValueList<uint> locationReferences()=0;
+ virtual void setLocationReferences(TQValueList<uint>)=0;
+ virtual TQString chunkString()=0;
protected:
DataBaseInterface *di;
@@ -47,16 +47,16 @@ class AbstractChunk
class WordChunk : public AbstractChunk
{
public:
- WordChunk(DataBaseInterface *di,QString _word);
- virtual QValueList<QueryResult> translations();
- //virtual QValueList<QueryResult> translationsFromReference(uint reference);
- virtual QValueList<uint> locationReferences();
- virtual void setLocationReferences(QValueList<uint>);
- virtual QString chunkString(){return word;}
+ WordChunk(DataBaseInterface *di,TQString _word);
+ virtual TQValueList<QueryResult> translations();
+ //virtual TQValueList<QueryResult> translationsFromReference(uint reference);
+ virtual TQValueList<uint> locationReferences();
+ virtual void setLocationReferences(TQValueList<uint>);
+ virtual TQString chunkString(){return word;}
- //static QValueList<WordChunk> divide(QString);
+ //static TQValueList<WordChunk> divide(TQString);
private:
- QString word;
+ TQString word;
};
/**
@@ -65,17 +65,17 @@ class WordChunk : public AbstractChunk
class SentenceChunk : public AbstractChunk
{
public:
- SentenceChunk(DataBaseInterface *di,QString _sentence);
- virtual QValueList<QueryResult> translations();
- //virtual QValueList<QueryResult> translationsFromReference(uint reference);
- virtual QValueList<uint> locationReferences();
- virtual void setLocationReferences(QValueList<uint>);
- virtual QString chunkString(){return sentence;}
+ SentenceChunk(DataBaseInterface *di,TQString _sentence);
+ virtual TQValueList<QueryResult> translations();
+ //virtual TQValueList<QueryResult> translationsFromReference(uint reference);
+ virtual TQValueList<uint> locationReferences();
+ virtual void setLocationReferences(TQValueList<uint>);
+ virtual TQString chunkString(){return sentence;}
- // static QValueList<SentenceChunk> divide(QString);
+ // static TQValueList<SentenceChunk> divide(TQString);
private:
- QString sentence;
+ TQString sentence;
};
@@ -92,11 +92,11 @@ class AbstractChunkFactory
di=_di;
}
virtual ~AbstractChunkFactory(){}
- virtual QPtrList<AbstractChunk> chunks()=0;
+ virtual TQPtrList<AbstractChunk> chunks()=0;
/**
Change th string and return the chunks
*/
- virtual QPtrList<AbstractChunk> chunks(const QString& s)
+ virtual TQPtrList<AbstractChunk> chunks(const TQString& s)
{
string=s;
return chunks();
@@ -105,14 +105,14 @@ class AbstractChunkFactory
* Returns the list of separators of last @ref chunks() call
*/
- virtual QStringList separators(){ return _separators;}
- void setQuery(const QString& s)
+ virtual TQStringList separators(){ return _separators;}
+ void setQuery(const TQString& s)
{
string=s;
}
protected:
- QString string;
- QStringList _separators;
+ TQString string;
+ TQStringList _separators;
DataBaseInterface *di;
};
@@ -123,7 +123,7 @@ class WordChunkFactory : public AbstractChunkFactory
/**
YOU SHOULD DELETE THE CHUNKS!!
*/
- virtual QPtrList<AbstractChunk> chunks();
+ virtual TQPtrList<AbstractChunk> chunks();
};
class CaseBasedWordChunkFactory : public AbstractChunkFactory
@@ -133,7 +133,7 @@ class CaseBasedWordChunkFactory : public AbstractChunkFactory
/**
YOU SHOULD DELETE THE CHUNKS!!
*/
- virtual QPtrList<AbstractChunk> chunks();
+ virtual TQPtrList<AbstractChunk> chunks();
};
class SentenceChunkFactory : public AbstractChunkFactory
@@ -144,7 +144,7 @@ class SentenceChunkFactory : public AbstractChunkFactory
/**
YOU SHOULD DELETE THE CHUNKS!!
*/
- virtual QPtrList<AbstractChunk> chunks();
+ virtual TQPtrList<AbstractChunk> chunks();
};
diff --git a/kbabel/kbabeldict/modules/dbsearchengine2/database.cpp b/kbabel/kbabeldict/modules/dbsearchengine2/database.cpp
index ea0e8379..0631f7ad 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine2/database.cpp
+++ b/kbabel/kbabeldict/modules/dbsearchengine2/database.cpp
@@ -8,8 +8,8 @@ License: GPLv2
#include <math.h>
#include "database.h"
-#include <qregexp.h>
-#include <qdict.h>
+#include <tqregexp.h>
+#include <tqdict.h>
#include <kapplication.h>
#include <kdebug.h>
#include <kmessagebox.h>
@@ -21,7 +21,7 @@ License: GPLv2
-DataBase::DataBase(QString dbpath,QString dbname, QString dblang) : Db(0,DB_CXX_NO_EXCEPTIONS)
+DataBase::DataBase(TQString dbpath,TQString dbname, TQString dblang) : Db(0,DB_CXX_NO_EXCEPTIONS)
{
filename=dbpath+"."+dblang+".db";
@@ -59,11 +59,11 @@ unsigned int DataBase::getLast()
-QueryResult::QueryResult(QString r)
+QueryResult::QueryResult(TQString r)
{
res=r;
}
-QueryResult::QueryResult(QString r,QString o,int s)
+QueryResult::QueryResult(TQString r,TQString o,int s)
{
res=r;
richr=r;
@@ -80,7 +80,7 @@ QueryResult::QueryResult()
-DataBaseInterface::DataBaseInterface(QString dir, DBSESettings *sets)
+DataBaseInterface::DataBaseInterface(TQString dir, DBSESettings *sets)
{
//FIXME Better db names!!
@@ -125,7 +125,7 @@ DataBaseInterface::~DataBaseInterface()
}
-DataBase *DataBaseInterface::openMyDataBase(const QString& prefix,const QString& name,const QString& l,DBTYPE tt)
+DataBase *DataBaseInterface::openMyDataBase(const TQString& prefix,const TQString& name,const TQString& l,DBTYPE tt)
{
DataBase *aDb = new DataBase(prefix,name,l);
@@ -163,7 +163,7 @@ DataBase *DataBaseInterface::openMyDataBase(const QString& prefix,const QString&
*/
-DataBaseInterface::MainEntry DataBaseInterface::get(const QString& query,SearchFilter *filter)
+DataBaseInterface::MainEntry DataBaseInterface::get(const TQString& query,SearchFilter *filter)
{
static int counter=1;
counter++;
@@ -184,11 +184,11 @@ DataBaseInterface::MainEntry DataBaseInterface::get(const QString& query,SearchF
*/
-bool DataBaseInterface::addEntry(QString original,QString translated,InputInfo *info)
+bool DataBaseInterface::addEntry(TQString original,TQString translated,InputInfo *info)
{
DBItemMainKey mk(original);
DBItemMainData md;
- QMap<QString, int> correlationDiff;
+ TQMap<TQString, int> correlationDiff;
bool newentry=false;
//try to get
kdDebug(0) << "Inserting the pair:" << endl;
@@ -220,8 +220,8 @@ bool DataBaseInterface::addEntry(QString original,QString translated,InputInfo *
alpha->put(&ka,&in);
kdDebug(0) << "Updating the word index " << endl;
//Update words index
- QStringList ws=words(original);
- for(QStringList::iterator it = ws.begin(); it!=ws.end(); ++it)
+ TQStringList ws=words(original);
+ for(TQStringList::iterator it = ws.begin(); it!=ws.end(); ++it)
{
DBItemMainKey word(*it);
DBItemMultiIndex win;
@@ -240,8 +240,8 @@ bool DataBaseInterface::addEntry(QString original,QString translated,InputInfo *
//Update sentence index
- QStringList so=sentences(original);
- QStringList st=sentences(translated);
+ TQStringList so=sentences(original);
+ TQStringList st=sentences(translated);
if(so.count()==st.count() && st.count() >1 ) //we already hav a database for single string.
{
kdDebug(0) << "inside sentence loop" << endl;
@@ -276,11 +276,11 @@ bool DataBaseInterface::addEntry(QString original,QString translated,InputInfo *
if(!translated.isEmpty())
{
//loop on all translations to update correlation
- QStringList tmpTranslations=md.getTranslations();
- for(QStringList::iterator otIt=tmpTranslations.begin(); otIt!=tmpTranslations.end();++otIt)
+ TQStringList tmpTranslations=md.getTranslations();
+ for(TQStringList::iterator otIt=tmpTranslations.begin(); otIt!=tmpTranslations.end();++otIt)
{
- QStringList wt=words(*otIt);
- for(QStringList::iterator it = wt.begin(); it!=wt.end(); ++it)
+ TQStringList wt=words(*otIt);
+ for(TQStringList::iterator it = wt.begin(); it!=wt.end(); ++it)
{
if(correlationDiff.contains(*it))
correlationDiff[*it]--;
@@ -294,10 +294,10 @@ bool DataBaseInterface::addEntry(QString original,QString translated,InputInfo *
md.addTranslation(translated,info->ref());
tmpTranslations=md.getTranslations();
- for(QStringList::iterator otIt=tmpTranslations.begin(); otIt!=tmpTranslations.end();++otIt)
+ for(TQStringList::iterator otIt=tmpTranslations.begin(); otIt!=tmpTranslations.end();++otIt)
{
- QStringList wt=words(*otIt);
- for(QStringList::iterator it = wt.begin(); it!=wt.end(); ++it)
+ TQStringList wt=words(*otIt);
+ for(TQStringList::iterator it = wt.begin(); it!=wt.end(); ++it)
{
if(correlationDiff.contains(*it))
correlationDiff[*it]++;
@@ -316,7 +316,7 @@ bool DataBaseInterface::addEntry(QString original,QString translated,InputInfo *
}
-bool DataBaseInterface::removeEntry(QString original)
+bool DataBaseInterface::removeEntry(TQString original)
{
DBItemMainKey mk(original);
DBItemMainData md;
@@ -346,8 +346,8 @@ bool DataBaseInterface::removeEntry(QString original)
alpha->put(&ka,&in);
//Update words index
- QStringList ws=words(original);
- for(QStringList::iterator it = ws.begin(); it!=ws.end(); it++)
+ TQStringList ws=words(original);
+ for(TQStringList::iterator it = ws.begin(); it!=ws.end(); it++)
{
DBItemMainKey word(*it);
DBItemMultiIndex win;
@@ -357,8 +357,8 @@ bool DataBaseInterface::removeEntry(QString original)
}
//Update sentence index
- QStringList so=sentences(original);
- QStringList st=sentences(translated);
+ TQStringList so=sentences(original);
+ TQStringList st=sentences(translated);
if(so.count()==st.count() && st.count() >1 ) //we already hav a database for single string.
{
for(int i=0; i< so.count() ; i++)
@@ -380,16 +380,16 @@ bool DataBaseInterface::removeEntry(QString original)
-QMap<QString,float> DataBaseInterface::correlation(QString word,SearchFilter *filter,bool notify, float minSign)
+TQMap<TQString,float> DataBaseInterface::correlation(TQString word,SearchFilter *filter,bool notify, float minSign)
{
- QDict<unsigned int> res;
+ TQDict<unsigned int> res;
// res.setAutoDelete(true);
- QMap<QString, float>final;
+ TQMap<TQString, float>final;
DBItemMultiIndex::IndexList il;
unsigned int tot=0;
unsigned int background=0;
unsigned int nocck;
- QString sword=simple(word);
+ TQString sword=simple(word);
DBItemMainKey *k = new DBItemMainKey(sword);
DBItemMultiIndex *d = new DBItemMultiIndex();
if(wordsindex->get(k,d)!=DB_NOTFOUND)
@@ -398,29 +398,29 @@ QMap<QString,float> DataBaseInterface::correlation(QString word,SearchFilter *fi
il=d->getList();
kdDebug(0) << il.count()<<endl;
tot=0;
- for(QValueList<unsigned int>::iterator it=il.begin();it!=il.end();++it)
+ for(TQValueList<unsigned int>::iterator it=il.begin();it!=il.end();++it)
{
numindex->get(*it,k);
- // QValueList<QueryResult> trad=exactMatch(k->getString(),filter);
+ // TQValueList<QueryResult> trad=exactMatch(k->getString(),filter);
MainEntry e=get(k->getString(),filter);
- QStringList trad=e.second.getTranslations();
+ TQStringList trad=e.second.getTranslations();
nocck=words(k->getString()).contains(sword);
- for( QStringList::iterator it2=trad.begin();it2!=trad.end();++it2)
+ for( TQStringList::iterator it2=trad.begin();it2!=trad.end();++it2)
{
- QStringList w=words(*it2);
+ TQStringList w=words(*it2);
unsigned int numWords = w.count()*10+1;
unsigned int wei=100000/sqrt(numWords); //weight (is the best one?)
background+=(numWords-nocck)*wei;
- QDict<uint> count;
+ TQDict<uint> count;
//count.setAutoDelete(true);
//FIXME:SET AUTODELETE FOR ALL DICTS
- for(QStringList::iterator it1=w.begin();it1!=w.end();it1++)
+ for(TQStringList::iterator it1=w.begin();it1!=w.end();it1++)
{
uint *ip;
if(!(ip=count[*it1])) count.insert(*it1,new uint(1));
@@ -428,7 +428,7 @@ QMap<QString,float> DataBaseInterface::correlation(QString word,SearchFilter *fi
(*ip)++;
}
- for(QStringList::iterator it1=w.begin();it1!=w.end();it1++)
+ for(TQStringList::iterator it1=w.begin();it1!=w.end();it1++)
{
uint *ip;
if(*(count[*it1])==nocck) //add only if same number of entry (it cuts articles)
@@ -442,7 +442,7 @@ QMap<QString,float> DataBaseInterface::correlation(QString word,SearchFilter *fi
unsigned int sqrBG=sqrt((1.0*background+1)/10000);
- for(QDictIterator<uint> it(res) ; it.current(); ++it)
+ for(TQDictIterator<uint> it(res) ; it.current(); ++it)
{
float sign=1.0*(*(it.current()))/(10000.0*sqrBG);
if(sign >minSign){
@@ -457,15 +457,15 @@ QMap<QString,float> DataBaseInterface::correlation(QString word,SearchFilter *fi
return final;
}
-QStringList DataBaseInterface::words(QString s)
+TQStringList DataBaseInterface::words(TQString s)
{
- QString str=simple(s);
- QStringList list;
+ TQString str=simple(s);
+ TQStringList list;
int pos;
do {
- pos=str.find(QRegExp("\\s"));
+ pos=str.find(TQRegExp("\\s"));
// if(!simple(str.left(pos)).isEmpty())
// list.append(simple(str.left(pos)));
if(!str.left(pos).isEmpty())
@@ -476,24 +476,24 @@ QStringList DataBaseInterface::words(QString s)
return list;
}
-QString DataBaseInterface::simple(QString str,bool ck)
+TQString DataBaseInterface::simple(TQString str,bool ck)
{
- QString res;
+ TQString res;
if(ck)
res=str; //case keep
else
res=str.lower(); //lowercase
//FIXME: uncoment the foll. line (check speed)
- res=res.replace(QRegExp("(<(.*)>)(.*)(</\\2>)"),"\\3"); //remove enclosing tags
+ res=res.replace(TQRegExp("(<(.*)>)(.*)(</\\2>)"),"\\3"); //remove enclosing tags
//Try to get rid of regexps.
- // res=res.replace(QRegExp("(('|-|_|\\s|[^\\w%])+)")," "); //strip non-word char
- // res=res.replace(QRegExp("(('|-|_)+)")," "); //strip non-word char
- // res=res.replace(QRegExp("[^\\w\\s%]"),""); //strip non-word char
+ // res=res.replace(TQRegExp("(('|-|_|\\s|[^\\w%])+)")," "); //strip non-word char
+ // res=res.replace(TQRegExp("(('|-|_)+)")," "); //strip non-word char
+ // res=res.replace(TQRegExp("[^\\w\\s%]"),""); //strip non-word char
- QString r;
- QChar c;
+ TQString r;
+ TQChar c;
bool wasSpace=true;
uint len=res.length();
for(uint i=0; i<len;i++)
@@ -540,10 +540,10 @@ QString DataBaseInterface::simple(QString str,bool ck)
return res;
}
-QStringList DataBaseInterface::sentences(QString s)
+TQStringList DataBaseInterface::sentences(TQString s)
{
- QString str=s;
- QStringList list;
+ TQString str=s;
+ TQStringList list;
// kdDebug(0) << s << endl;
@@ -551,7 +551,7 @@ QStringList DataBaseInterface::sentences(QString s)
do {
- QRegExp re("((\\.|;|\\?|\\!|:)( |$|\\\\n\\n))");
+ TQRegExp re("((\\.|;|\\?|\\!|:)( |$|\\\\n\\n))");
pos=re.search(str);
if(!str.left(pos).isEmpty())
list.append(str.left(pos).stripWhiteSpace());
@@ -565,20 +565,20 @@ QStringList DataBaseInterface::sentences(QString s)
return list;
}
-QStringList DataBaseInterface::sentencesSeparator(QString s)
+TQStringList DataBaseInterface::sentencesSeparator(TQString s)
{
- QString str=s;
- QStringList list;
+ TQString str=s;
+ TQStringList list;
// kdDebug(0) << s << endl;
int pos;
do {
- QRegExp re;
+ TQRegExp re;
re.setPattern("([.:?!;]( |$|\\\\n\\n))");
pos = re.search(str);
- QString separator=re.cap(1);
+ TQString separator=re.cap(1);
if(pos!=-1){
list.append(separator);
}
@@ -589,26 +589,26 @@ QStringList DataBaseInterface::sentencesSeparator(QString s)
return list;
}
-bool DataBaseInterface::isUpper(QChar s)
+bool DataBaseInterface::isUpper(TQChar s)
{
return s==s.upper();
}
-bool DataBaseInterface::isLower(QChar s)
+bool DataBaseInterface::isLower(TQChar s)
{
return s==s.lower();
}
-QString DataBaseInterface::format(QString _s,QString t)
+TQString DataBaseInterface::format(TQString _s,TQString t)
{
//FIXME use settings
//FIXME use regexp
- QString s=_s;
- QString noTagT=t.replace(QRegExp("(<(.*)>)(.*)(</\\2>)"),"\\3");
- QChar first=noTagT[noTagT.find(QRegExp("\\w"))];
+ TQString s=_s;
+ TQString noTagT=t.replace(TQRegExp("(<(.*)>)(.*)(</\\2>)"),"\\3");
+ TQChar first=noTagT[noTagT.find(TQRegExp("\\w"))];
bool firstCapital=isUpper(first);
/*
@@ -643,9 +643,9 @@ if(columnAtEnd)
if(allupper)
s=s.upper();
- int pos=t.find(QRegExp("&"));
+ int pos=t.find(TQRegExp("&"));
if(pos>=0) {
- QChar accel=t[t.find(QRegExp("&"))+1];
+ TQChar accel=t[t.find(TQRegExp("&"))+1];
if(accel!='&')
{
@@ -667,32 +667,32 @@ if(columnAtEnd)
}
-QString DataBaseInterface::formatRegExp(QString _s, QString t, QString tre,QString stringSearch,QString stringReplace)
+TQString DataBaseInterface::formatRegExp(TQString _s, TQString t, TQString tre,TQString stringSearch,TQString stringReplace)
{
- QString s=_s;
- QRegExp templateRegExp(tre);
- //QString stringSearch = "(.*)!@CAP1@$"; // use @CAP1.. fot caps in templates
- //QString stringReplace = "\\1@CAP1@"; // use \1, \2 for caps in str and @CAP1 fot caps in template
+ TQString s=_s;
+ TQRegExp templateRegExp(tre);
+ //TQString stringSearch = "(.*)!@CAP1@$"; // use @CAP1.. fot caps in templates
+ //TQString stringReplace = "\\1@CAP1@"; // use \1, \2 for caps in str and @CAP1 fot caps in template
if(templateRegExp.exactMatch(t))
{
- QStringList caps=templateRegExp.capturedTexts();
+ TQStringList caps=templateRegExp.capturedTexts();
int i=0;
- for(QStringList::iterator capit=caps.begin();capit!=caps.end();++capit)
+ for(TQStringList::iterator capit=caps.begin();capit!=caps.end();++capit)
{
- QString phRegExp="(?!\\\\)@CAP"+QString::number(i)+"@";
+ TQString phRegExp="(?!\\\\)@CAP"+TQString::number(i)+"@";
//kdDebug(0) << "phRegExp: " << phRegExp << endl;
//kdDebug(0) << "cap[" << i << "]: "<< *capit<< endl;
- stringReplace = stringReplace.replace(QRegExp(phRegExp),*capit);
- stringSearch = stringSearch.replace(QRegExp(phRegExp),*capit);
+ stringReplace = stringReplace.replace(TQRegExp(phRegExp),*capit);
+ stringSearch = stringSearch.replace(TQRegExp(phRegExp),*capit);
i++;
}
// kdDebug(0) << "stringSearch " << stringSearch << endl;
// kdDebug(0) << "stringReplace " << stringReplace << endl;
- QRegExp stringSearchRegExp = QRegExp(stringSearch);
+ TQRegExp stringSearchRegExp = TQRegExp(stringSearch);
// kdDebug(0) << "before: "<<s<<endl;
s = s.replace(stringSearchRegExp,stringReplace);
// kdDebug(0) << "after: "<<s<<endl;
@@ -702,7 +702,7 @@ QString DataBaseInterface::formatRegExp(QString _s, QString t, QString tre,QStri
return s;
}
-DBItemMultiIndex::IndexList DataBaseInterface::getAlpha( const QString & query )
+DBItemMultiIndex::IndexList DataBaseInterface::getAlpha( const TQString & query )
{
DBItemMainKey *k = new DBItemMainKey(simple(query));
DBItemMultiIndex *d = new DBItemMultiIndex();
@@ -718,7 +718,7 @@ DataBaseInterface::MainEntry DataBaseInterface::getFromIndex( uint i )
return get(k.getString(),0); //FIXME: this is a BUG right now but the filter should be removed
}
-DataBaseInterface::MainEntry DataBaseInterface::getSentence( const QString & query )
+DataBaseInterface::MainEntry DataBaseInterface::getSentence( const TQString & query )
{
static int counter=1;
@@ -731,7 +731,7 @@ DataBaseInterface::MainEntry DataBaseInterface::getSentence( const QString & que
}
-DBItemMultiIndex::IndexList DataBaseInterface::getWordIndex( const QString & query )
+DBItemMultiIndex::IndexList DataBaseInterface::getWordIndex( const TQString & query )
{
DBItemMainKey k = DBItemMainKey(query);
DBItemMultiIndex d = DBItemMultiIndex();
@@ -740,7 +740,7 @@ DBItemMultiIndex::IndexList DataBaseInterface::getWordIndex( const QString & que
}
else
{
- QValueList<unsigned int> tmpList;
+ TQValueList<unsigned int> tmpList;
return tmpList;
}
diff --git a/kbabel/kbabeldict/modules/dbsearchengine2/database.h b/kbabel/kbabeldict/modules/dbsearchengine2/database.h
index c447fa59..d6ed3482 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine2/database.h
+++ b/kbabel/kbabeldict/modules/dbsearchengine2/database.h
@@ -8,11 +8,11 @@
#ifndef DATABASE_2_H
#define DATABASE_2_H
-#include <qstring.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
#include <db4/db_cxx.h>
-#include <qobject.h>
-#include <qregexp.h>
+#include <tqobject.h>
+#include <tqregexp.h>
#include "dbentries.h"
@@ -43,7 +43,7 @@ public:
class DataBase : Db
{
public:
- DataBase(QString dbpath, QString dbname, QString dblang);
+ DataBase(TQString dbpath, TQString dbname, TQString dblang);
int open(DBTYPE type,unsigned int flags=0);
@@ -105,12 +105,12 @@ int get(DBItem * key,DBItem *data){
int close(unsigned int i) {return Db::close( i); }
//For scrolling
- // int getFirst(DBItem *key,DBItem *data,QString table);
- // int getNext(DBItem *key,DBItem *data,QString table);
- // bool isEnd(QString table);
+ // int getFirst(DBItem *key,DBItem *data,TQString table);
+ // int getNext(DBItem *key,DBItem *data,TQString table);
+ // bool isEnd(TQString table);
private:
- QString filename;
- QString database;
+ TQString filename;
+ TQString database;
DBTYPE mytype;
};
@@ -122,26 +122,26 @@ class QueryResult //from DBInterface to KDBSearchEngine
{
public:
QueryResult();
- QueryResult(QString r);
- QueryResult(QString r,QString o,int s);
- void setRichResult(QString r) { richr=r; }
- void setRichOriginal(QString r) { richo=r; }
+ QueryResult(TQString r);
+ QueryResult(TQString r,TQString o,int s);
+ void setRichResult(TQString r) { richr=r; }
+ void setRichOriginal(TQString r) { richo=r; }
- QString richResult() {return richr;}
- QString richOriginal() {return richo;}
+ TQString richResult() {return richr;}
+ TQString richOriginal() {return richo;}
- QString result(){ return res; }
- QString original() {return orig; }
+ TQString result(){ return res; }
+ TQString original() {return orig; }
int score() {return sco;}
//info contains originalkey,catalog,date,author etc...
ResultInfo info(){ResultInfo i; i.info="no info"; return i;}
private:
- QString res;
- QString orig;
- QString richr;
- QString richo;
+ TQString res;
+ TQString orig;
+ TQString richr;
+ TQString richo;
int sco;
};
@@ -158,34 +158,34 @@ class DataBaseInterface : public QObject
public:
//move result list typedef to AbstractAlgorthm or somewhere else
- typedef QValueList<QueryResult> ResultList;
+ typedef TQValueList<QueryResult> ResultList;
typedef QPair<DBItemMainKey,DBItemMainData> MainEntry;
- DataBaseInterface( QString dir, DBSESettings *sets);
+ DataBaseInterface( TQString dir, DBSESettings *sets);
~DataBaseInterface();
//Ask the Database to stop now.
void stop(bool b=true) {_stopNow=b;}
//Search words
- ResultList wordsMatch(QString query,SearchFilter *filter=0,bool notify=true);
+ ResultList wordsMatch(TQString query,SearchFilter *filter=0,bool notify=true);
//Edit database functions.
//addEntry and sync all the tables
- bool addEntry(QString original,QString translated,InputInfo *info);
+ bool addEntry(TQString original,TQString translated,InputInfo *info);
//FIXME:implement me!
- bool removeEntry(QString original);
+ bool removeEntry(TQString original);
//FIXME: go persistent!
- QMap<QString,float> correlation(QString word,SearchFilter *filter=0,bool notify=true,float minSign=0.2);
+ TQMap<TQString,float> correlation(TQString word,SearchFilter *filter=0,bool notify=true,float minSign=0.2);
// Read the database
- MainEntry get(const QString& query,SearchFilter *filter=0);
+ MainEntry get(const TQString& query,SearchFilter *filter=0);
MainEntry getFromIndex(uint i);
- DBItemMultiIndex::IndexList getAlpha(const QString& query);
- DBItemMultiIndex::IndexList getWordIndex(const QString& query);
- MainEntry getSentence(const QString& query);
+ DBItemMultiIndex::IndexList getAlpha(const TQString& query);
+ DBItemMultiIndex::IndexList getWordIndex(const TQString& query);
+ MainEntry getSentence(const TQString& query);
//Database status check functions
bool mainOk() {return main!=0;}
@@ -206,7 +206,7 @@ class DataBaseInterface : public QObject
DBSESettings *getSettings() {return settings;}
private:
- DataBase * openMyDataBase(const QString& prefix,const QString& name,const QString& l,DBTYPE tt);
+ DataBase * openMyDataBase(const TQString& prefix,const TQString& name,const TQString& l,DBTYPE tt);
DataBase *main;
DataBase *numindex;
DataBase *wordsindex;
@@ -222,14 +222,14 @@ class DataBaseInterface : public QObject
//FIXME:Move to KBabel common library.
public:
- QString format( QString _s,QString t);
- QString formatRegExp(QString _s, QString t, QString tre,QString stringSearch,QString stringReplace);
- static QStringList words(QString s);
- static QStringList sentences(QString s);
- static QStringList sentencesSeparator(QString s);
- static QString simple(QString str,bool ck=false);
- static bool isUpper(QChar s);
- static bool isLower(QChar s);
+ TQString format( TQString _s,TQString t);
+ TQString formatRegExp(TQString _s, TQString t, TQString tre,TQString stringSearch,TQString stringReplace);
+ static TQStringList words(TQString s);
+ static TQStringList sentences(TQString s);
+ static TQStringList sentencesSeparator(TQString s);
+ static TQString simple(TQString str,bool ck=false);
+ static bool isUpper(TQChar s);
+ static bool isLower(TQChar s);
};
diff --git a/kbabel/kbabeldict/modules/dbsearchengine2/dbentries.cpp b/kbabel/kbabeldict/modules/dbsearchengine2/dbentries.cpp
index 4f048f9c..efa7e44d 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine2/dbentries.cpp
+++ b/kbabel/kbabeldict/modules/dbsearchengine2/dbentries.cpp
@@ -1,12 +1,12 @@
#include "dbentries.h"
-#include <qdatastream.h>
+#include <tqdatastream.h>
void DBItem::set()
{
- QBuffer b(mydata);
+ TQBuffer b(mydata);
b.open( IO_WriteOnly );
- QDataStream s(&b);
+ TQDataStream s(&b);
write(&s);
b.close();
set_data(mydata.data());
@@ -18,7 +18,7 @@ void DBItem::set()
mydata.resize(get_size());
mydata.duplicate((const char *)get_data(),(unsigned int)get_size());
- QDataStream *s = new QDataStream(mydata,IO_ReadOnly);
+ TQDataStream *s = new TQDataStream(mydata,IO_ReadOnly);
read(s);
delete s;
}
@@ -31,18 +31,18 @@ DBItemMainKey::DBItemMainKey()
//set();
}
-DBItemMainKey::DBItemMainKey(QString searchstring)
+DBItemMainKey::DBItemMainKey(TQString searchstring)
{
sstr=searchstring;
//set();
}
-void DBItemMainKey::read(QDataStream *s)
+void DBItemMainKey::read(TQDataStream *s)
{
*s >> sstr;
}
-void DBItemMainKey::write(QDataStream *s)
+void DBItemMainKey::write(TQDataStream *s)
{
*s << sstr;
}
@@ -64,17 +64,17 @@ void DBItemMainData::clear()
//set();
}
-void DBItemMainData::read(QDataStream *s)
+void DBItemMainData::read(TQDataStream *s)
{
*s >> indexnumber >> translations;
}
-void DBItemMainData::write(QDataStream *s)
+void DBItemMainData::write(TQDataStream *s)
{
*s << (Q_UINT32)indexnumber << translations;
}
-void DBItemMainData::addTranslation(QString str, unsigned int ref)
+void DBItemMainData::addTranslation(TQString str, unsigned int ref)
{
//get();
if(translations[str].find(ref)==translations[str].end()) // If it do not exists
@@ -87,7 +87,7 @@ void DBItemMainData::addTranslation(QString str, unsigned int ref)
}
-void DBItemMainData::removeTranslation(QString str, unsigned int ref)
+void DBItemMainData::removeTranslation(TQString str, unsigned int ref)
{
//get();
translations[str].remove(ref);
@@ -100,8 +100,8 @@ void DBItemMainData::removeTranslation(QString str, unsigned int ref)
void DBItemMainData::removeRef( unsigned int ref)
{
//get();
-QMapIterator<QString,QValueList<unsigned int> > it2;
- for(QMapIterator<QString,QValueList<unsigned int> > it = translations.begin();
+TQMapIterator<TQString,TQValueList<unsigned int> > it2;
+ for(TQMapIterator<TQString,TQValueList<unsigned int> > it = translations.begin();
it!= translations.end(); /* it++*/)
{ //Dirty hack
it2=it;
@@ -113,11 +113,11 @@ QMapIterator<QString,QValueList<unsigned int> > it2;
//set();
}
-QStringList DBItemMainData::getTranslations()
+TQStringList DBItemMainData::getTranslations()
{
//get();
-QStringList result;
- for(QMapIterator<QString,QValueList<unsigned int> > it = translations.begin();
+TQStringList result;
+ for(TQMapIterator<TQString,TQValueList<unsigned int> > it = translations.begin();
it!= translations.end(); it++)
result.append(it.key());
@@ -125,7 +125,7 @@ return result;
}
-QValueList<unsigned int> DBItemMainData::getReferences(QString str)
+TQValueList<unsigned int> DBItemMainData::getReferences(TQString str)
{
//get();
return translations[str]; //this also add a "str" entry but we do not call set()!
@@ -160,12 +160,12 @@ void DBItemMultiIndex::removeEntry(unsigned int index)
}
-void DBItemMultiIndex::read(QDataStream *s)
+void DBItemMultiIndex::read(TQDataStream *s)
{
*s >> list;
}
-void DBItemMultiIndex::write(QDataStream *s)
+void DBItemMultiIndex::write(TQDataStream *s)
{
*s << list;
}
diff --git a/kbabel/kbabeldict/modules/dbsearchengine2/dbentries.h b/kbabel/kbabeldict/modules/dbsearchengine2/dbentries.h
index 0a40878c..c4410ade 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine2/dbentries.h
+++ b/kbabel/kbabeldict/modules/dbsearchengine2/dbentries.h
@@ -2,19 +2,19 @@
#define DBENTRIES_H
#include <db4/db_cxx.h>
-#include <qstring.h>
-#include <qbuffer.h>
-#include <qmap.h>
-#include <qstringlist.h>
-#include <qdatetime.h>
+#include <tqstring.h>
+#include <tqbuffer.h>
+#include <tqmap.h>
+#include <tqstringlist.h>
+#include <tqdatetime.h>
class CatalogInfo
{
- QString author;
- QDateTime datetime;
- QString filename;
- QString filepath;
+ TQString author;
+ TQDateTime datetime;
+ TQString filename;
+ TQString filepath;
};
@@ -23,13 +23,13 @@ class ResultInfo
{
public:
//Common info
- QString original; //placeholder
+ TQString original; //placeholder
//
//Multi reference info
- QValueList<CatalogInfo> catalogs;
+ TQValueList<CatalogInfo> catalogs;
- QString info;
+ TQString info;
};
@@ -54,9 +54,9 @@ public:
protected:
- virtual void read(QDataStream *s) = 0;
- virtual void write(QDataStream *s) = 0;
- QByteArray mydata;
+ virtual void read(TQDataStream *s) = 0;
+ virtual void write(TQDataStream *s) = 0;
+ TQByteArray mydata;
bool empty;
};
@@ -65,17 +65,17 @@ class DBItemMainKey : public DBItem
{
public:
DBItemMainKey();
- DBItemMainKey(QString searchstring);
+ DBItemMainKey(TQString searchstring);
- QString getString(){ return sstr;}
+ TQString getString(){ return sstr;}
private:
- virtual void read(QDataStream *s);
- virtual void write(QDataStream *s);
+ virtual void read(TQDataStream *s);
+ virtual void write(TQDataStream *s);
- QString sstr;
+ TQString sstr;
};
@@ -84,21 +84,21 @@ class DBItemMainData : public DBItem
{
public:
- typedef QMapIterator<QString,QValueList<unsigned int> > TranslationIterator;
- typedef QMap<QString,QValueList<unsigned int> > TranslationMap;
+ typedef TQMapIterator<TQString,TQValueList<unsigned int> > TranslationIterator;
+ typedef TQMap<TQString,TQValueList<unsigned int> > TranslationMap;
DBItemMainData();
- QStringList getTranslations();
- QValueList<unsigned int> getReferences(QString str);
+ TQStringList getTranslations();
+ TQValueList<unsigned int> getReferences(TQString str);
void clear();
//Add a translation with reference ref, if translation exists append
// ref to the list of references
- void addTranslation(QString str,unsigned int ref);
- void removeTranslation(QString str,unsigned int ref);
+ void addTranslation(TQString str,unsigned int ref);
+ void removeTranslation(TQString str,unsigned int ref);
//remove any reference to ref, if ref is the only reference of a translation
// the translation is removed
@@ -109,8 +109,8 @@ class DBItemMainData : public DBItem
private:
- virtual void read(QDataStream *s);
- virtual void write(QDataStream *s);
+ virtual void read(TQDataStream *s);
+ virtual void write(TQDataStream *s);
unsigned int indexnumber;
TranslationMap translations;
@@ -121,7 +121,7 @@ private:
class DBItemMultiIndex : public DBItem
{
public:
- typedef QValueList<unsigned int> IndexList;
+ typedef TQValueList<unsigned int> IndexList;
DBItemMultiIndex();
// DBItemMultiIndex(IndexList l);
@@ -134,8 +134,8 @@ class DBItemMultiIndex : public DBItem
private:
- virtual void read(QDataStream *s);
- virtual void write(QDataStream *s);
+ virtual void read(TQDataStream *s);
+ virtual void write(TQDataStream *s);
IndexList list;
diff --git a/kbabel/kbabeldict/modules/dbsearchengine2/dbscan.cpp b/kbabel/kbabeldict/modules/dbsearchengine2/dbscan.cpp
index b19b2db2..7c2d8564 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine2/dbscan.cpp
+++ b/kbabel/kbabeldict/modules/dbsearchengine2/dbscan.cpp
@@ -18,8 +18,8 @@
*/
#include "dbscan.h"
#include <kconfig.h>
-#include <qdir.h>
-#include <qfile.h>
+#include <tqdir.h>
+#include <tqfile.h>
#include <kapplication.h>
#include <kurl.h>
#include <kdebug.h>
@@ -69,9 +69,9 @@ void MessagesSource::getDialogValues(SourceDialog *sd)
type=sd->type->currentItem();
}
-QValueList<KURL> MessagesSource::urls()
+TQValueList<KURL> MessagesSource::urls()
{
- QValueList<KURL> urlList;
+ TQValueList<KURL> urlList;
if(type==0)
urlList.append(location);
if(type==1|| type==2)
@@ -81,18 +81,18 @@ QValueList<KURL> MessagesSource::urls()
}
-QValueList<KURL> MessagesSource::filesInDir(KURL url,bool recursive)
+TQValueList<KURL> MessagesSource::filesInDir(KURL url,bool recursive)
{
- QValueList<KURL> result;
- QDir d(url.path());
+ TQValueList<KURL> result;
+ TQDir d(url.path());
d.setMatchAllDirs(true);
kdDebug(0) << d.count() << " files in dir "<< url.path()<<endl;
const QFileInfoList* files = d.entryInfoList();
kdDebug(0) << files << endl;
- // QPtrListIterator<QFileInfo> it(*files);
+ // TQPtrListIterator<TQFileInfo> it(*files);
if(files){
- for (QPtrListIterator<QFileInfo> fileit(*files); !fileit.atLast(); ++fileit )
+ for (TQPtrListIterator<TQFileInfo> fileit(*files); !fileit.atLast(); ++fileit )
{
if ((*fileit)->isDir())
{
@@ -120,14 +120,14 @@ QValueList<KURL> MessagesSource::filesInDir(KURL url,bool recursive)
//FIXME: clean this class
PoScanner::PoScanner(DataBaseInterface *dbi,
- QObject *parent,const char *name):QObject(parent,name)
+ TQObject *parent,const char *name):TQObject(parent,name)
{
di=dbi;
removeOldCatalogTranslation=true;
count=0;
}
-bool PoScanner::scanPattern(QString pathName,QString pattern,bool rec)
+bool PoScanner::scanPattern(TQString pathName,TQString pattern,bool rec)
{
int tot;
//Only one progress bar!!
@@ -138,18 +138,18 @@ if (!called)
{ pb=true; count=0;}
called=true;
-kdDebug(0) << QString("Scanning: %1, %2").arg(pathName).arg(pattern) << endl;
+kdDebug(0) << TQString("Scanning: %1, %2").arg(pathName).arg(pattern) << endl;
if(pb)
{
emit patternStarted();
emit patternProgress(0);
}
- QDir d(pathName,pattern);
+ TQDir d(pathName,pattern);
d.setMatchAllDirs(true);
const QFileInfoList* files = d.entryInfoList();
tot=files->count();
- QPtrListIterator<QFileInfo> it(*files);
+ TQPtrListIterator<TQFileInfo> it(*files);
kdDebug(0) << tot << endl;
for ( int i=0; i<tot; i++ )
{
@@ -188,7 +188,7 @@ if(pb){called=false;count=0;}
return true;
}
-bool PoScanner::scanFile(QString fileName)
+bool PoScanner::scanFile(TQString fileName)
{
KURL u(fileName);
return scanURL(u);
@@ -202,10 +202,10 @@ emit fileStarted();
Catalog * catalog=new Catalog(this,"ScanPoCatalog");
-QString pretty=u.prettyURL();
-QString location=pretty.right(pretty.length()-pretty.findRev("/")-1);
+TQString pretty=u.prettyURL();
+TQString location=pretty.right(pretty.length()-pretty.findRev("/")-1);
-connect(catalog,SIGNAL(signalProgress(int)),this,SIGNAL(fileLoading(int)));
+connect(catalog,TQT_SIGNAL(signalProgress(int)),this,TQT_SIGNAL(fileLoading(int)));
emit filename(location);
emit fileProgress(0);
emit fileLoading(0);
@@ -220,10 +220,10 @@ if(rr != OK && rr !=RECOVERED_PARSE_ERROR )
}
emit fileLoading(100);
-QString author;
+TQString author;
if(rr != HEADER_ERROR)
author=catalog->lastTranslator();
-else author=QString("");
+else author=TQString("");
//int catnum=dm->catalogRef(location,author,fileName);
InputInfo ii;
@@ -253,7 +253,7 @@ for (i=0;i<tot;i++) //Skip header = ????
if(!fuzzy && !untra)
{
int res;
- QString msgid,msgstr;
+ TQString msgid,msgstr;
msgid=catalog->msgid(i,true).first();
msgstr=catalog->msgstr(i).first();
res=di->addEntry(msgid,msgstr,&ii);
@@ -264,7 +264,7 @@ for (i=0;i<tot;i++) //Skip header = ????
}
-// kdDebug(0) << QString("File finished") << endl;
+// kdDebug(0) << TQString("File finished") << endl;
emit fileProgress(0);
emit fileLoading(0);
diff --git a/kbabel/kbabeldict/modules/dbsearchengine2/dbscan.h b/kbabel/kbabeldict/modules/dbsearchengine2/dbscan.h
index 990d556c..e4cdf7da 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine2/dbscan.h
+++ b/kbabel/kbabeldict/modules/dbsearchengine2/dbscan.h
@@ -48,10 +48,10 @@ class MessagesSource
* It returns a list of urls to scan, the list contains single file if type is "SingleFile"
* or a list of files if type is "SingleDir" or "RecDir"
*/
- QValueList<KURL> urls();
+ TQValueList<KURL> urls();
private:
- QValueList<KURL> filesInDir(KURL url,bool recursive);
+ TQValueList<KURL> filesInDir(KURL url,bool recursive);
KURL location;
// The source type "SingleFile" =0, "SingleDirectory"=1, "RecursiveDirectory"=2
@@ -63,9 +63,9 @@ class MessagesSource
SearchFilter filter;
- QString projectName;
- QString projectKeywords;
- QString status;
+ TQString projectName;
+ TQString projectKeywords;
+ TQString status;
};
@@ -75,12 +75,12 @@ class PoScanner : public QObject
public:
- PoScanner(DataBaseInterface *dbi,QObject *parent=0,const char *name=0);
+ PoScanner(DataBaseInterface *dbi,TQObject *parent=0,const char *name=0);
/*
Scan a single PO file.
*/
- bool scanFile(QString fileName);
+ bool scanFile(TQString fileName);
/*
Scan a single URL file.
@@ -91,7 +91,7 @@ class PoScanner : public QObject
/*
Scan a list of space separated files with possible MetaCharacters
*/
- bool scanPattern(QString pathName,QString pattern="*.po",bool rec=false);
+ bool scanPattern(TQString pathName,TQString pattern="*.po",bool rec=false);
@@ -105,7 +105,7 @@ class PoScanner : public QObject
void patternProgress(int);
void patternFinished();
void added(int);
- void filename(QString);
+ void filename(TQString);
private:
// If true when a translation is found in a CATALOG the old translation for this CATALOG
diff --git a/kbabel/kbabeldict/modules/dbsearchengine2/dbse2_factory.cpp b/kbabel/kbabeldict/modules/dbsearchengine2/dbse2_factory.cpp
index 9c286052..55f6a16f 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine2/dbse2_factory.cpp
+++ b/kbabel/kbabeldict/modules/dbsearchengine2/dbse2_factory.cpp
@@ -22,7 +22,7 @@ KInstance *DbSe2Factory::s_instance = 0;
KAboutData *DbSe2Factory::s_about = 0;
-DbSe2Factory::DbSe2Factory( QObject *parent, const char *name)
+DbSe2Factory::DbSe2Factory( TQObject *parent, const char *name)
: KLibFactory(parent,name)
{
}
@@ -43,10 +43,10 @@ DbSe2Factory::~DbSe2Factory()
}
-QObject *DbSe2Factory::createObject( QObject *parent, const char *name,
- const char *classname, const QStringList &)
+TQObject *DbSe2Factory::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/dbsearchengine2/dbse2_factory.h b/kbabel/kbabeldict/modules/dbsearchengine2/dbse2_factory.h
index 4285d53c..2b70184a 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine2/dbse2_factory.h
+++ b/kbabel/kbabeldict/modules/dbsearchengine2/dbse2_factory.h
@@ -9,12 +9,12 @@ class DbSe2Factory : public KLibFactory
{
Q_OBJECT
public:
- DbSe2Factory( QObject *parent=0, const char *name=0);
+ DbSe2Factory( TQObject *parent=0, const char *name=0);
~DbSe2Factory();
- 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/dbsearchengine2/preferenceswidget.cpp b/kbabel/kbabeldict/modules/dbsearchengine2/preferenceswidget.cpp
index 7634a799..76aef878 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine2/preferenceswidget.cpp
+++ b/kbabel/kbabeldict/modules/dbsearchengine2/preferenceswidget.cpp
@@ -1,13 +1,13 @@
-#include <qradiobutton.h>
-#include <qslider.h>
-#include <qspinbox.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqradiobutton.h>
+#include <tqslider.h>
+#include <tqspinbox.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <klocale.h>
#include <kfiledialog.h>
#include <kurlrequester.h>
-#include <qtoolbutton.h>
+#include <tqtoolbutton.h>
#include <klineedit.h>
#include <kstandarddirs.h>
#include <knuminput.h>
@@ -15,11 +15,11 @@
#include "dbse2.h"
#include "preferenceswidget.h"
-KDB2PreferencesWidget::KDB2PreferencesWidget(QWidget *parent, const char* name)
+KDB2PreferencesWidget::KDB2PreferencesWidget(TQWidget *parent, const char* name)
: PrefWidget(parent,name)
{
- QVBoxLayout *layout = new QVBoxLayout(this);
-// QLabel *label = new QLabel(i18n("Settings for KDE Database Search Engine"),this);
+ TQVBoxLayout *layout = new TQVBoxLayout(this);
+// TQLabel *label = new TQLabel(i18n("Settings for KDE Database Search Engine"),this);
// layout->addWidget(label);
dbpw = new DBSearchEnginePrefWidget(this);
@@ -30,7 +30,7 @@ KDB2PreferencesWidget::KDB2PreferencesWidget(QWidget *parent, const char* name)
standard();
-// connect(dbpw->browseTB_3,SIGNAL(clicked()),SLOT(browse1()));
+// connect(dbpw->browseTB_3,TQT_SIGNAL(clicked()),TQT_SLOT(browse1()));
emit restoreNow(); //Fill with actual params.
@@ -52,7 +52,7 @@ emit restoreNow();
void KDB2PreferencesWidget::standard()
{
-QString defaultDir;
+TQString defaultDir;
KStandardDirs * dirs = KGlobal::dirs();
if(dirs)
{
diff --git a/kbabel/kbabeldict/modules/dbsearchengine2/preferenceswidget.h b/kbabel/kbabeldict/modules/dbsearchengine2/preferenceswidget.h
index 4714fd13..1f706902 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine2/preferenceswidget.h
+++ b/kbabel/kbabeldict/modules/dbsearchengine2/preferenceswidget.h
@@ -9,7 +9,7 @@ class KDB2PreferencesWidget : public PrefWidget
Q_OBJECT
public:
- KDB2PreferencesWidget(QWidget *parent=0, const char* name=0);
+ KDB2PreferencesWidget(TQWidget *parent=0, const char* name=0);
virtual ~KDB2PreferencesWidget();
virtual void apply();
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();
diff --git a/kbabel/kbabeldict/modules/pocompendium/compendiumdata.cpp b/kbabel/kbabeldict/modules/pocompendium/compendiumdata.cpp
index d862b236..9eb816bd 100644
--- a/kbabel/kbabeldict/modules/pocompendium/compendiumdata.cpp
+++ b/kbabel/kbabeldict/modules/pocompendium/compendiumdata.cpp
@@ -42,8 +42,8 @@
using namespace KBabel;
-CompendiumData::CompendiumData(QObject *parent)
- : QObject(parent)
+CompendiumData::CompendiumData(TQObject *parent)
+ : TQObject(parent)
, _active(false)
, _error(false)
, _initialized(false)
@@ -53,7 +53,7 @@ CompendiumData::CompendiumData(QObject *parent)
, _wordDict(9887)
, _textonlyDict(9887)
{
- _catalog = new Catalog(this, "CompendiumData::catalog", QString::null);
+ _catalog = new Catalog(this, "CompendiumData::catalog", TQString::null);
_exactDict.setAutoDelete(true);
_allDict.setAutoDelete(true);
_wordDict.setAutoDelete(true);
@@ -77,12 +77,12 @@ bool CompendiumData::load(KURL url)
emit progressStarts(i18n("Loading PO compendium"));
- connect(_catalog, SIGNAL(signalProgress(int)), this, SIGNAL(progress(int)));
+ connect(_catalog, TQT_SIGNAL(signalProgress(int)), this, TQT_SIGNAL(progress(int)));
ConversionStatus stat=_catalog->openURL(url);
- disconnect(_catalog, SIGNAL(signalProgress(int))
- , this, SIGNAL(progress(int)));
+ disconnect(_catalog, TQT_SIGNAL(signalProgress(int))
+ , this, TQT_SIGNAL(progress(int)));
if( stat!= OK && stat != RECOVERED_PARSE_ERROR)
@@ -113,7 +113,7 @@ bool CompendiumData::load(KURL url)
}
// FIXME: shoudl care about plural forms
- QString temp = _catalog->msgid(i,true).first();
+ TQString temp = _catalog->msgid(i,true).first();
int *index = new int(i);
_exactDict.insert(temp,index);
@@ -125,25 +125,25 @@ bool CompendiumData::load(KURL url)
if(!temp.isEmpty() && temp.length() > 1)
{
// add to allDict
- QValueList<int> *indexList=_allDict[temp];
+ TQValueList<int> *indexList=_allDict[temp];
if(!indexList)
{
- indexList = new QValueList<int>;
+ indexList = new TQValueList<int>;
_allDict.insert(temp,indexList);
}
indexList->append(i);
// add to textonlyDict
- QString temp1 = temp;
+ TQString temp1 = temp;
temp1.remove( ' ' );
indexList=_textonlyDict[temp1];
if(!indexList)
{
- indexList = new QValueList<int>;
+ indexList = new TQValueList<int>;
_textonlyDict.insert(temp1,indexList);
kdDebug() << "Adding " << temp1 << endl;
}
@@ -151,8 +151,8 @@ bool CompendiumData::load(KURL url)
indexList->append(i);
// add to wordDict
- QStringList wList = wordList(temp);
- for ( QStringList::Iterator it = wList.begin()
+ TQStringList wList = wordList(temp);
+ for ( TQStringList::Iterator it = wList.begin()
; it != wList.end(); ++it )
{
if( (*it).length() > 1)
@@ -161,7 +161,7 @@ bool CompendiumData::load(KURL url)
if(!indexList)
{
- indexList = new QValueList<int>;
+ indexList = new TQValueList<int>;
_wordDict.insert(*it,indexList);
}
@@ -173,7 +173,7 @@ bool CompendiumData::load(KURL url)
// remove words, that are too frequent
uint max=_allDict.count()/10;
- QDictIterator< QValueList<int> > it(_wordDict);
+ TQDictIterator< TQValueList<int> > it(_wordDict);
while ( it.current() )
{
if(it.current()->count() > max)
@@ -198,34 +198,34 @@ bool CompendiumData::load(KURL url)
return true;
}
-const int* CompendiumData::exactDict(const QString text) const
+const int* CompendiumData::exactDict(const TQString text) const
{
return _exactDict[text];
}
-const QValueList<int>* CompendiumData::allDict(const QString text) const
+const TQValueList<int>* CompendiumData::allDict(const TQString text) const
{
return _allDict[text];
}
-const QValueList<int>* CompendiumData::wordDict(const QString text) const
+const TQValueList<int>* CompendiumData::wordDict(const TQString text) const
{
return _wordDict[text];
}
-const QValueList<int>* CompendiumData::textonlyDict(const QString text) const
+const TQValueList<int>* CompendiumData::textonlyDict(const TQString text) const
{
return _textonlyDict[text];
}
-void CompendiumData::registerObject(QObject *obj)
+void CompendiumData::registerObject(TQObject *obj)
{
if(!_registered.containsRef(obj))
_registered.append(obj);
}
-bool CompendiumData::unregisterObject(QObject *obj)
+bool CompendiumData::unregisterObject(TQObject *obj)
{
_registered.removeRef(obj);
@@ -237,9 +237,9 @@ bool CompendiumData::hasObjects() const
return _registered.count()==0;
}
-QString CompendiumData::simplify(const QString string)
+TQString CompendiumData::simplify(const TQString string)
{
- QString result;
+ TQString result;
TagExtractor te;
te.setString(string);
@@ -251,11 +251,11 @@ QString CompendiumData::simplify(const QString string)
return result;
}
-QStringList CompendiumData::wordList(const QString string)
+TQStringList CompendiumData::wordList(const TQString string)
{
- QString result=CompendiumData::simplify(string);
+ TQString result=CompendiumData::simplify(string);
- return QStringList::split(' ',result);
+ return TQStringList::split(' ',result);
}
#include "compendiumdata.moc"
diff --git a/kbabel/kbabeldict/modules/pocompendium/compendiumdata.h b/kbabel/kbabeldict/modules/pocompendium/compendiumdata.h
index 2fec45cb..d5668b4a 100644
--- a/kbabel/kbabeldict/modules/pocompendium/compendiumdata.h
+++ b/kbabel/kbabeldict/modules/pocompendium/compendiumdata.h
@@ -35,11 +35,11 @@
#include <kurl.h>
-#include <qdict.h>
-#include <qobject.h>
-#include <qstringlist.h>
-#include <qvaluelist.h>
-#include <qptrlist.h>
+#include <tqdict.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
+#include <tqvaluelist.h>
+#include <tqptrlist.h>
namespace KBabel
{
@@ -51,38 +51,38 @@ class CompendiumData : public QObject
Q_OBJECT
public:
- CompendiumData(QObject *parent=0);
+ CompendiumData(TQObject *parent=0);
bool load(KURL url);
const KBabel::Catalog *catalog() const { return _catalog; }
- const int *exactDict(const QString text) const;
- const QValueList<int> *allDict(const QString text) const;
- const QValueList<int> *wordDict(const QString text) const;
- const QValueList<int> *textonlyDict(const QString text) const;
+ const int *exactDict(const TQString text) const;
+ const TQValueList<int> *allDict(const TQString text) const;
+ const TQValueList<int> *wordDict(const TQString text) const;
+ const TQValueList<int> *textonlyDict(const TQString text) const;
bool active() const { return _active; }
bool initialized() const { return _initialized; }
bool hasErrors() const { return _error; }
- QString errorMsg() const { return _errorMsg; }
+ TQString errorMsg() const { return _errorMsg; }
/** registers an object, that uses this data */
- void registerObject(QObject *);
+ void registerObject(TQObject *);
/**
* unregisters an object, that uses this data
*
* @return true, if this was the last object
*/
- bool unregisterObject(QObject *);
+ bool unregisterObject(TQObject *);
bool hasObjects() const;
- static QString simplify(const QString text);
- static QStringList wordList(const QString text);
+ static TQString simplify(const TQString text);
+ static TQStringList wordList(const TQString text);
signals:
- void progressStarts(const QString);
+ void progressStarts(const TQString);
void progressEnds();
void progress(int);
@@ -91,15 +91,15 @@ private:
bool _active;
bool _error;
bool _initialized;
- QString _errorMsg;
+ TQString _errorMsg;
KBabel::Catalog *_catalog;
- QDict<int> _exactDict;
- QDict< QValueList<int> > _allDict;
- QDict< QValueList<int> > _wordDict;
- QDict< QValueList<int> > _textonlyDict;
+ TQDict<int> _exactDict;
+ TQDict< TQValueList<int> > _allDict;
+ TQDict< TQValueList<int> > _wordDict;
+ TQDict< TQValueList<int> > _textonlyDict;
- QPtrList<QObject> _registered;
+ TQPtrList<TQObject> _registered;
};
#endif
diff --git a/kbabel/kbabeldict/modules/pocompendium/pc_factory.cpp b/kbabel/kbabeldict/modules/pocompendium/pc_factory.cpp
index 882cc064..37ae63a4 100644
--- a/kbabel/kbabeldict/modules/pocompendium/pc_factory.cpp
+++ b/kbabel/kbabeldict/modules/pocompendium/pc_factory.cpp
@@ -54,7 +54,7 @@ KInstance *PcFactory::s_instance = 0;
KAboutData *PcFactory::s_about = 0;
-PcFactory::PcFactory( QObject *parent, const char *name)
+PcFactory::PcFactory( TQObject *parent, const char *name)
: KLibFactory(parent,name)
{
}
@@ -75,10 +75,10 @@ PcFactory::~PcFactory()
}
-QObject *PcFactory::createObject( QObject *parent, const char *name
- , const char *classname, const QStringList &)
+TQObject *PcFactory::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/pocompendium/pc_factory.h b/kbabel/kbabeldict/modules/pocompendium/pc_factory.h
index d52fadfe..1b0b8820 100644
--- a/kbabel/kbabeldict/modules/pocompendium/pc_factory.h
+++ b/kbabel/kbabeldict/modules/pocompendium/pc_factory.h
@@ -43,12 +43,12 @@ class PcFactory : public KLibFactory
{
Q_OBJECT
public:
- PcFactory( QObject *parent=0, const char *name=0);
+ PcFactory( TQObject *parent=0, const char *name=0);
~PcFactory();
- 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/pocompendium/pocompendium.cpp b/kbabel/kbabeldict/modules/pocompendium/pocompendium.cpp
index 0cd79fb3..5220f88a 100644
--- a/kbabel/kbabeldict/modules/pocompendium/pocompendium.cpp
+++ b/kbabel/kbabeldict/modules/pocompendium/pocompendium.cpp
@@ -41,9 +41,9 @@
#include <kinstance.h>
#include <kio/netaccess.h>
-#include <qregexp.h>
-#include <qtextstream.h>
-#include <qtimer.h>
+#include <tqregexp.h>
+#include <tqtextstream.h>
+#include <tqtimer.h>
#include "resources.h"
#include "compendiumdata.h"
@@ -60,10 +60,10 @@
using namespace KBabel;
-static KStaticDeleter< QDict<CompendiumData> > compDataDeleter;
-QDict<CompendiumData> *PoCompendium::_compDict = 0;
+static KStaticDeleter< TQDict<CompendiumData> > compDataDeleter;
+TQDict<CompendiumData> *PoCompendium::_compDict = 0;
-PoCompendium::PoCompendium(QObject *parent, const char *name)
+PoCompendium::PoCompendium(TQObject *parent, const char *name)
: SearchEngine(parent, name)
{
prefWidget=0;
@@ -87,8 +87,8 @@ PoCompendium::PoCompendium(QObject *parent, const char *name)
matchWords=true;
- loadTimer = new QTimer(this);
- connect(loadTimer,SIGNAL(timeout()),this,SLOT(slotLoadCompendium()));
+ loadTimer = new TQTimer(this);
+ connect(loadTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(slotLoadCompendium()));
}
PoCompendium::~PoCompendium()
@@ -145,7 +145,7 @@ void PoCompendium::readSettings(KConfigBase *config)
matchWords = config->readBoolEntry("MatchWords",true);
matchNGram = config->readBoolEntry("MatchNGram",true);
- QString newPath = config->readEntry("Compendium","http://i18n.kde.org/po_overview/@LANG@.messages");
+ TQString newPath = config->readEntry("Compendium","http://i18n.kde.org/po_overview/@LANG@.messages");
if(!initialized)
{
url = newPath;
@@ -160,13 +160,13 @@ void PoCompendium::readSettings(KConfigBase *config)
restoreSettings();
}
-PrefWidget *PoCompendium::preferencesWidget(QWidget *parent)
+PrefWidget *PoCompendium::preferencesWidget(TQWidget *parent)
{
prefWidget = new CompendiumPreferencesWidget(parent,"pocompendium_prefwidget");
kdDebug(KBABEL_SEARCH) << "PreferencesWidget is " << prefWidget << endl;
- 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();
@@ -179,22 +179,22 @@ const KAboutData *PoCompendium::about() const
}
-QString PoCompendium::name() const
+TQString PoCompendium::name() const
{
return i18n("PO Compendium");
}
-QString PoCompendium::id() const
+TQString PoCompendium::id() const
{
return "pocompendium";
}
-QString PoCompendium::lastError()
+TQString PoCompendium::lastError()
{
return errorMsg;
}
-bool PoCompendium::searchExact(const QString& text, uint pluralForm, QPtrList<SearchResult>& results, QValueList<int>& foundIndices, QValueList<int>& )
+bool PoCompendium::searchExact(const TQString& text, uint pluralForm, TQPtrList<SearchResult>& results, TQValueList<int>& foundIndices, TQValueList<int>& )
{
const int *index = data->exactDict(text);
if(index)
@@ -222,14 +222,14 @@ bool PoCompendium::searchExact(const QString& text, uint pluralForm, QPtrList<Se
}
-bool PoCompendium::searchCaseInsensitive(const QString& text, uint pluralForm, QPtrList<SearchResult>& results, QValueList<int>& foundIndices, QValueList<int>& )
+bool PoCompendium::searchCaseInsensitive(const TQString& text, uint pluralForm, TQPtrList<SearchResult>& results, TQValueList<int>& foundIndices, TQValueList<int>& )
{
- QString searchStr = text.lower();
+ TQString searchStr = text.lower();
- const QValueList<int> *indexList = data->allDict(text.lower());
+ const TQValueList<int> *indexList = data->allDict(text.lower());
if(indexList)
{
- QValueList<int>::ConstIterator it;
+ TQValueList<int>::ConstIterator it;
for( it = indexList->begin(); it != indexList->end(); ++it )
{
if(foundIndices.contains(*it))
@@ -243,7 +243,7 @@ bool PoCompendium::searchCaseInsensitive(const QString& text, uint pluralForm, Q
}
- QString origStr = data->catalog()->msgid(*it).first();
+ TQString origStr = data->catalog()->msgid(*it).first();
origStr = CompendiumData::simplify(origStr);
@@ -276,16 +276,16 @@ bool PoCompendium::searchCaseInsensitive(const QString& text, uint pluralForm, Q
return false;
}
-bool PoCompendium::searchTextOnly(const QString& text, uint pluralForm, QPtrList<SearchResult>& results, QValueList<int>& foundIndices, QValueList<int>& )
+bool PoCompendium::searchTextOnly(const TQString& text, uint pluralForm, TQPtrList<SearchResult>& results, TQValueList<int>& foundIndices, TQValueList<int>& )
{
- QString searchStr = text.lower();
- QString t = text;
+ TQString searchStr = text.lower();
+ TQString t = text;
t.remove( " " );
- const QValueList<int> *indexList = data->textonlyDict(t.lower());
+ const TQValueList<int> *indexList = data->textonlyDict(t.lower());
if(indexList)
{
- QValueList<int>::ConstIterator it;
+ TQValueList<int>::ConstIterator it;
for( it = indexList->begin(); it != indexList->end(); ++it )
{
if(foundIndices.contains(*it))
@@ -299,7 +299,7 @@ bool PoCompendium::searchTextOnly(const QString& text, uint pluralForm, QPtrList
}
- QString origStr = data->catalog()->msgid(*it).first();
+ TQString origStr = data->catalog()->msgid(*it).first();
origStr = CompendiumData::simplify(origStr);
@@ -325,22 +325,22 @@ bool PoCompendium::searchTextOnly(const QString& text, uint pluralForm, QPtrList
return false;
}
-bool PoCompendium::searchWords(const QString& searchStr, uint pluralForm, QPtrList<SearchResult>& results, QValueList<int>& foundIndices, QValueList<int>& checkedIndices )
+bool PoCompendium::searchWords(const TQString& searchStr, uint pluralForm, TQPtrList<SearchResult>& results, TQValueList<int>& foundIndices, TQValueList<int>& checkedIndices )
{
uint checkCounter = 0;
bool foundResults = false;
- QStringList wList = CompendiumData::wordList(searchStr);
- for ( QStringList::Iterator wit = wList.begin()
+ TQStringList wList = CompendiumData::wordList(searchStr);
+ for ( TQStringList::Iterator wit = wList.begin()
; wit != wList.end(); ++wit )
{
if(stop)
break;
- const QValueList<int> *indexList = data->wordDict((*wit).lower());
+ const TQValueList<int> *indexList = data->wordDict((*wit).lower());
if(indexList)
{
- QValueList<int>::ConstIterator it;
+ TQValueList<int>::ConstIterator it;
for( it = indexList->begin(); it != indexList->end(); ++it )
{
if(stop)
@@ -371,7 +371,7 @@ bool PoCompendium::searchWords(const QString& searchStr, uint pluralForm, QPtrLi
kapp->processEvents(100);
- QString origStr = data->catalog()->msgid(*it).first();
+ TQString origStr = data->catalog()->msgid(*it).first();
origStr = CompendiumData::simplify(origStr);
@@ -389,8 +389,8 @@ bool PoCompendium::searchWords(const QString& searchStr, uint pluralForm, QPtrLi
}
else
{
- QString s=*wit;
- QString o=origStr;
+ TQString s=*wit;
+ TQString o=origStr;
if(wholeWords)
{
@@ -421,8 +421,8 @@ bool PoCompendium::searchWords(const QString& searchStr, uint pluralForm, QPtrLi
if(!found && matchContains && !wholeWords)
{
- QString s=maskString(searchStr);
- QRegExp searchReg(s);
+ TQString s=maskString(searchStr);
+ TQRegExp searchReg(s);
if(searchReg.search(origStr) >= 0)
found=true;
@@ -430,8 +430,8 @@ bool PoCompendium::searchWords(const QString& searchStr, uint pluralForm, QPtrLi
if(!found && matchIsContained && !wholeWords)
{
- QString s=maskString(origStr);
- QRegExp reg(s);
+ TQString s=maskString(origStr);
+ TQRegExp reg(s);
if(reg.search(searchStr) >= 0)
{
@@ -440,13 +440,13 @@ bool PoCompendium::searchWords(const QString& searchStr, uint pluralForm, QPtrLi
}
if(!found && matchWords && !wholeWords)
{
- QStringList list = CompendiumData::wordList(searchStr);
+ TQStringList list = CompendiumData::wordList(searchStr);
- for ( QStringList::Iterator wit2 = list.begin()
+ for ( TQStringList::Iterator wit2 = list.begin()
; wit2 != list.end(); ++wit2 )
{
- QString s=maskString(*wit2);
- QRegExp reg(s);
+ TQString s=maskString(*wit2);
+ TQRegExp reg(s);
if(reg.search(origStr) >= 0)
{
@@ -483,15 +483,15 @@ bool PoCompendium::searchWords(const QString& searchStr, uint pluralForm, QPtrLi
return foundResults;
}
-bool PoCompendium::searchNGram(const QString& searchStr, uint pluralForm, QPtrList<SearchResult>& results, QValueList<int>& foundIndices, QValueList<int>& checkedIndices )
+bool PoCompendium::searchNGram(const TQString& searchStr, uint pluralForm, TQPtrList<SearchResult>& results, TQValueList<int>& foundIndices, TQValueList<int>& checkedIndices )
{
uint checkCounter = 0;
bool foundResults = false;
- QRegExp searchReg;
+ TQRegExp searchReg;
if(matchContains)
{
- QString s=maskString(searchStr);
+ TQString s=maskString(searchStr);
searchReg.setPattern(s);
}
@@ -539,7 +539,7 @@ bool PoCompendium::searchNGram(const QString& searchStr, uint pluralForm, QPtrLi
kapp->processEvents(100);
- QString origStr = data->catalog()->msgid(i).first();
+ TQString origStr = data->catalog()->msgid(i).first();
origStr = CompendiumData::simplify(origStr);
if(!caseSensitive)
@@ -564,8 +564,8 @@ bool PoCompendium::searchNGram(const QString& searchStr, uint pluralForm, QPtrLi
if(!found && matchIsContained)
{
- QString s=maskString(origStr);
- QRegExp reg(s);
+ TQString s=maskString(origStr);
+ TQRegExp reg(s);
if(reg.search(searchStr) >= 0)
{
@@ -575,19 +575,19 @@ bool PoCompendium::searchNGram(const QString& searchStr, uint pluralForm, QPtrLi
if(!found && matchWords)
{
- QStringList list = CompendiumData::wordList(searchStr);
+ TQStringList list = CompendiumData::wordList(searchStr);
- for ( QStringList::Iterator wit2 = list.begin()
+ for ( TQStringList::Iterator wit2 = list.begin()
; wit2 != list.end(); ++wit2 )
{
- QString s=maskString(*wit2);
+ TQString s=maskString(*wit2);
if(wholeWords)
{
origStr = " "+origStr+" ";
s=" "+s+" ";
}
- QRegExp reg(s);
+ TQRegExp reg(s);
if(reg.search(origStr) >= 0)
{
@@ -632,7 +632,7 @@ bool PoCompendium::searchNGram(const QString& searchStr, uint pluralForm, QPtrLi
return foundResults;
}
-bool PoCompendium::startSearch(const QString& text, uint pluralForm, const SearchFilter* filter)
+bool PoCompendium::startSearch(const TQString& text, uint pluralForm, const SearchFilter* filter)
{
if(autoUpdate && prefWidget && prefWidget->settingsChanged())
{
@@ -669,13 +669,13 @@ bool PoCompendium::startSearch(const QString& text, uint pluralForm, const Searc
emit started();
- QValueList<int> foundIndices;
- QValueList<int> checkedIndices;
+ TQValueList<int> foundIndices;
+ TQValueList<int> checkedIndices;
// first, exact search
searchExact(text, pluralForm, results, foundIndices, checkedIndices);
- QString searchStr=CompendiumData::simplify(text);
+ TQString searchStr=CompendiumData::simplify(text);
if(!caseSensitive)
@@ -738,7 +738,7 @@ void PoCompendium::applySettings()
bool needLoading=false;
- QString newPath = prefWidget->url();
+ TQString newPath = prefWidget->url();
if(!initialized)
{
url = newPath;
@@ -795,7 +795,7 @@ void PoCompendium::slotLoadCompendium()
}
- QString path=url;
+ TQString path=url;
if(path.contains("@LANG@"))
{
@@ -828,7 +828,7 @@ void PoCompendium::slotLoadCompendium()
}
else
{
- connect(data, SIGNAL(progressEnds()), this, SLOT(recheckData()));
+ connect(data, TQT_SIGNAL(progressEnds()), this, TQT_SLOT(recheckData()));
}
}
else
@@ -847,7 +847,7 @@ void PoCompendium::recheckData()
{
if(data)
{
- disconnect(data, SIGNAL(progressEnds()), this, SLOT(recheckData()));
+ disconnect(data, TQT_SIGNAL(progressEnds()), this, TQT_SLOT(recheckData()));
error = data->hasErrors();
errorMsg = data->errorMsg();
@@ -864,7 +864,7 @@ void PoCompendium::recheckData()
loading=false;
}
-QString PoCompendium::maskString(QString s)
+TQString PoCompendium::maskString(TQString s)
{
s.replace("\\","\\\\");
s.replace("\?","\\?");
@@ -883,7 +883,7 @@ QString PoCompendium::maskString(QString s)
return s;
}
-void PoCompendium::addResult(SearchResult *result, QPtrList<SearchResult>& res)
+void PoCompendium::addResult(SearchResult *result, TQPtrList<SearchResult>& res)
{
if(res.last() && res.last()->score >= result->score)
{
@@ -915,7 +915,7 @@ void PoCompendium::addResult(SearchResult *result, QPtrList<SearchResult>& res)
}
-void PoCompendium::setLanguageCode(const QString& lang)
+void PoCompendium::setLanguageCode(const TQString& lang)
{
if(initialized && url.contains("@LANG@") && lang!=langCode
&& !loadTimer->isActive() )
@@ -926,7 +926,7 @@ void PoCompendium::setLanguageCode(const QString& lang)
langCode=lang;
}
-QString PoCompendium::translate(const QString& text, uint pluralForm)
+TQString PoCompendium::translate(const TQString& text, uint pluralForm)
{
if(!initialized)
{
@@ -938,7 +938,7 @@ QString PoCompendium::translate(const QString& text, uint pluralForm)
if(error || !data || data->active())
{
- return QString::null;
+ return TQString::null;
}
@@ -950,10 +950,10 @@ QString PoCompendium::translate(const QString& text, uint pluralForm)
return data->catalog()->msgstr(*index).first();
}
- return QString::null;
+ return TQString::null;
}
-QString PoCompendium::fuzzyTranslation(const QString& text, int &score, const uint pluralForm)
+TQString PoCompendium::fuzzyTranslation(const TQString& text, int &score, const uint pluralForm)
{
if(!initialized)
{
@@ -965,7 +965,7 @@ QString PoCompendium::fuzzyTranslation(const QString& text, int &score, const ui
if(error || !data || data->active())
{
- return QString::null;
+ return TQString::null;
}
// try to find fuzzy string
@@ -976,7 +976,7 @@ QString PoCompendium::fuzzyTranslation(const QString& text, int &score, const ui
int best_match = 0;
int total = data->catalog()->numberOfEntries();
- QString searchStr = CompendiumData::simplify(text);
+ TQString searchStr = CompendiumData::simplify(text);
//kdDebug(750) << "find best match for " << searchStr << endl;
@@ -1004,7 +1004,7 @@ QString PoCompendium::fuzzyTranslation(const QString& text, int &score, const ui
}
// get a message from the catalog FIXME: plurals
- QString origStr = data->catalog()->msgid(i).first();
+ TQString origStr = data->catalog()->msgid(i).first();
origStr = CompendiumData::simplify(origStr);
// don't match too long strings for short search string
@@ -1029,11 +1029,11 @@ QString PoCompendium::fuzzyTranslation(const QString& text, int &score, const ui
return data->catalog()->msgstr(best_matching).first();
}
- return QString::null;
+ return TQString::null;
}
-QString PoCompendium::searchTranslation(const QString& text, int &sc, const uint pluralForm)
+TQString PoCompendium::searchTranslation(const TQString& text, int &sc, const uint pluralForm)
{
if(autoUpdate && prefWidget && prefWidget->settingsChanged())
{
@@ -1041,7 +1041,7 @@ QString PoCompendium::searchTranslation(const QString& text, int &sc, const uint
}
if(isSearching())
- return QString::null;
+ return TQString::null;
clearResults();
stop = false;
@@ -1058,21 +1058,21 @@ QString PoCompendium::searchTranslation(const QString& text, int &sc, const uint
if(error || !data)
{
active = false;
- return QString::null;
+ return TQString::null;
}
if(data->active())
{
active = false;
- return QString::null;
+ return TQString::null;
}
emit started();
- QPtrList<SearchResult> res;
+ TQPtrList<SearchResult> res;
- QValueList<int> foundIndices;
- QValueList<int> checkedIndices;
+ TQValueList<int> foundIndices;
+ TQValueList<int> checkedIndices;
// first, exact search
if( searchExact(text, pluralForm, res, foundIndices, checkedIndices) )
@@ -1086,7 +1086,7 @@ QString PoCompendium::searchTranslation(const QString& text, int &sc, const uint
return res.first()->translation;
}
- QString searchStr=CompendiumData::simplify(text);
+ TQString searchStr=CompendiumData::simplify(text);
if(!caseSensitive)
@@ -1107,7 +1107,7 @@ QString PoCompendium::searchTranslation(const QString& text, int &sc, const uint
}
// search without whitespace
- QString s = searchStr;
+ TQString s = searchStr;
s.remove( ' ' );
if( searchTextOnly(s, pluralForm, res, foundIndices, checkedIndices) )
{
@@ -1145,7 +1145,7 @@ QString PoCompendium::searchTranslation(const QString& text, int &sc, const uint
sc = 0;
- return QString::null;
+ return TQString::null;
}
@@ -1153,14 +1153,14 @@ void PoCompendium::unregisterData()
{
if(data)
{
- disconnect(data, SIGNAL(progressStarts(const QString&)), this
- , SIGNAL(progressStarts(const QString&)));
- disconnect(data, SIGNAL(progressEnds()), this , SIGNAL(progressEnds()));
- disconnect(data, SIGNAL(progress(int)), this , SIGNAL(progress(int)));
+ disconnect(data, TQT_SIGNAL(progressStarts(const TQString&)), this
+ , TQT_SIGNAL(progressStarts(const TQString&)));
+ disconnect(data, TQT_SIGNAL(progressEnds()), this , TQT_SIGNAL(progressEnds()));
+ disconnect(data, TQT_SIGNAL(progress(int)), this , TQT_SIGNAL(progress(int)));
if(data->active())
{
- disconnect(data,SIGNAL(progressEnds()),this,SLOT(recheckData()));
+ disconnect(data,TQT_SIGNAL(progressEnds()),this,TQT_SLOT(recheckData()));
}
if(data->unregisterObject(this))
@@ -1171,7 +1171,7 @@ void PoCompendium::unregisterData()
}
else
{
- connect(data,SIGNAL(progressEnds()),this,SLOT(removeData()));
+ connect(data,TQT_SIGNAL(progressEnds()),this,TQT_SLOT(removeData()));
}
}
@@ -1195,22 +1195,22 @@ void PoCompendium::registerData()
emit progressStarts(i18n("Loading PO compendium"));
}
- connect(data, SIGNAL(
- progressStarts(const QString&)), this
- , SIGNAL(progressStarts(const QString&)));
- connect(data, SIGNAL(progressEnds()), this , SIGNAL(progressEnds()));
- connect(data, SIGNAL(progress(int)), this , SIGNAL(progress(int)));
+ connect(data, TQT_SIGNAL(
+ progressStarts(const TQString&)), this
+ , TQT_SIGNAL(progressStarts(const TQString&)));
+ connect(data, TQT_SIGNAL(progressEnds()), this , TQT_SIGNAL(progressEnds()));
+ connect(data, TQT_SIGNAL(progress(int)), this , TQT_SIGNAL(progress(int)));
}
void PoCompendium::removeData()
{
- const QObject *s=sender();
+ const TQObject *s=sender();
if(s && s->inherits("CompendiumData"))
{
const CompendiumData *d=static_cast<const CompendiumData*>(s);
if(d)
{
- QDictIterator<CompendiumData> it(*compendiumDict());
+ TQDictIterator<CompendiumData> it(*compendiumDict());
while(it.current())
{
if(it.current() == d)
@@ -1230,11 +1230,11 @@ void PoCompendium::removeData()
}
}
-QDict<CompendiumData> *PoCompendium::compendiumDict()
+TQDict<CompendiumData> *PoCompendium::compendiumDict()
{
if(!_compDict)
{
- _compDict=compDataDeleter.setObject( new QDict<CompendiumData> );
+ _compDict=compDataDeleter.setObject( new TQDict<CompendiumData> );
_compDict->setAutoDelete(true);
}
diff --git a/kbabel/kbabeldict/modules/pocompendium/pocompendium.h b/kbabel/kbabeldict/modules/pocompendium/pocompendium.h
index 6d92fb58..d96774e9 100644
--- a/kbabel/kbabeldict/modules/pocompendium/pocompendium.h
+++ b/kbabel/kbabeldict/modules/pocompendium/pocompendium.h
@@ -39,10 +39,10 @@
#include "compendiumdata.h"
#include "searchengine.h"
-#include <qdict.h>
-#include <qfile.h>
-#include <qguardedptr.h>
-#include <qptrlist.h>
+#include <tqdict.h>
+#include <tqfile.h>
+#include <tqguardedptr.h>
+#include <tqptrlist.h>
class CompendiumPreferencesWidget;
class KConfigBase;
@@ -53,35 +53,35 @@ class PoCompendium : public SearchEngine
Q_OBJECT
public:
- PoCompendium(QObject *parent=0, const char *name=0);
+ PoCompendium(TQObject *parent=0, const char *name=0);
virtual ~PoCompendium();
virtual bool isReady() const;
- virtual QString translate(const QString&text, uint pluralForm);
- virtual QString searchTranslation(const QString&, int &score, const uint pluralForm);
- virtual QString fuzzyTranslation(const QString&, int &score, const uint pluralForm);
+ virtual TQString translate(const TQString&text, uint pluralForm);
+ virtual TQString searchTranslation(const TQString&, int &score, const uint pluralForm);
+ virtual TQString fuzzyTranslation(const TQString&, int &score, const 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();
public slots:
- virtual bool startSearch(const QString& s, uint pluralForm = 0, const SearchFilter* filter = 0);
+ virtual bool startSearch(const TQString& s, uint pluralForm = 0, const SearchFilter* filter = 0);
virtual void stopSearch();
- virtual void setLanguageCode(const QString& lang);
+ virtual void setLanguageCode(const TQString& lang);
protected slots:
/** reads the current settings from the preferences dialog */
@@ -97,27 +97,27 @@ protected slots:
protected:
void loadCompendium();
- void addResult(SearchResult *, QPtrList<SearchResult>& allResults);
- QString maskString(QString string);
+ void addResult(SearchResult *, TQPtrList<SearchResult>& allResults);
+ TQString maskString(TQString string);
void registerData();
void unregisterData();
- bool searchExact(const QString& searchString, uint pluralForm, QPtrList<SearchResult>& results, QValueList<int>& foundIndices, QValueList<int>& checkedIndices );
- bool searchTextOnly(const QString& searchString, uint pluralForm, QPtrList<SearchResult>& results, QValueList<int>& foundIndices, QValueList<int>& checkedIndices );
- bool searchCaseInsensitive(const QString& searchString, uint pluralForm, QPtrList<SearchResult>& results, QValueList<int>& foundIndices, QValueList<int>& checkedIndices );
- bool searchWords(const QString& searchString, uint pluralForm, QPtrList<SearchResult>& results, QValueList<int>& foundIndices, QValueList<int>& checkedIndices );
- bool searchNGram(const QString& searchString, uint pluralForm, QPtrList<SearchResult>& results, QValueList<int>& foundIndices, QValueList<int>& checkedIndices );
+ bool searchExact(const TQString& searchString, uint pluralForm, TQPtrList<SearchResult>& results, TQValueList<int>& foundIndices, TQValueList<int>& checkedIndices );
+ bool searchTextOnly(const TQString& searchString, uint pluralForm, TQPtrList<SearchResult>& results, TQValueList<int>& foundIndices, TQValueList<int>& checkedIndices );
+ bool searchCaseInsensitive(const TQString& searchString, uint pluralForm, TQPtrList<SearchResult>& results, TQValueList<int>& foundIndices, TQValueList<int>& checkedIndices );
+ bool searchWords(const TQString& searchString, uint pluralForm, TQPtrList<SearchResult>& results, TQValueList<int>& foundIndices, TQValueList<int>& checkedIndices );
+ bool searchNGram(const TQString& searchString, uint pluralForm, TQPtrList<SearchResult>& results, TQValueList<int>& foundIndices, TQValueList<int>& checkedIndices );
private:
- QGuardedPtr<CompendiumPreferencesWidget> prefWidget;
+ TQGuardedPtr<CompendiumPreferencesWidget> prefWidget;
CompendiumData *data;
KBabel::PoInfo catalogInfo;
- QTimer *loadTimer;
+ TQTimer *loadTimer;
- QString url;
- QString realURL;
- QString langCode;
+ TQString url;
+ TQString realURL;
+ TQString langCode;
bool caseSensitive;
bool ignoreFuzzy;
@@ -133,15 +133,15 @@ private:
uint freeMemDelay;
bool error;
- QString errorMsg;
+ TQString errorMsg;
bool stop;
bool active;
bool initialized;
bool loading;
- static QDict<CompendiumData> *_compDict;
- static QDict<CompendiumData> *compendiumDict();
+ static TQDict<CompendiumData> *_compDict;
+ static TQDict<CompendiumData> *compendiumDict();
};
#endif
diff --git a/kbabel/kbabeldict/modules/pocompendium/preferenceswidget.cpp b/kbabel/kbabeldict/modules/pocompendium/preferenceswidget.cpp
index c3ce730d..1f3a8b37 100644
--- a/kbabel/kbabeldict/modules/pocompendium/preferenceswidget.cpp
+++ b/kbabel/kbabeldict/modules/pocompendium/preferenceswidget.cpp
@@ -30,13 +30,13 @@
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 <qwhatsthis.h>
+#include <tqpushbutton.h>
+#include <tqwhatsthis.h>
#include <klineedit.h>
#include <klocale.h>
#include <kurlrequester.h>
@@ -44,72 +44,72 @@
#include "preferenceswidget.h"
#include "pwidget.h"
-CompendiumPreferencesWidget::CompendiumPreferencesWidget(QWidget *parent, const char* name)
+CompendiumPreferencesWidget::CompendiumPreferencesWidget(TQWidget *parent, const char* name)
: PrefWidget(parent,name)
, changed(false)
{
- QVBoxLayout *layout = new QVBoxLayout(this);
+ TQVBoxLayout *layout = new TQVBoxLayout(this);
prefWidget = new CompendiumPWidget(this);
layout->addWidget(prefWidget);
- connect(prefWidget->caseBtn, SIGNAL(toggled(bool))
- , this, SLOT(setChanged()));
- connect(prefWidget->equalBtn, SIGNAL(toggled(bool))
- , this, SLOT(setChanged()));
- connect(prefWidget->ngramBtn, SIGNAL(toggled(bool))
- , this, SLOT(setChanged()));
- connect(prefWidget->isContainedBtn, SIGNAL(toggled(bool))
- , this, SLOT(setChanged()));
- connect(prefWidget->containsBtn, SIGNAL(toggled(bool))
- , this, SLOT(setChanged()));
- connect(prefWidget->fuzzyBtn, SIGNAL(toggled(bool))
- , this, SLOT(setChanged()));
- connect(prefWidget->hasWordBtn, SIGNAL(toggled(bool))
- , this, SLOT(setChanged()));
- connect(prefWidget->wholeBtn, SIGNAL(toggled(bool))
- , this, SLOT(setChanged()));
+ connect(prefWidget->caseBtn, TQT_SIGNAL(toggled(bool))
+ , this, TQT_SLOT(setChanged()));
+ connect(prefWidget->equalBtn, TQT_SIGNAL(toggled(bool))
+ , this, TQT_SLOT(setChanged()));
+ connect(prefWidget->ngramBtn, TQT_SIGNAL(toggled(bool))
+ , this, TQT_SLOT(setChanged()));
+ connect(prefWidget->isContainedBtn, TQT_SIGNAL(toggled(bool))
+ , this, TQT_SLOT(setChanged()));
+ connect(prefWidget->containsBtn, TQT_SIGNAL(toggled(bool))
+ , this, TQT_SLOT(setChanged()));
+ connect(prefWidget->fuzzyBtn, TQT_SIGNAL(toggled(bool))
+ , this, TQT_SLOT(setChanged()));
+ connect(prefWidget->hasWordBtn, TQT_SIGNAL(toggled(bool))
+ , this, TQT_SLOT(setChanged()));
+ connect(prefWidget->wholeBtn, TQT_SIGNAL(toggled(bool))
+ , this, TQT_SLOT(setChanged()));
- connect(prefWidget->urlInput->lineEdit(),SIGNAL(textChanged(const QString&))
- , this, SLOT(setChanged()));
-
- connect(prefWidget->equalBtn, SIGNAL(toggled(bool))
- , this, SLOT(equalBtnToggled(bool)));
- connect(prefWidget->ngramBtn, SIGNAL(toggled(bool))
- , this, SLOT(ngramBtnToggled(bool)));
- connect(prefWidget->isContainedBtn, SIGNAL(toggled(bool))
- , this, SLOT(isContainedBtnToggled(bool)));
- connect(prefWidget->containsBtn, SIGNAL(toggled(bool))
- , this, SLOT(containsBtnToggled(bool)));
- connect(prefWidget->hasWordBtn, SIGNAL(toggled(bool))
- , this, SLOT(hasWordBtnToggled(bool)));
-
-
- QString whatsthis=i18n("<qt><p><b>Parameters</b></p>"
+ connect(prefWidget->urlInput->lineEdit(),TQT_SIGNAL(textChanged(const TQString&))
+ , this, TQT_SLOT(setChanged()));
+
+ connect(prefWidget->equalBtn, TQT_SIGNAL(toggled(bool))
+ , this, TQT_SLOT(equalBtnToggled(bool)));
+ connect(prefWidget->ngramBtn, TQT_SIGNAL(toggled(bool))
+ , this, TQT_SLOT(ngramBtnToggled(bool)));
+ connect(prefWidget->isContainedBtn, TQT_SIGNAL(toggled(bool))
+ , this, TQT_SLOT(isContainedBtnToggled(bool)));
+ connect(prefWidget->containsBtn, TQT_SIGNAL(toggled(bool))
+ , this, TQT_SLOT(containsBtnToggled(bool)));
+ connect(prefWidget->hasWordBtn, TQT_SIGNAL(toggled(bool))
+ , this, TQT_SLOT(hasWordBtnToggled(bool)));
+
+
+ TQString whatsthis=i18n("<qt><p><b>Parameters</b></p>"
"<p>Here you can fine-tune searching within the PO file. "
"For example if you want to perform a case sensitive search, or if "
"you want fuzzy messages to be ignored.</p></qt>" );
- QWhatsThis::add(prefWidget->caseBtn,whatsthis);
- QWhatsThis::add(prefWidget->fuzzyBtn,whatsthis);
- QWhatsThis::add(prefWidget->wholeBtn,whatsthis);
+ TQWhatsThis::add(prefWidget->caseBtn,whatsthis);
+ TQWhatsThis::add(prefWidget->fuzzyBtn,whatsthis);
+ TQWhatsThis::add(prefWidget->wholeBtn,whatsthis);
whatsthis = i18n("<qt><p><b>Comparison Options</b></p>"
"<p>Choose here which messages you want to have treated as a matching "
"message.</p></qt>");
- QWhatsThis::add(prefWidget->equalBtn,whatsthis);
- QWhatsThis::add(prefWidget->containsBtn,whatsthis);
- QWhatsThis::add(prefWidget->isContainedBtn,whatsthis);
- QWhatsThis::add(prefWidget->hasWordBtn,whatsthis);
+ TQWhatsThis::add(prefWidget->equalBtn,whatsthis);
+ TQWhatsThis::add(prefWidget->containsBtn,whatsthis);
+ TQWhatsThis::add(prefWidget->isContainedBtn,whatsthis);
+ TQWhatsThis::add(prefWidget->hasWordBtn,whatsthis);
whatsthis = i18n("<qt><p><b>3-Gram-matching</b></p>"
"<p>A message matches another if most of its 3-letter groups are "
"contained in the other message. e.g. 'abc123' matches 'abcx123c12'.</p></qt>");
- QWhatsThis::add(prefWidget->ngramBtn,whatsthis);
+ TQWhatsThis::add(prefWidget->ngramBtn,whatsthis);
whatsthis = i18n("<qt><p><b>Location</b></p>"
"<p>Configure here which file is to be used for searching."
"</p></qt>");
- QWhatsThis::add(prefWidget->urlInput,whatsthis);
+ TQWhatsThis::add(prefWidget->urlInput,whatsthis);
}
CompendiumPreferencesWidget::~CompendiumPreferencesWidget()
@@ -143,7 +143,7 @@ void CompendiumPreferencesWidget::standard()
changed=true;
}
-void CompendiumPreferencesWidget::setURL(const QString url)
+void CompendiumPreferencesWidget::setURL(const TQString url)
{
prefWidget->urlInput->setURL(url);
changed=false;
@@ -200,7 +200,7 @@ void CompendiumPreferencesWidget::setMatchWords(bool on)
-QString CompendiumPreferencesWidget::url()
+TQString CompendiumPreferencesWidget::url()
{
changed=false;
return prefWidget->urlInput->url();
diff --git a/kbabel/kbabeldict/modules/pocompendium/preferenceswidget.h b/kbabel/kbabeldict/modules/pocompendium/preferenceswidget.h
index db70df4d..3a22bc31 100644
--- a/kbabel/kbabeldict/modules/pocompendium/preferenceswidget.h
+++ b/kbabel/kbabeldict/modules/pocompendium/preferenceswidget.h
@@ -44,14 +44,14 @@ class CompendiumPreferencesWidget : public PrefWidget
Q_OBJECT
public:
- CompendiumPreferencesWidget(QWidget *parent=0, const char* name=0);
+ CompendiumPreferencesWidget(TQWidget *parent=0, const char* name=0);
virtual ~CompendiumPreferencesWidget();
virtual void apply();
virtual void cancel();
virtual void standard();
- void setURL(const QString url);
+ void setURL(const TQString url);
void setMatchEqual(bool);
void setMatchNGram(bool);
void setMatchIsContained(bool);
@@ -61,7 +61,7 @@ public:
void setWholeWords(bool);
void setCaseSensitive(bool);
- QString url();
+ TQString url();
bool matchEqual();
bool matchNGram();
bool matchIsContained();
diff --git a/kbabel/kbabeldict/modules/tmx/pc_factory.cpp b/kbabel/kbabeldict/modules/tmx/pc_factory.cpp
index a3dcfdf9..eaea5194 100644
--- a/kbabel/kbabeldict/modules/tmx/pc_factory.cpp
+++ b/kbabel/kbabeldict/modules/tmx/pc_factory.cpp
@@ -54,7 +54,7 @@ KInstance *PcFactory::s_instance = 0;
KAboutData *PcFactory::s_about = 0;
-PcFactory::PcFactory( QObject *parent, const char *name)
+PcFactory::PcFactory( TQObject *parent, const char *name)
: KLibFactory(parent,name)
{
}
@@ -75,10 +75,10 @@ PcFactory::~PcFactory()
}
-QObject *PcFactory::createObject( QObject *parent, const char *name
- , const char *classname, const QStringList &)
+TQObject *PcFactory::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/tmx/pc_factory.h b/kbabel/kbabeldict/modules/tmx/pc_factory.h
index 5ef08277..74739e0a 100644
--- a/kbabel/kbabeldict/modules/tmx/pc_factory.h
+++ b/kbabel/kbabeldict/modules/tmx/pc_factory.h
@@ -45,12 +45,12 @@ class PcFactory : public KLibFactory
{
Q_OBJECT
public:
- PcFactory( QObject *parent=0, const char *name=0);
+ PcFactory( TQObject *parent=0, const char *name=0);
~PcFactory();
- 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/tmx/preferenceswidget.cpp b/kbabel/kbabeldict/modules/tmx/preferenceswidget.cpp
index 1202496d..85d38294 100644
--- a/kbabel/kbabeldict/modules/tmx/preferenceswidget.cpp
+++ b/kbabel/kbabeldict/modules/tmx/preferenceswidget.cpp
@@ -32,13 +32,13 @@
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 <qwhatsthis.h>
+#include <tqpushbutton.h>
+#include <tqwhatsthis.h>
#include <klineedit.h>
#include <klocale.h>
#include <kurlrequester.h>
@@ -46,68 +46,68 @@
#include "preferenceswidget.h"
#include "pwidget.h"
-TmxCompendiumPreferencesWidget::TmxCompendiumPreferencesWidget(QWidget *parent, const char* name)
+TmxCompendiumPreferencesWidget::TmxCompendiumPreferencesWidget(TQWidget *parent, const char* name)
: PrefWidget(parent,name)
, changed(false)
{
- QVBoxLayout *layout = new QVBoxLayout(this);
+ TQVBoxLayout *layout = new TQVBoxLayout(this);
prefWidget = new TmxCompendiumPWidget(this);
layout->addWidget(prefWidget);
- connect(prefWidget->caseBtn, SIGNAL(toggled(bool))
- , this, SLOT(setChanged()));
- connect(prefWidget->equalBtn, SIGNAL(toggled(bool))
- , this, SLOT(setChanged()));
- connect(prefWidget->ngramBtn, SIGNAL(toggled(bool))
- , this, SLOT(setChanged()));
- connect(prefWidget->isContainedBtn, SIGNAL(toggled(bool))
- , this, SLOT(setChanged()));
- connect(prefWidget->containsBtn, SIGNAL(toggled(bool))
- , this, SLOT(setChanged()));
- connect(prefWidget->hasWordBtn, SIGNAL(toggled(bool))
- , this, SLOT(setChanged()));
- connect(prefWidget->wholeBtn, SIGNAL(toggled(bool))
- , this, SLOT(setChanged()));
+ connect(prefWidget->caseBtn, TQT_SIGNAL(toggled(bool))
+ , this, TQT_SLOT(setChanged()));
+ connect(prefWidget->equalBtn, TQT_SIGNAL(toggled(bool))
+ , this, TQT_SLOT(setChanged()));
+ connect(prefWidget->ngramBtn, TQT_SIGNAL(toggled(bool))
+ , this, TQT_SLOT(setChanged()));
+ connect(prefWidget->isContainedBtn, TQT_SIGNAL(toggled(bool))
+ , this, TQT_SLOT(setChanged()));
+ connect(prefWidget->containsBtn, TQT_SIGNAL(toggled(bool))
+ , this, TQT_SLOT(setChanged()));
+ connect(prefWidget->hasWordBtn, TQT_SIGNAL(toggled(bool))
+ , this, TQT_SLOT(setChanged()));
+ connect(prefWidget->wholeBtn, TQT_SIGNAL(toggled(bool))
+ , this, TQT_SLOT(setChanged()));
- connect(prefWidget->urlInput->lineEdit(),SIGNAL(textChanged(const QString&))
- , this, SLOT(setChanged()));
-
- connect(prefWidget->equalBtn, SIGNAL(toggled(bool))
- , this, SLOT(equalBtnToggled(bool)));
- connect(prefWidget->ngramBtn, SIGNAL(toggled(bool))
- , this, SLOT(ngramBtnToggled(bool)));
- connect(prefWidget->isContainedBtn, SIGNAL(toggled(bool))
- , this, SLOT(isContainedBtnToggled(bool)));
- connect(prefWidget->containsBtn, SIGNAL(toggled(bool))
- , this, SLOT(containsBtnToggled(bool)));
- connect(prefWidget->hasWordBtn, SIGNAL(toggled(bool))
- , this, SLOT(hasWordBtnToggled(bool)));
-
-
- QString whatsthis=i18n("<qt><p><b>Parameters</b></p>"
+ connect(prefWidget->urlInput->lineEdit(),TQT_SIGNAL(textChanged(const TQString&))
+ , this, TQT_SLOT(setChanged()));
+
+ connect(prefWidget->equalBtn, TQT_SIGNAL(toggled(bool))
+ , this, TQT_SLOT(equalBtnToggled(bool)));
+ connect(prefWidget->ngramBtn, TQT_SIGNAL(toggled(bool))
+ , this, TQT_SLOT(ngramBtnToggled(bool)));
+ connect(prefWidget->isContainedBtn, TQT_SIGNAL(toggled(bool))
+ , this, TQT_SLOT(isContainedBtnToggled(bool)));
+ connect(prefWidget->containsBtn, TQT_SIGNAL(toggled(bool))
+ , this, TQT_SLOT(containsBtnToggled(bool)));
+ connect(prefWidget->hasWordBtn, TQT_SIGNAL(toggled(bool))
+ , this, TQT_SLOT(hasWordBtnToggled(bool)));
+
+
+ TQString whatsthis=i18n("<qt><p><b>Parameters</b></p>"
"<p>Here you can fine-tune searching within the PO file. "
"For example, if you want to perform a case sensitive search.</p></qt>" );
- QWhatsThis::add(prefWidget->caseBtn,whatsthis);
- QWhatsThis::add(prefWidget->wholeBtn,whatsthis);
+ TQWhatsThis::add(prefWidget->caseBtn,whatsthis);
+ TQWhatsThis::add(prefWidget->wholeBtn,whatsthis);
whatsthis = i18n("<qt><p><b>Comparison Options</b></p>"
"<p>Choose here which messages you want to have treated as a matching "
"message.</p></qt>");
- QWhatsThis::add(prefWidget->equalBtn,whatsthis);
- QWhatsThis::add(prefWidget->containsBtn,whatsthis);
- QWhatsThis::add(prefWidget->isContainedBtn,whatsthis);
- QWhatsThis::add(prefWidget->hasWordBtn,whatsthis);
+ TQWhatsThis::add(prefWidget->equalBtn,whatsthis);
+ TQWhatsThis::add(prefWidget->containsBtn,whatsthis);
+ TQWhatsThis::add(prefWidget->isContainedBtn,whatsthis);
+ TQWhatsThis::add(prefWidget->hasWordBtn,whatsthis);
whatsthis = i18n("<qt><p><b>3-Gram-matching</b></p>"
"<p>A message matches another if most of its 3-letter groups are "
"contained in the other message. e.g. 'abc123' matches 'abcx123c12'.</p></qt>");
- QWhatsThis::add(prefWidget->ngramBtn,whatsthis);
+ TQWhatsThis::add(prefWidget->ngramBtn,whatsthis);
whatsthis = i18n("<qt><p><b>Location</b></p>"
"<p>Configure here which file is to be used for searching."
"</p></qt>");
- QWhatsThis::add(prefWidget->urlInput,whatsthis);
+ TQWhatsThis::add(prefWidget->urlInput,whatsthis);
}
TmxCompendiumPreferencesWidget::~TmxCompendiumPreferencesWidget()
@@ -139,7 +139,7 @@ void TmxCompendiumPreferencesWidget::standard()
changed=true;
}
-void TmxCompendiumPreferencesWidget::setURL(const QString url)
+void TmxCompendiumPreferencesWidget::setURL(const TQString url)
{
prefWidget->urlInput->setURL(url);
changed=false;
@@ -190,7 +190,7 @@ void TmxCompendiumPreferencesWidget::setMatchWords(bool on)
-QString TmxCompendiumPreferencesWidget::url()
+TQString TmxCompendiumPreferencesWidget::url()
{
changed=false;
return prefWidget->urlInput->url();
diff --git a/kbabel/kbabeldict/modules/tmx/preferenceswidget.h b/kbabel/kbabeldict/modules/tmx/preferenceswidget.h
index c8356c3d..e2a4b900 100644
--- a/kbabel/kbabeldict/modules/tmx/preferenceswidget.h
+++ b/kbabel/kbabeldict/modules/tmx/preferenceswidget.h
@@ -46,14 +46,14 @@ class TmxCompendiumPreferencesWidget : public PrefWidget
Q_OBJECT
public:
- TmxCompendiumPreferencesWidget(QWidget *parent=0, const char* name=0);
+ TmxCompendiumPreferencesWidget(TQWidget *parent=0, const char* name=0);
virtual ~TmxCompendiumPreferencesWidget();
virtual void apply();
virtual void cancel();
virtual void standard();
- void setURL(const QString url);
+ void setURL(const TQString url);
void setMatchEqual(bool);
void setMatchNGram(bool);
void setMatchIsContained(bool);
@@ -62,7 +62,7 @@ public:
void setWholeWords(bool);
void setCaseSensitive(bool);
- QString url();
+ TQString url();
bool matchEqual();
bool matchNGram();
bool matchIsContained();
diff --git a/kbabel/kbabeldict/modules/tmx/tmxcompendium.cpp b/kbabel/kbabeldict/modules/tmx/tmxcompendium.cpp
index 152bc536..415992bf 100644
--- a/kbabel/kbabeldict/modules/tmx/tmxcompendium.cpp
+++ b/kbabel/kbabeldict/modules/tmx/tmxcompendium.cpp
@@ -41,8 +41,8 @@
#include <kinstance.h>
#include <kio/netaccess.h>
-#include <qtextstream.h>
-#include <qtimer.h>
+#include <tqtextstream.h>
+#include <tqtimer.h>
#include "tmxcompendiumdata.h"
#include "tmxcompendium.h"
@@ -55,10 +55,10 @@
#define NGRAM_LEN 3
#define LIM_NGRAM 50
-static KStaticDeleter< QDict<TmxCompendiumData> > compDataDeleter;
-QDict<TmxCompendiumData> *TmxCompendium::_compDict = 0;
+static KStaticDeleter< TQDict<TmxCompendiumData> > compDataDeleter;
+TQDict<TmxCompendiumData> *TmxCompendium::_compDict = 0;
-TmxCompendium::TmxCompendium(QObject *parent, const char *name)
+TmxCompendium::TmxCompendium(TQObject *parent, const char *name)
: SearchEngine(parent, name)
{
prefWidget=0;
@@ -81,8 +81,8 @@ TmxCompendium::TmxCompendium(QObject *parent, const char *name)
matchWords=true;
- loadTimer = new QTimer(this);
- connect(loadTimer,SIGNAL(timeout()),this,SLOT(slotLoadCompendium()));
+ loadTimer = new TQTimer(this);
+ connect(loadTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(slotLoadCompendium()));
}
TmxCompendium::~TmxCompendium()
@@ -137,7 +137,7 @@ void TmxCompendium::readSettings(KConfigBase *config)
matchWords = config->readBoolEntry("MatchWords",true);
matchNGram = config->readBoolEntry("MatchNGram",true);
- QString newPath = config->readEntry("Compendium","http://i18n.kde.org/po_overview/@LANG@.messages");
+ TQString newPath = config->readEntry("Compendium","http://i18n.kde.org/po_overview/@LANG@.messages");
if(!initialized)
{
url = newPath;
@@ -152,12 +152,12 @@ void TmxCompendium::readSettings(KConfigBase *config)
restoreSettings();
}
-PrefWidget *TmxCompendium::preferencesWidget(QWidget *parent)
+PrefWidget *TmxCompendium::preferencesWidget(TQWidget *parent)
{
prefWidget = new TmxCompendiumPreferencesWidget(parent,"tmxcompendium_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();
@@ -170,23 +170,23 @@ const KAboutData *TmxCompendium::about() const
}
-QString TmxCompendium::name() const
+TQString TmxCompendium::name() const
{
return i18n("TMX Compendium");
}
-QString TmxCompendium::id() const
+TQString TmxCompendium::id() const
{
return "tmxcompendium";
}
-QString TmxCompendium::lastError()
+TQString TmxCompendium::lastError()
{
return errorMsg;
}
-bool TmxCompendium::startSearch(const QString& text, uint pluralForm, const SearchFilter*)
+bool TmxCompendium::startSearch(const TQString& text, uint pluralForm, const SearchFilter*)
{
if(autoUpdate && prefWidget && prefWidget->settingsChanged())
{
@@ -223,8 +223,8 @@ bool TmxCompendium::startSearch(const QString& text, uint pluralForm, const Sear
emit started();
- QValueList<int> foundIndices;
- QValueList<int> checkedIndices;
+ TQValueList<int> foundIndices;
+ TQValueList<int> checkedIndices;
uint checkCounter=0;
const int *index = data->exactDict(text);
@@ -240,8 +240,8 @@ bool TmxCompendium::startSearch(const QString& text, uint pluralForm, const Sear
TranslationInfo *info = new TranslationInfo;
info->location = directory(realURL,0);
- info->translator = QString::null;
- info->description = QString::null;
+ info->translator = TQString::null;
+ info->description = TQString::null;
result->descriptions.append(info);
results.append(result);
@@ -250,7 +250,7 @@ bool TmxCompendium::startSearch(const QString& text, uint pluralForm, const Sear
emit resultFound(result);
}
- QString searchStr=TmxCompendiumData::simplify(text);
+ TQString searchStr=TmxCompendiumData::simplify(text);
if(!caseSensitive)
@@ -258,13 +258,13 @@ bool TmxCompendium::startSearch(const QString& text, uint pluralForm, const Sear
searchStr = searchStr.lower();
}
- QString temp = searchStr;
+ TQString temp = searchStr;
temp = temp.lower();
- const QValueList<int> *indexList = data->allDict(temp);
+ const TQValueList<int> *indexList = data->allDict(temp);
if(indexList)
{
- QValueList<int>::ConstIterator it;
+ TQValueList<int>::ConstIterator it;
for( it = indexList->begin(); it != indexList->end(); ++it )
{
if(foundIndices.contains(*it))
@@ -272,7 +272,7 @@ bool TmxCompendium::startSearch(const QString& text, uint pluralForm, const Sear
continue;
}
- QString origStr = data->msgid(*it);
+ TQString origStr = data->msgid(*it);
origStr = TmxCompendiumData::simplify(origStr);
@@ -294,8 +294,8 @@ bool TmxCompendium::startSearch(const QString& text, uint pluralForm, const Sear
TranslationInfo *info = new TranslationInfo;
info->location = directory(realURL,0);
- info->translator = QString::null;
- info->description = QString::null;
+ info->translator = TQString::null;
+ info->description = TQString::null;
result->descriptions.append(info);
addResult(result);
@@ -303,8 +303,8 @@ bool TmxCompendium::startSearch(const QString& text, uint pluralForm, const Sear
}
}
- QStringList wList = TmxCompendiumData::wordList(searchStr);
- for ( QStringList::Iterator wit = wList.begin()
+ TQStringList wList = TmxCompendiumData::wordList(searchStr);
+ for ( TQStringList::Iterator wit = wList.begin()
; wit != wList.end(); ++wit )
{
if(stop)
@@ -313,7 +313,7 @@ bool TmxCompendium::startSearch(const QString& text, uint pluralForm, const Sear
indexList = data->wordDict((*wit).lower());
if(indexList)
{
- QValueList<int>::ConstIterator it;
+ TQValueList<int>::ConstIterator it;
for( it = indexList->begin(); it != indexList->end(); ++it )
{
if(stop)
@@ -339,7 +339,7 @@ bool TmxCompendium::startSearch(const QString& text, uint pluralForm, const Sear
kapp->processEvents(100);
- QString origStr = data->msgid(*it);
+ TQString origStr = data->msgid(*it);
origStr = TmxCompendiumData::simplify(origStr);
@@ -357,8 +357,8 @@ bool TmxCompendium::startSearch(const QString& text, uint pluralForm, const Sear
}
else
{
- QString s=*wit;
- QString o=origStr;
+ TQString s=*wit;
+ TQString o=origStr;
if(wholeWords)
{
@@ -389,8 +389,8 @@ bool TmxCompendium::startSearch(const QString& text, uint pluralForm, const Sear
if(!found && matchContains && !wholeWords)
{
- QString s=maskString(searchStr);
- QRegExp searchReg(s);
+ TQString s=maskString(searchStr);
+ TQRegExp searchReg(s);
if(searchReg.search(origStr) >= 0)
found=true;
@@ -398,8 +398,8 @@ bool TmxCompendium::startSearch(const QString& text, uint pluralForm, const Sear
if(!found && matchIsContained && !wholeWords)
{
- QString s=maskString(origStr);
- QRegExp reg(s);
+ TQString s=maskString(origStr);
+ TQRegExp reg(s);
if(reg.search(searchStr) >= 0)
{
@@ -408,13 +408,13 @@ bool TmxCompendium::startSearch(const QString& text, uint pluralForm, const Sear
}
if(!found && matchWords && !wholeWords)
{
- QStringList list = TmxCompendiumData::wordList(searchStr);
+ TQStringList list = TmxCompendiumData::wordList(searchStr);
- for ( QStringList::Iterator wit2 = list.begin()
+ for ( TQStringList::Iterator wit2 = list.begin()
; wit2 != list.end(); ++wit2 )
{
- QString s=maskString(*wit2);
- QRegExp reg(s);
+ TQString s=maskString(*wit2);
+ TQRegExp reg(s);
if(reg.search(origStr) >= 0)
{
@@ -436,8 +436,8 @@ bool TmxCompendium::startSearch(const QString& text, uint pluralForm, const Sear
TranslationInfo *info = new TranslationInfo;
info->location = directory(realURL,0);
- info->translator = QString::null;
- info->description = QString::null;
+ info->translator = TQString::null;
+ info->description = TQString::null;
result->descriptions.append(info);
addResult(result);
@@ -451,10 +451,10 @@ bool TmxCompendium::startSearch(const QString& text, uint pluralForm, const Sear
(!wholeWords && (matchContains || matchIsContained || matchWords))
)
{
- QRegExp searchReg;
+ TQRegExp searchReg;
if(matchContains)
{
- QString s=maskString(searchStr);
+ TQString s=maskString(searchStr);
searchReg.setPattern(s);
}
@@ -497,7 +497,7 @@ bool TmxCompendium::startSearch(const QString& text, uint pluralForm, const Sear
emit progress( (100*(checkCounter+1))/data->numberOfEntries());
}
- QString origStr = data->msgid(i);
+ TQString origStr = data->msgid(i);
origStr = TmxCompendiumData::simplify(origStr);
if(!caseSensitive)
@@ -523,8 +523,8 @@ bool TmxCompendium::startSearch(const QString& text, uint pluralForm, const Sear
if(!found && matchIsContained)
{
- QString s=maskString(origStr);
- QRegExp reg(s);
+ TQString s=maskString(origStr);
+ TQRegExp reg(s);
if(reg.search(searchStr) >= 0)
{
@@ -533,19 +533,19 @@ bool TmxCompendium::startSearch(const QString& text, uint pluralForm, const Sear
}
if(!found && matchWords)
{
- QStringList list = TmxCompendiumData::wordList(searchStr);
+ TQStringList list = TmxCompendiumData::wordList(searchStr);
- for ( QStringList::Iterator wit2 = list.begin()
+ for ( TQStringList::Iterator wit2 = list.begin()
; wit2 != list.end(); ++wit2 )
{
- QString s=maskString(*wit2);
+ TQString s=maskString(*wit2);
if(wholeWords)
{
origStr = " "+origStr+" ";
s=" "+s+" ";
}
- QRegExp reg(s);
+ TQRegExp reg(s);
if(reg.search(origStr) >= 0)
{
@@ -577,8 +577,8 @@ bool TmxCompendium::startSearch(const QString& text, uint pluralForm, const Sear
TranslationInfo *info = new TranslationInfo;
info->location = directory(realURL,0);
- info->translator = QString::null;
- info->description = QString::null;
+ info->translator = TQString::null;
+ info->description = TQString::null;
result->descriptions.append(info);
addResult(result);
@@ -629,7 +629,7 @@ void TmxCompendium::applySettings()
bool needLoading=false;
- QString newPath = prefWidget->url();
+ TQString newPath = prefWidget->url();
if(!initialized)
{
url = newPath;
@@ -685,7 +685,7 @@ void TmxCompendium::slotLoadCompendium()
}
- QString path=url;
+ TQString path=url;
if(path.contains("@LANG@"))
{
@@ -718,7 +718,7 @@ void TmxCompendium::slotLoadCompendium()
}
else
{
- connect(data, SIGNAL(progressEnds()), this, SLOT(recheckData()));
+ connect(data, TQT_SIGNAL(progressEnds()), this, TQT_SLOT(recheckData()));
}
}
else
@@ -737,7 +737,7 @@ void TmxCompendium::recheckData()
{
if(data)
{
- disconnect(data, SIGNAL(progressEnds()), this, SLOT(recheckData()));
+ disconnect(data, TQT_SIGNAL(progressEnds()), this, TQT_SLOT(recheckData()));
error = data->hasErrors();
errorMsg = data->errorMsg();
@@ -746,7 +746,7 @@ void TmxCompendium::recheckData()
loading=false;
}
-QString TmxCompendium::maskString(QString s) const
+TQString TmxCompendium::maskString(TQString s) const
{
s.replace('\\',"\\\\");
s.replace('?',"\\?");
@@ -795,7 +795,7 @@ void TmxCompendium::addResult(SearchResult *result)
}
-void TmxCompendium::setLanguageCode(const QString& lang)
+void TmxCompendium::setLanguageCode(const TQString& lang)
{
if(initialized && url.contains("@LANG@") && lang!=langCode
&& !loadTimer->isActive() )
@@ -806,7 +806,7 @@ void TmxCompendium::setLanguageCode(const QString& lang)
langCode=lang;
}
-QString TmxCompendium::translate(const QString& text, uint pluralForm)
+TQString TmxCompendium::translate(const TQString& text, uint pluralForm)
{
if(!initialized)
{
@@ -818,7 +818,7 @@ QString TmxCompendium::translate(const QString& text, uint pluralForm)
if(error || !data || data->active())
{
- return QString::null;
+ return TQString::null;
}
@@ -829,10 +829,10 @@ QString TmxCompendium::translate(const QString& text, uint pluralForm)
return data->msgstr(*index);
}
- return QString::null;
+ return TQString::null;
}
-QString TmxCompendium::fuzzyTranslation(const QString& text, int &score, uint pluralForm)
+TQString TmxCompendium::fuzzyTranslation(const TQString& text, int &score, uint pluralForm)
{
if(!initialized)
{
@@ -844,7 +844,7 @@ QString TmxCompendium::fuzzyTranslation(const QString& text, int &score, uint pl
if(error || !data || data->active())
{
- return QString::null;
+ return TQString::null;
}
// try to find fuzzy string
@@ -855,7 +855,7 @@ QString TmxCompendium::fuzzyTranslation(const QString& text, int &score, uint pl
int best_match = 0;
int total = data->numberOfEntries();
- QString searchStr = TmxCompendiumData::simplify(text);
+ TQString searchStr = TmxCompendiumData::simplify(text);
//kdDebug(750) << "find best match for " << searchStr << endl;
@@ -883,7 +883,7 @@ QString TmxCompendium::fuzzyTranslation(const QString& text, int &score, uint pl
}
// get a message from the catalog
- QString origStr = data->msgid(i);
+ TQString origStr = data->msgid(i);
origStr = TmxCompendiumData::simplify(origStr);
// don't match too long strings for short search string
@@ -907,7 +907,7 @@ QString TmxCompendium::fuzzyTranslation(const QString& text, int &score, uint pl
return data->msgstr(best_matching);
}
- return QString::null;
+ return TQString::null;
}
@@ -915,14 +915,14 @@ void TmxCompendium::unregisterData()
{
if(data)
{
- disconnect(data, SIGNAL(progressStarts(const QString&)), this
- , SIGNAL(progressStarts(const QString&)));
- disconnect(data, SIGNAL(progressEnds()), this , SIGNAL(progressEnds()));
- disconnect(data, SIGNAL(progress(int)), this , SIGNAL(progress(int)));
+ disconnect(data, TQT_SIGNAL(progressStarts(const TQString&)), this
+ , TQT_SIGNAL(progressStarts(const TQString&)));
+ disconnect(data, TQT_SIGNAL(progressEnds()), this , TQT_SIGNAL(progressEnds()));
+ disconnect(data, TQT_SIGNAL(progress(int)), this , TQT_SIGNAL(progress(int)));
if(data->active())
{
- disconnect(data,SIGNAL(progressEnds()),this,SLOT(recheckData()));
+ disconnect(data,TQT_SIGNAL(progressEnds()),this,TQT_SLOT(recheckData()));
}
if(data->unregisterObject(this))
@@ -933,7 +933,7 @@ void TmxCompendium::unregisterData()
}
else
{
- connect(data,SIGNAL(progressEnds()),this,SLOT(removeData()));
+ connect(data,TQT_SIGNAL(progressEnds()),this,TQT_SLOT(removeData()));
}
}
@@ -957,21 +957,21 @@ void TmxCompendium::registerData()
emit progressStarts(i18n("Loading PO compendium"));
}
- connect(data, SIGNAL(progressStarts(const QString&)), this
- , SIGNAL(progressStarts(const QString&)));
- connect(data, SIGNAL(progressEnds()), this , SIGNAL(progressEnds()));
- connect(data, SIGNAL(progress(int)), this , SIGNAL(progress(int)));
+ connect(data, TQT_SIGNAL(progressStarts(const TQString&)), this
+ , TQT_SIGNAL(progressStarts(const TQString&)));
+ connect(data, TQT_SIGNAL(progressEnds()), this , TQT_SIGNAL(progressEnds()));
+ connect(data, TQT_SIGNAL(progress(int)), this , TQT_SIGNAL(progress(int)));
}
void TmxCompendium::removeData()
{
- const QObject *s=sender();
+ const TQObject *s=sender();
if(s && s->inherits("TmxCompendiumData"))
{
const TmxCompendiumData *d=static_cast<const TmxCompendiumData*>(s);
if(d)
{
- QDictIterator<TmxCompendiumData> it(*compendiumDict());
+ TQDictIterator<TmxCompendiumData> it(*compendiumDict());
while(it.current())
{
if(it.current() == d)
@@ -991,11 +991,11 @@ void TmxCompendium::removeData()
}
}
-QDict<TmxCompendiumData> *TmxCompendium::compendiumDict()
+TQDict<TmxCompendiumData> *TmxCompendium::compendiumDict()
{
if(!_compDict)
{
- _compDict=compDataDeleter.setObject( new QDict<TmxCompendiumData> );
+ _compDict=compDataDeleter.setObject( new TQDict<TmxCompendiumData> );
_compDict->setAutoDelete(true);
}
diff --git a/kbabel/kbabeldict/modules/tmx/tmxcompendium.h b/kbabel/kbabeldict/modules/tmx/tmxcompendium.h
index 9a2f8fba..21270799 100644
--- a/kbabel/kbabeldict/modules/tmx/tmxcompendium.h
+++ b/kbabel/kbabeldict/modules/tmx/tmxcompendium.h
@@ -39,9 +39,9 @@
#include "tmxcompendiumdata.h"
#include "searchengine.h"
-#include <qdict.h>
-#include <qfile.h>
-#include <qguardedptr.h>
+#include <tqdict.h>
+#include <tqfile.h>
+#include <tqguardedptr.h>
class TmxCompendiumPreferencesWidget;
class KConfigBase;
@@ -52,34 +52,34 @@ class TmxCompendium : public SearchEngine
Q_OBJECT
public:
- TmxCompendium(QObject *parent=0, const char *name=0);
+ TmxCompendium(TQObject *parent=0, const char *name=0);
virtual ~TmxCompendium();
virtual bool isReady() const;
- virtual QString translate(const QString& text, uint pluralForm);
- virtual QString fuzzyTranslation(const QString& text, int &score, uint pluralForm);
+ virtual TQString translate(const TQString& text, uint pluralForm);
+ virtual TQString fuzzyTranslation(const TQString& text, int &score, 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();
public slots:
- virtual bool startSearch(const QString& text, uint pluralForm, const SearchFilter* filter);
+ virtual bool startSearch(const TQString& text, uint pluralForm, const SearchFilter* filter);
virtual void stopSearch();
- virtual void setLanguageCode(const QString& lang);
+ virtual void setLanguageCode(const TQString& lang);
protected slots:
/** reads the current settings from the preferences dialog */
@@ -96,19 +96,19 @@ protected slots:
protected:
void loadCompendium();
void addResult(SearchResult *);
- QString maskString(QString string) const;
+ TQString maskString(TQString string) const;
void registerData();
void unregisterData();
private:
- QGuardedPtr<TmxCompendiumPreferencesWidget> prefWidget;
+ TQGuardedPtr<TmxCompendiumPreferencesWidget> prefWidget;
TmxCompendiumData *data;
- QTimer *loadTimer;
+ TQTimer *loadTimer;
- QString url;
- QString realURL;
- QString langCode;
+ TQString url;
+ TQString realURL;
+ TQString langCode;
bool caseSensitive;
bool wholeWords;
@@ -123,15 +123,15 @@ private:
uint freeMemDelay;
bool error;
- QString errorMsg;
+ TQString errorMsg;
bool stop;
bool active;
bool initialized;
bool loading;
- static QDict<TmxCompendiumData> *_compDict;
- static QDict<TmxCompendiumData> *compendiumDict();
+ static TQDict<TmxCompendiumData> *_compDict;
+ static TQDict<TmxCompendiumData> *compendiumDict();
};
#endif
diff --git a/kbabel/kbabeldict/modules/tmx/tmxcompendiumdata.cpp b/kbabel/kbabeldict/modules/tmx/tmxcompendiumdata.cpp
index 3fa84aa4..7893e837 100644
--- a/kbabel/kbabeldict/modules/tmx/tmxcompendiumdata.cpp
+++ b/kbabel/kbabeldict/modules/tmx/tmxcompendiumdata.cpp
@@ -34,8 +34,8 @@
**************************************************************************** */
#include "tmxcompendiumdata.h"
-#include <qdom.h>
-#include <qfile.h>
+#include <tqdom.h>
+#include <tqfile.h>
#include <tagextractor.h>
#include <resources.h>
@@ -47,8 +47,8 @@
using namespace KBabel;
-TmxCompendiumData::TmxCompendiumData(QObject *parent)
- : QObject(parent)
+TmxCompendiumData::TmxCompendiumData(TQObject *parent)
+ : TQObject(parent)
, _active(false)
, _error(false)
, _initialized(false)
@@ -62,7 +62,7 @@ TmxCompendiumData::TmxCompendiumData(QObject *parent)
}
-bool TmxCompendiumData::load(const KURL& url, const QString& language)
+bool TmxCompendiumData::load(const KURL& url, const TQString& language)
{
kdDebug(KBABEL_SEARCH) << "Load " << url.url() << " in " << language << endl;
if(_active)
@@ -79,13 +79,13 @@ bool TmxCompendiumData::load(const KURL& url, const QString& language)
emit progressStarts(i18n("Loading TMX compendium"));
- QDomDocument doc( "mydocument" );
+ TQDomDocument doc( "mydocument" );
- QString target;
+ TQString target;
if( KIO::NetAccess::download( url, target ) )
{
- QFile f( target );
+ TQFile f( target );
if ( !f.open( IO_ReadOnly ) )
{
_error = true;
@@ -102,7 +102,7 @@ bool TmxCompendiumData::load(const KURL& url, const QString& language)
_errorMsg = i18n( "Cannot open the file." );
}
- QDomElement docElem = doc.documentElement();
+ TQDomElement docElem = doc.documentElement();
if( docElem.tagName() != "tmx" || !(docElem.hasAttribute("version")
&& docElem.attribute("version") == "1.4" ) )
@@ -131,7 +131,7 @@ bool TmxCompendiumData::load(const KURL& url, const QString& language)
emit progressStarts(i18n("Building indices"));
- QDomNodeList tuTags = docElem.elementsByTagName("tu");
+ TQDomNodeList tuTags = docElem.elementsByTagName("tu");
uint total = tuTags.count();
_originals.clear();
@@ -149,11 +149,11 @@ bool TmxCompendiumData::load(const KURL& url, const QString& language)
kapp->processEvents(100);
}
- QDomNodeList tuvTags = tuTags.item(i).toElement().elementsByTagName("tuv");
- QString english, other;
+ TQDomNodeList tuvTags = tuTags.item(i).toElement().elementsByTagName("tuv");
+ TQString english, other;
for( uint j = 0 ; j < tuvTags.count() ; j++ )
{
- QDomElement el = tuvTags.item(j).toElement();
+ TQDomElement el = tuvTags.item(j).toElement();
if( el.attribute("xml:lang").upper() == "EN" ) english = el.text();
if( el.attribute("xml:lang").upper().startsWith(language.upper()) )
other = el.text();
@@ -165,7 +165,7 @@ bool TmxCompendiumData::load(const KURL& url, const QString& language)
_originals[lastindex] = english;
_translations[lastindex] = other;
- QString temp = english;
+ TQString temp = english;
int *index = new int(lastindex);
_exactDict.insert(temp,index);
@@ -175,18 +175,18 @@ bool TmxCompendiumData::load(const KURL& url, const QString& language)
if(!temp.isEmpty() && temp.length() > 1)
{
- QValueList<int> *indexList=_allDict[temp];
+ TQValueList<int> *indexList=_allDict[temp];
if(!indexList)
{
- indexList = new QValueList<int>;
+ indexList = new TQValueList<int>;
_allDict.insert(temp,indexList);
}
indexList->append(lastindex);
- QStringList wList = wordList(temp);
- for ( QStringList::Iterator it = wList.begin()
+ TQStringList wList = wordList(temp);
+ for ( TQStringList::Iterator it = wList.begin()
; it != wList.end(); ++it )
{
if( (*it).length() > 1)
@@ -195,7 +195,7 @@ bool TmxCompendiumData::load(const KURL& url, const QString& language)
if(!indexList)
{
- indexList = new QValueList<int>;
+ indexList = new TQValueList<int>;
_wordDict.insert(*it,indexList);
}
@@ -210,7 +210,7 @@ bool TmxCompendiumData::load(const KURL& url, const QString& language)
// remove words, that are too frequent
uint max=_allDict.count()/10;
- QDictIterator< QValueList<int> > it(_wordDict);
+ TQDictIterator< TQValueList<int> > it(_wordDict);
while ( it.current() )
{
if(it.current()->count() > max)
@@ -240,39 +240,39 @@ bool TmxCompendiumData::load(const KURL& url, const QString& language)
return true;
}
-const int* TmxCompendiumData::exactDict(const QString& text) const
+const int* TmxCompendiumData::exactDict(const TQString& text) const
{
return _exactDict[text];
}
-const QValueList<int>* TmxCompendiumData::allDict(const QString& text) const
+const TQValueList<int>* TmxCompendiumData::allDict(const TQString& text) const
{
return _allDict[text];
}
-const QValueList<int>* TmxCompendiumData::wordDict(const QString& text) const
+const TQValueList<int>* TmxCompendiumData::wordDict(const TQString& text) const
{
return _wordDict[text];
}
-const QString TmxCompendiumData::msgid(const int index) const
+const TQString TmxCompendiumData::msgid(const int index) const
{
return _originals[index];
}
-const QString TmxCompendiumData::msgstr(const int index) const
+const TQString TmxCompendiumData::msgstr(const int index) const
{
return _translations[index];
}
-void TmxCompendiumData::registerObject(QObject *obj)
+void TmxCompendiumData::registerObject(TQObject *obj)
{
if(!_registered.containsRef(obj))
_registered.append(obj);
}
-bool TmxCompendiumData::unregisterObject(QObject *obj)
+bool TmxCompendiumData::unregisterObject(TQObject *obj)
{
_registered.removeRef(obj);
@@ -284,9 +284,9 @@ bool TmxCompendiumData::hasObjects() const
return _registered.count()==0;
}
-QString TmxCompendiumData::simplify(const QString& string)
+TQString TmxCompendiumData::simplify(const TQString& string)
{
- QString result;
+ TQString result;
TagExtractor te;
te.setString(string);
@@ -298,11 +298,11 @@ QString TmxCompendiumData::simplify(const QString& string)
return result;
}
-QStringList TmxCompendiumData::wordList(const QString& string)
+TQStringList TmxCompendiumData::wordList(const TQString& string)
{
- QString result=TmxCompendiumData::simplify(string);
+ TQString result=TmxCompendiumData::simplify(string);
- return QStringList::split(' ',result);
+ return TQStringList::split(' ',result);
}
#include "tmxcompendiumdata.moc"
diff --git a/kbabel/kbabeldict/modules/tmx/tmxcompendiumdata.h b/kbabel/kbabeldict/modules/tmx/tmxcompendiumdata.h
index bc88a92e..ce2692a1 100644
--- a/kbabel/kbabeldict/modules/tmx/tmxcompendiumdata.h
+++ b/kbabel/kbabeldict/modules/tmx/tmxcompendiumdata.h
@@ -37,52 +37,52 @@
#include <kurl.h>
-#include <qdict.h>
-#include <qobject.h>
-#include <qstringlist.h>
-#include <qvaluelist.h>
-#include <qvaluevector.h>
-#include <qptrlist.h>
+#include <tqdict.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
+#include <tqvaluelist.h>
+#include <tqvaluevector.h>
+#include <tqptrlist.h>
class TmxCompendiumData : public QObject
{
Q_OBJECT
public:
- TmxCompendiumData(QObject *parent=0);
+ TmxCompendiumData(TQObject *parent=0);
- bool load(const KURL& url, const QString& language);
+ bool load(const KURL& url, const TQString& language);
- const int *exactDict(const QString& text) const;
- const QValueList<int> *allDict(const QString& text) const;
- const QValueList<int> *wordDict(const QString& text) const;
+ const int *exactDict(const TQString& text) const;
+ const TQValueList<int> *allDict(const TQString& text) const;
+ const TQValueList<int> *wordDict(const TQString& text) const;
- const QString msgid(const int index) const;
- const QString msgstr(const int index) const;
+ const TQString msgid(const int index) const;
+ const TQString msgstr(const int index) const;
const int numberOfEntries() const { return _exactDict.count(); }
bool active() const { return _active; }
bool initialized() const { return _initialized; }
bool hasErrors() const { return _error; }
- QString errorMsg() const { return _errorMsg; }
+ TQString errorMsg() const { return _errorMsg; }
/** registers an object, that uses this data */
- void registerObject(QObject *);
+ void registerObject(TQObject *);
/**
* unregisters an object, that uses this data
*
* @return true, if this was the last object
*/
- bool unregisterObject(QObject *);
+ bool unregisterObject(TQObject *);
bool hasObjects() const;
- static QString simplify(const QString& text);
- static QStringList wordList(const QString& text);
+ static TQString simplify(const TQString& text);
+ static TQStringList wordList(const TQString& text);
signals:
- void progressStarts(const QString&);
+ void progressStarts(const TQString&);
void progressEnds();
void progress(int);
@@ -91,16 +91,16 @@ private:
bool _active;
bool _error;
bool _initialized;
- QString _errorMsg;
+ TQString _errorMsg;
- QDict<int> _exactDict;
- QDict< QValueList<int> > _allDict;
- QDict< QValueList<int> > _wordDict;
+ TQDict<int> _exactDict;
+ TQDict< TQValueList<int> > _allDict;
+ TQDict< TQValueList<int> > _wordDict;
- QValueVector<QString> _originals;
- QValueVector<QString> _translations;
+ TQValueVector<TQString> _originals;
+ TQValueVector<TQString> _translations;
- QPtrList<QObject> _registered;
+ TQPtrList<TQObject> _registered;
};
#endif