2013-10-08 22:44:38 -07:00
|
|
|
#ifndef GETTEXTFROMC_H
|
|
|
|
#define GETTEXTFROMC_H
|
2013-10-06 08:55:58 -07:00
|
|
|
|
2013-10-08 22:44:38 -07:00
|
|
|
#include <QHash>
|
2014-04-29 22:35:34 -07:00
|
|
|
#include <QCoreApplication>
|
2013-10-06 08:55:58 -07:00
|
|
|
|
2013-10-10 00:15:21 -07:00
|
|
|
extern "C" const char *trGettext(const char *text);
|
2013-10-06 08:55:58 -07:00
|
|
|
|
2014-02-27 20:09:57 -08:00
|
|
|
class gettextFromC {
|
|
|
|
Q_DECLARE_TR_FUNCTIONS(gettextFromC)
|
2013-10-06 08:55:58 -07:00
|
|
|
public:
|
|
|
|
static gettextFromC *instance();
|
2013-10-10 00:15:21 -07:00
|
|
|
const char *trGettext(const char *text);
|
2013-10-08 22:44:38 -07:00
|
|
|
void reset(void);
|
2014-02-27 20:09:57 -08:00
|
|
|
QHash<QByteArray, QByteArray> translationCache;
|
2013-10-06 08:55:58 -07:00
|
|
|
};
|
|
|
|
|
2013-10-08 22:44:38 -07:00
|
|
|
#endif // GETTEXTFROMC_H
|