mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-24 21:04:09 +00:00
28 lines
538 B
C++
28 lines
538 B
C++
/* This file is (c) 2014 Abs62
|
|
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
|
|
|
#include "epwing_charmap.hh"
|
|
|
|
namespace Epwing {
|
|
|
|
EpwingCharmap & EpwingCharmap::instance()
|
|
{
|
|
static EpwingCharmap ec;
|
|
return ec;
|
|
}
|
|
|
|
QByteArray EpwingCharmap::mapToUtf8( QString const & code )
|
|
{
|
|
if( charMap.contains( code ) )
|
|
return QString( charMap[ code ] ).toUtf8();
|
|
|
|
return QByteArray();
|
|
}
|
|
|
|
void EpwingCharmap::addEntry( QString const & code, int ch )
|
|
{
|
|
charMap[ code ] = QChar(ch);
|
|
}
|
|
|
|
} // namespace Epwing
|