summaryrefslogtreecommitdiffstats
path: root/plugins/src/codecs/kr
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2011-07-10 15:24:15 -0500
committerTimothy Pearson <[email protected]>2011-07-10 15:24:15 -0500
commitbd0f3345a938b35ce6a12f6150373b0955b8dd12 (patch)
tree7a520322212d48ebcb9fbe1087e7fca28b76185c /plugins/src/codecs/kr
downloadqt3-bd0f3345a938b35ce6a12f6150373b0955b8dd12.tar.gz
qt3-bd0f3345a938b35ce6a12f6150373b0955b8dd12.zip
Add Qt3 development HEAD version
Diffstat (limited to 'plugins/src/codecs/kr')
-rw-r--r--plugins/src/codecs/kr/kr.pro19
-rw-r--r--plugins/src/codecs/kr/main.cpp47
2 files changed, 66 insertions, 0 deletions
diff --git a/plugins/src/codecs/kr/kr.pro b/plugins/src/codecs/kr/kr.pro
new file mode 100644
index 0000000..472373f
--- /dev/null
+++ b/plugins/src/codecs/kr/kr.pro
@@ -0,0 +1,19 @@
+TEMPLATE = lib
+TARGET = qkrcodecs
+
+CONFIG += qt warn_on plugin
+DESTDIR = ../../../codecs
+
+REQUIRES = !bigcodecs
+
+HEADERS = ../../../../include/qeuckrcodec.h \
+ ../../../../include/private/qfontcodecs_p.h
+
+SOURCES = ../../../../src/codecs/qeuckrcodec.cpp \
+ ../../../../src/codecs/qfontkrcodec.cpp \
+ main.cpp
+
+
+target.path += $$plugins.path/codecs
+INSTALLS += target
+
diff --git a/plugins/src/codecs/kr/main.cpp b/plugins/src/codecs/kr/main.cpp
new file mode 100644
index 0000000..2b80442
--- /dev/null
+++ b/plugins/src/codecs/kr/main.cpp
@@ -0,0 +1,47 @@
+#include <qtextcodecplugin.h>
+#include <qtextcodec.h>
+#include <qptrlist.h>
+
+#include <qeuckrcodec.h>
+#include <private/qfontcodecs_p.h>
+
+
+class KRTextCodecs : public QTextCodecPlugin
+{
+public:
+ KRTextCodecs() {}
+
+ QStringList names() const { return QStringList() << "eucKR" << "ksc5601.1987-0"; }
+ QValueList<int> mibEnums() const { return QValueList<int>() << 38 << 36; }
+ QTextCodec *createForMib( int );
+ QTextCodec *createForName( const QString & );
+};
+
+
+QTextCodec *KRTextCodecs::createForMib( int mib )
+{
+ switch (mib) {
+ case 36:
+ return new QFontKsc5601Codec;
+ case 38:
+ return new QEucKrCodec;
+ default:
+ ;
+ }
+
+ return 0;
+}
+
+
+QTextCodec *KRTextCodecs::createForName( const QString &name )
+{
+ if (name == "eucKR")
+ return new QEucKrCodec;
+ if (name == "ksc5601.1987-0")
+ return new QFontKsc5601Codec;
+
+ return 0;
+}
+
+
+Q_EXPORT_PLUGIN( KRTextCodecs );