diff options
Diffstat (limited to 'kbabel/kbabeldict/modules/dbsearchengine/database.h')
-rw-r--r-- | kbabel/kbabeldict/modules/dbsearchengine/database.h | 74 |
1 files changed, 37 insertions, 37 deletions
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; |