00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038 #ifndef QFONTCODECS_P_H
00039 #define QFONTCODECS_P_H
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053 #ifndef QT_H
00054 #include "qglobal.h"
00055 #include "qtextcodec.h"
00056 #endif // QT_H
00057
00058
00059 #ifndef QT_NO_CODECS
00060 #ifndef QT_NO_BIG_CODECS
00061
00062
00063 class QJpUnicodeConv;
00064
00065
00066 class QFontJis0201Codec : public QTextCodec
00067 {
00068 public:
00069 QFontJis0201Codec();
00070
00071 const char *name() const;
00072
00073 int mibEnum() const;
00074
00075 #if !defined(Q_NO_USING_KEYWORD)
00076 using QTextCodec::fromUnicode;
00077 #endif
00078 QCString fromUnicode(const QString& uc, int& lenInOut ) const;
00079
00080 int heuristicContentMatch(const char *, int) const;
00081 int heuristicNameMatch(const char* hint) const;
00082
00083 #if !defined(Q_NO_USING_KEYWORD)
00084 using QTextCodec::canEncode;
00085 #endif
00086 bool canEncode( QChar ) const;
00087 };
00088
00089
00090 class QFontJis0208Codec : public QTextCodec
00091 {
00092 public:
00093 QFontJis0208Codec();
00094 ~QFontJis0208Codec();
00095
00096
00097 const char* name() const ;
00098
00099
00100
00101 int mibEnum() const ;
00102
00103
00104 QString toUnicode(const char* chars, int len) const ;
00105
00106
00107
00108
00109 #if !defined(Q_NO_USING_KEYWORD)
00110 using QTextCodec::fromUnicode;
00111 #endif
00112 QCString fromUnicode(const QString& uc, int& lenInOut ) const;
00113
00114 int heuristicContentMatch(const char *, int) const;
00115 int heuristicNameMatch(const char* hint) const;
00116
00117 #if !defined(Q_NO_USING_KEYWORD)
00118 using QTextCodec::canEncode;
00119 #endif
00120 bool canEncode( QChar ) const;
00121
00122 private:
00123 QJpUnicodeConv *convJP;
00124 };
00125
00126
00127
00128
00129 class QFontKsc5601Codec : public QTextCodec
00130 {
00131 public:
00132 QFontKsc5601Codec();
00133
00134
00135 const char* name() const ;
00136
00137
00138
00139 int mibEnum() const ;
00140
00141
00142 QString toUnicode(const char* chars, int len) const ;
00143
00144
00145
00146
00147 #if !defined(Q_NO_USING_KEYWORD)
00148 using QTextCodec::fromUnicode;
00149 #endif
00150 QCString fromUnicode(const QString& uc, int& lenInOut ) const;
00151
00152 int heuristicContentMatch(const char *, int) const;
00153 #if !defined(Q_NO_USING_KEYWORD)
00154 using QTextCodec::canEncode;
00155 #endif
00156 bool canEncode( QChar ) const;
00157 };
00158
00159
00160
00161
00162 class QFontGb2312Codec : public QTextCodec
00163 {
00164 public:
00165 QFontGb2312Codec();
00166
00167
00168 const char* name() const ;
00169
00170
00171
00172 int mibEnum() const ;
00173
00174
00175 QString toUnicode(const char* chars, int len) const ;
00176
00177
00178
00179
00180 QCString fromUnicode(const QString& uc, int& lenInOut ) const;
00181
00182 int heuristicContentMatch(const char *, int) const;
00183 bool canEncode( QChar ) const;
00184 };
00185
00186
00187
00188
00189 class QFontGbkCodec : public QTextCodec
00190 {
00191 public:
00192 QFontGbkCodec();
00193
00194
00195 const char* name() const ;
00196
00197
00198
00199 int mibEnum() const ;
00200
00201
00202 QString toUnicode(const char* chars, int len) const ;
00203
00204
00205
00206
00207 QCString fromUnicode(const QString& uc, int& lenInOut ) const;
00208
00209 int heuristicContentMatch(const char *, int) const;
00210 int heuristicNameMatch(const char* hint) const;
00211 bool canEncode( QChar ) const;
00212 };
00213
00214
00215
00216
00217 class QFontGb18030_0Codec : public QTextCodec
00218 {
00219 public:
00220 QFontGb18030_0Codec();
00221
00222
00223 const char* name() const ;
00224
00225
00226
00227 int mibEnum() const ;
00228
00229
00230 QString toUnicode(const char* chars, int len) const ;
00231
00232
00233
00234
00235 #if !defined(Q_NO_USING_KEYWORD)
00236 using QTextCodec::fromUnicode;
00237 #endif
00238 QCString fromUnicode(const QString& uc, int& lenInOut ) const;
00239
00240 int heuristicContentMatch(const char *, int) const;
00241 #if !defined(Q_NO_USING_KEYWORD)
00242 using QTextCodec::canEncode;
00243 #endif
00244 bool canEncode( QChar ) const;
00245 };
00246
00247
00248
00249
00250 class QFontBig5Codec : public QTextCodec
00251 {
00252 public:
00253 QFontBig5Codec();
00254
00255
00256 const char* name() const ;
00257
00258
00259
00260 int mibEnum() const ;
00261
00262
00263 QString toUnicode(const char* chars, int len) const ;
00264
00265
00266
00267
00268 #if !defined(Q_NO_USING_KEYWORD)
00269 using QTextCodec::fromUnicode;
00270 #endif
00271 QCString fromUnicode(const QString& uc, int& lenInOut ) const;
00272
00273 int heuristicContentMatch(const char *, int) const;
00274 #if !defined(Q_NO_USING_KEYWORD)
00275 using QTextCodec::canEncode;
00276 #endif
00277 int heuristicNameMatch(const char* hint) const;
00278 bool canEncode( QChar ) const;
00279 };
00280
00281
00282
00283 class QFontBig5hkscsCodec : public QTextCodec
00284 {
00285 public:
00286 QFontBig5hkscsCodec();
00287
00288
00289 const char* name() const ;
00290
00291
00292
00293 int mibEnum() const ;
00294
00295
00296 QString toUnicode(const char* chars, int len) const ;
00297
00298
00299
00300
00301 QCString fromUnicode(const QString& uc, int& lenInOut ) const;
00302
00303 int heuristicContentMatch(const char *, int) const;
00304 int heuristicNameMatch(const char* hint) const;
00305 #if !defined(Q_NO_USING_KEYWORD)
00306 using QTextCodec::canEncode;
00307 #endif
00308 bool canEncode( QChar ) const;
00309 };
00310
00311
00312
00313
00314
00315
00316
00317 class QFontArabic68Codec : public QTextCodec
00318 {
00319 public:
00320 QFontArabic68Codec();
00321
00322
00323 const char* name() const ;
00324
00325
00326
00327 int mibEnum() const ;
00328
00329
00330 QString toUnicode(const char* chars, int len) const ;
00331
00332
00333
00334
00335 QCString fromUnicode(const QString& uc, int& lenInOut ) const;
00336
00337 int heuristicContentMatch(const char *, int) const;
00338 QByteArray fromUnicode( const QString &str, int from, int len ) const;
00339 unsigned short characterFromUnicode(const QString &str, int pos) const;
00340 };
00341
00342
00343 class QFontLaoCodec : public QTextCodec
00344 {
00345 public:
00346 QFontLaoCodec();
00347
00348 const char *name() const;
00349
00350 int mibEnum() const;
00351
00352 #if !defined(Q_NO_USING_KEYWORD)
00353 using QTextCodec::fromUnicode;
00354 #endif
00355 QCString fromUnicode(const QString& uc, int& lenInOut ) const;
00356
00357 int heuristicContentMatch(const char *, int) const;
00358
00359 #if !defined(Q_NO_USING_KEYWORD)
00360 using QTextCodec::canEncode;
00361 #endif
00362 bool canEncode( QChar ) const;
00363 };
00364
00365 #endif // QT_NO_BIG_CODECS
00366 #endif // QT_NO_CODECS
00367
00368 #endif // QFONTCODECS_P_H