mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-30 17:24:08 +00:00
31 lines
504 B
C++
31 lines
504 B
C++
|
#ifndef __EPWING_CHARMAP_HH_INCLUDED_
|
||
|
#define __EPWING_CHARMAP_HH_INCLUDED_
|
||
|
|
||
|
#include <QString>
|
||
|
#include <QByteArray>
|
||
|
#include <QMap>
|
||
|
|
||
|
namespace Epwing {
|
||
|
|
||
|
class EpwingCharmap
|
||
|
{
|
||
|
public:
|
||
|
|
||
|
/// The class is a singleton.
|
||
|
static EpwingCharmap & instance();
|
||
|
|
||
|
/// Map Epwing extra char to Utf-8
|
||
|
QByteArray mapToUtf8( QString const & code );
|
||
|
|
||
|
private:
|
||
|
EpwingCharmap();
|
||
|
|
||
|
void addEntry( QString const & code, QChar ch );
|
||
|
|
||
|
QMap< QString, QChar > charMap;
|
||
|
};
|
||
|
|
||
|
}
|
||
|
|
||
|
#endif // __EPWING_CHARMAP_HH_INCLUDED_
|