summaryrefslogtreecommitdiffstats
path: root/src/kvilib/system/kvi_locale.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-28 18:31:12 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-28 18:31:12 +0000
commit0a80cfd57d271dd44221467efb426675fa470356 (patch)
tree6f503a31aa078eaf8fa015cf1749808529d49fc9 /src/kvilib/system/kvi_locale.h
parent3329e5a804e28ef3f5eb51d1e7affdd5a508e8f2 (diff)
downloadkvirc-0a80cfd57d271dd44221467efb426675fa470356.tar.gz
kvirc-0a80cfd57d271dd44221467efb426675fa470356.zip
TQt4 port kvirc
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kvirc@1238719 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/kvilib/system/kvi_locale.h')
-rw-r--r--src/kvilib/system/kvi_locale.h57
1 files changed, 29 insertions, 28 deletions
diff --git a/src/kvilib/system/kvi_locale.h b/src/kvilib/system/kvi_locale.h
index bc3ed8eb..27b666b7 100644
--- a/src/kvilib/system/kvi_locale.h
+++ b/src/kvilib/system/kvi_locale.h
@@ -31,9 +31,9 @@
#include "kvi_string.h"
#include "kvi_pointerhashtable.h"
-#include <qapplication.h>
+#include <tqapplication.h>
-class QTextCodec;
+class TQTextCodec;
class KviMessageCatalogue;
namespace KviLocale
@@ -49,16 +49,16 @@ namespace KviLocale
// you MUST start iterating from 0 and terminate when
// you get an entry with a NULL szName
KVILIB_API EncodingDescription * encodingDescription(int iIdx);
- KVILIB_API QTextCodec * codecForName(const char * szName);
+ KVILIB_API TQTextCodec * codecForName(const char * szName);
KVILIB_API const KviStr & localeName();
- KVILIB_API bool findCatalogue(QString &szBuffer,const QString& name,const QString& szLocaleDir);
- KVILIB_API bool loadCatalogue(const QString& name,const QString& szLocaleDir);
- KVILIB_API KviMessageCatalogue * getLoadedCatalogue(const QString& name);
- KVILIB_API bool unloadCatalogue(const QString& name);
- KVILIB_API void init(QApplication * app,const QString& localeDir);
- KVILIB_API void done(QApplication * app);
+ KVILIB_API bool findCatalogue(TQString &szBuffer,const TQString& name,const TQString& szLocaleDir);
+ KVILIB_API bool loadCatalogue(const TQString& name,const TQString& szLocaleDir);
+ KVILIB_API KviMessageCatalogue * getLoadedCatalogue(const TQString& name);
+ KVILIB_API bool unloadCatalogue(const TQString& name);
+ KVILIB_API void init(TQApplication * app,const TQString& localeDir);
+ KVILIB_API void done(TQApplication * app);
KVILIB_API const char * translate(const char * text,const char * context);
- KVILIB_API const QString & translateToQString(const char * text,const char * context);
+ KVILIB_API const TQString & translateToTQString(const char * text,const char * context);
};
// not exported
@@ -67,23 +67,23 @@ class KviTranslationEntry
public:
KviStr m_szKey;
KviStr m_szEncodedTranslation;
- QString * m_pQTranslation;
+ TQString * m_pTQTranslation;
public:
KviTranslationEntry(char * keyptr,int keylen,char * trptr,int trlen)
: m_szKey(keyptr,keylen) , m_szEncodedTranslation(trptr,trlen)
{
- m_pQTranslation = 0;
+ m_pTQTranslation = 0;
}
KviTranslationEntry(const char * keyandtr)
: m_szKey(keyandtr) , m_szEncodedTranslation(keyandtr)
{
- m_pQTranslation = 0;
+ m_pTQTranslation = 0;
}
~KviTranslationEntry()
{
- if(m_pQTranslation)delete m_pQTranslation;
+ if(m_pTQTranslation)delete m_pTQTranslation;
}
};
@@ -96,11 +96,11 @@ public:
protected:
//KviPointerHashTable<const char *,KviTranslationEntry> * m_pMessages;
KviPointerHashTable<const char *,KviTranslationEntry> * m_pMessages;
- QTextCodec * m_pTextCodec;
+ TQTextCodec * m_pTextCodec;
public:
- bool load(const QString& name);
+ bool load(const TQString& name);
const char * translate(const char * text);
- const QString & translateToQString(const char * text);
+ const TQString & translateToTQString(const char * text);
};
#ifndef _KVI_LOCALE_CPP_
@@ -111,34 +111,35 @@ public:
#define __tr_no_lookup(__text__) __text__
#define __tr_no_xgettext(__text__) g_pMainCatalogue->translate(__text__)
-#define __tr2qs(__text__) g_pMainCatalogue->translateToQString(__text__)
-#define __tr2qs_no_xgettext(__text__) g_pMainCatalogue->translateToQString(__text__)
+#define __tr2qs(__text__) g_pMainCatalogue->translateToTQString(__text__)
+#define __tr2qs_no_xgettext(__text__) g_pMainCatalogue->translateToTQString(__text__)
#define __tr_ctx(__text__,__context__) KviLocale::translate(__text__,__context__)
#define __tr_no_lookup_ctx(__text__,__context__) __text__
#define __tr_no_xgettext_ctx(__text__,__context__) KviLocale::translate(__text__,__context__)
-#define __tr2qs_ctx(__text__,__context__) KviLocale::translateToQString(__text__,__context__)
-#define __tr2qs_ctx_no_xgettext(__text__,__context__) KviLocale::translateToQString(__text__,__context__)
+#define __tr2qs_ctx(__text__,__context__) KviLocale::translateToTQString(__text__,__context__)
+#define __tr2qs_ctx_no_xgettext(__text__,__context__) KviLocale::translateToTQString(__text__,__context__)
#define __tr2qs_no_lookup(__text__) __text__
-#include <qtranslator.h>
-#include <qstring.h>
+#include <tqtranslator.h>
+#include <tqstring.h>
-class KVILIB_API KviTranslator : public QTranslator
+class KVILIB_API KviTranslator : public TQTranslator
{
Q_OBJECT
+ TQ_OBJECT
public:
- KviTranslator(QObject * parent,const char * name);
+ KviTranslator(TQObject * tqparent,const char * name);
~KviTranslator();
public:
#ifdef COMPILE_USE_QT4
- virtual QString translate(const char * context,const char * message,const char * comment) const;
+ virtual TQString translate(const char * context,const char * message,const char * comment) const;
#endif
// Deprecated in qt 4.x
- virtual QString find(const char * context,const char * message) const;
+ virtual TQString tqfind(const char * context,const char * message) const;
#ifndef COMPILE_USE_QT4
// Dead in qt 4.x
- virtual QTranslatorMessage findMessage(const char * context,const char * sourceText,const char * comment = 0) const;
+ virtual TQTranslatorMessage findMessage(const char * context,const char * sourceText,const char * comment = 0) const;
#endif
};