Eneboo - Documentación para desarrolladores
src/qt/src/codecs/qfontcodecs_p.h
Ir a la documentación de este archivo.
00001 /****************************************************************************
00002 ** $Id: qt/qfontcodecs_p.h   3.3.8   edited Jan 11 14:37 $
00003 **
00004 ** Font utilities for X11
00005 **
00006 ** Created : 20001101
00007 **
00008 ** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
00009 **
00010 ** This file is part of the tools module of the Qt GUI Toolkit.
00011 **
00012 ** This file may be distributed under the terms of the Q Public License
00013 ** as defined by Trolltech ASA of Norway and appearing in the file
00014 ** LICENSE.QPL included in the packaging of this file.
00015 **
00016 ** This file may be distributed and/or modified under the terms of the
00017 ** GNU General Public License version 2 as published by the Free Software
00018 ** Foundation and appearing in the file LICENSE.GPL included in the
00019 ** packaging of this file.
00020 **
00021 ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
00022 ** licenses may use this file in accordance with the Qt Commercial License
00023 ** Agreement provided with the Software.
00024 **
00025 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00026 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00027 **
00028 ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
00029 **   information about Qt Commercial License Agreements.
00030 ** See http://www.trolltech.com/qpl/ for QPL licensing information.
00031 ** See http://www.trolltech.com/gpl/ for GPL licensing information.
00032 **
00033 ** Contact info@trolltech.com if any conditions of this licensing are
00034 ** not clear to you.
00035 **
00036 **********************************************************************/
00037 
00038 #ifndef QFONTCODECS_P_H
00039 #define QFONTCODECS_P_H
00040 
00041 //
00042 //  W A R N I N G
00043 //  -------------
00044 //
00045 // This file is not part of the Qt API.  It exists for the convenience
00046 // of qfontencodings_x11.cpp and qfont_x11.cpp.  This header file may
00047 // change from version to version without notice, or even be removed.
00048 //
00049 // We mean it.
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     void fromUnicode( const QChar *in, unsigned short *out, int length ) const;
00080 
00081     unsigned short characterFromUnicode(const QString &str, int pos) const;
00082 
00083     int heuristicContentMatch(const char *, int) const;
00084     int heuristicNameMatch(const char* hint) const;
00085 
00086 #if !defined(Q_NO_USING_KEYWORD)
00087     using QTextCodec::canEncode;
00088 #endif
00089     bool canEncode( QChar ) const;
00090 };
00091 
00092 
00093 class QFontJis0208Codec : public QTextCodec
00094 {
00095 public:
00096     QFontJis0208Codec();
00097     ~QFontJis0208Codec();
00098 
00099     // Return the official name for the encoding.
00100     const char* name() const ;
00101 
00102     // Return the MIB enum for the encoding if it is listed in the
00103     // IANA character-sets encoding file.
00104     int mibEnum() const ;
00105 
00106     // Converts len characters from chars to Unicode.
00107     QString toUnicode(const char* chars, int len) const ;
00108 
00109     // Converts lenInOut characters (of type QChar) from the start of
00110     // the string uc, returning a QCString result, and also returning
00111     // the length of the result in lenInOut.
00112 #if !defined(Q_NO_USING_KEYWORD)
00113     using QTextCodec::fromUnicode;
00114 #endif
00115     QCString fromUnicode(const QString& uc, int& lenInOut ) const;
00116     void fromUnicode( const QChar *in, unsigned short *out, int length ) const;
00117 
00118     unsigned short characterFromUnicode(const QString &str, int pos) const;
00119 
00120     int heuristicContentMatch(const char *, int) const;
00121     int heuristicNameMatch(const char* hint) const;
00122 
00123 #if !defined(Q_NO_USING_KEYWORD)
00124     using QTextCodec::canEncode;
00125 #endif
00126     bool canEncode( QChar ) const;
00127 
00128 private:
00129     QJpUnicodeConv *convJP;
00130 };
00131 
00132 
00133 
00134 
00135 class QFontKsc5601Codec : public QTextCodec
00136 {
00137 public:
00138     QFontKsc5601Codec();
00139 
00140     // Return the official name for the encoding.
00141     const char* name() const ;
00142 
00143     // Return the MIB enum for the encoding if it is listed in the
00144     // IANA character-sets encoding file.
00145     int mibEnum() const ;
00146 
00147     // Converts len characters from chars to Unicode.
00148     QString toUnicode(const char* chars, int len) const ;
00149 
00150     // Converts lenInOut characters (of type QChar) from the start of
00151     // the string uc, returning a QCString result, and also returning
00152     // the length of the result in lenInOut.
00153 #if !defined(Q_NO_USING_KEYWORD)
00154     using QTextCodec::fromUnicode;
00155 #endif
00156     QCString fromUnicode(const QString& uc, int& lenInOut ) const;
00157     void fromUnicode( const QChar *in, unsigned short *out, int length ) const;
00158 
00159     unsigned short characterFromUnicode(const QString &str, int pos) const;
00160 
00161     int heuristicContentMatch(const char *, int) const;
00162 #if !defined(Q_NO_USING_KEYWORD)
00163     using QTextCodec::canEncode;
00164 #endif
00165     bool canEncode( QChar ) const;
00166 };
00167 
00168 
00169 
00170 
00171 class QFontGb2312Codec : public QTextCodec
00172 {
00173 public:
00174     QFontGb2312Codec();
00175 
00176     // Return the official name for the encoding.
00177     const char* name() const ;
00178 
00179     // Return the MIB enum for the encoding if it is listed in the
00180     // IANA character-sets encoding file.
00181     int mibEnum() const ;
00182 
00183     // Converts len characters from chars to Unicode.
00184     QString toUnicode(const char* chars, int len) const ;
00185 
00186     // Converts lenInOut characters (of type QChar) from the start of
00187     // the string uc, returning a QCString result, and also returning
00188     // the length of the result in lenInOut.
00189 #if !defined(Q_NO_USING_KEYWORD)
00190     using QTextCodec::fromUnicode;
00191 #endif
00192     QCString fromUnicode(const QString& uc, int& lenInOut ) const;
00193     void fromUnicode( const QChar *in, unsigned short *out, int length ) const;
00194 
00195     unsigned short characterFromUnicode(const QString &str, int pos) const;
00196 
00197     int heuristicContentMatch(const char *, int) const;
00198 
00199 #if !defined(Q_NO_USING_KEYWORD)
00200     using QTextCodec::canEncode;
00201 #endif
00202     bool canEncode( QChar ) const;
00203 };
00204 
00205 
00206 
00207 
00208 class QFontGbkCodec : public QTextCodec
00209 {
00210 public:
00211     QFontGbkCodec();
00212 
00213     // Return the official name for the encoding.
00214     const char* name() const ;
00215 
00216     // Return the MIB enum for the encoding if it is listed in the
00217     // IANA character-sets encoding file.
00218     int mibEnum() const ;
00219 
00220     // Converts len characters from chars to Unicode.
00221     QString toUnicode(const char* chars, int len) const ;
00222 
00223     // Converts lenInOut characters (of type QChar) from the start of
00224     // the string uc, returning a QCString result, and also returning
00225     // the length of the result in lenInOut.
00226 #if !defined(Q_NO_USING_KEYWORD)
00227     using QTextCodec::fromUnicode;
00228 #endif
00229     QCString fromUnicode(const QString& uc, int& lenInOut ) const;
00230     void fromUnicode( const QChar *in, unsigned short *out, int length ) const;
00231 
00232     unsigned short characterFromUnicode(const QString &str, int pos) const;
00233 
00234     int heuristicContentMatch(const char *, int) const;
00235     int heuristicNameMatch(const char* hint) const;
00236 
00237 #if !defined(Q_NO_USING_KEYWORD)
00238     using QTextCodec::canEncode;
00239 #endif
00240     bool canEncode( QChar ) const;
00241 };
00242 
00243 
00244 
00245 
00246 class QFontGb18030_0Codec : public QTextCodec
00247 {
00248 public:
00249     QFontGb18030_0Codec();
00250 
00251     // Return the official name for the encoding.
00252     const char* name() const ;
00253 
00254     // Return the MIB enum for the encoding if it is listed in the
00255     // IANA character-sets encoding file.
00256     int mibEnum() const ;
00257 
00258     // Converts len characters from chars to Unicode.
00259     QString toUnicode(const char* chars, int len) const ;
00260 
00261     // Converts lenInOut characters (of type QChar) from the start of
00262     // the string uc, returning a QCString result, and also returning
00263     // the length of the result in lenInOut.
00264 #if !defined(Q_NO_USING_KEYWORD)
00265     using QTextCodec::fromUnicode;
00266 #endif
00267     QCString fromUnicode(const QString& uc, int& lenInOut ) const;
00268     void fromUnicode( const QChar *in, unsigned short *out, int length ) const;
00269 
00270     unsigned short characterFromUnicode(const QString &str, int pos) const;
00271 
00272     int heuristicContentMatch(const char *, int) const;
00273 #if !defined(Q_NO_USING_KEYWORD)
00274     using QTextCodec::canEncode;
00275 #endif
00276     bool canEncode( QChar ) const;
00277 };
00278 
00279 
00280 
00281 
00282 class QFontBig5Codec : public QTextCodec
00283 {
00284 public:
00285     QFontBig5Codec();
00286 
00287     // Return the official name for the encoding.
00288     const char* name() const ;
00289 
00290     // Return the MIB enum for the encoding if it is listed in the
00291     // IANA character-sets encoding file.
00292     int mibEnum() const ;
00293 
00294     // Converts len characters from chars to Unicode.
00295     QString toUnicode(const char* chars, int len) const ;
00296 
00297     // Converts lenInOut characters (of type QChar) from the start of
00298     // the string uc, returning a QCString result, and also returning
00299     // the length of the result in lenInOut.
00300 #if !defined(Q_NO_USING_KEYWORD)
00301     using QTextCodec::fromUnicode;
00302 #endif
00303     QCString fromUnicode(const QString& uc, int& lenInOut ) const;
00304     void fromUnicode( const QChar *in, unsigned short *out, int length ) const;
00305 
00306     unsigned short characterFromUnicode(const QString &str, int pos) const;
00307 
00308     int heuristicContentMatch(const char *, int) const;
00309 #if !defined(Q_NO_USING_KEYWORD)
00310     using QTextCodec::canEncode;
00311 #endif
00312     int heuristicNameMatch(const char* hint) const;
00313     bool canEncode( QChar ) const;
00314 };
00315 
00316 
00317 
00318 class QFontBig5hkscsCodec : public QTextCodec
00319 {
00320 public:
00321     QFontBig5hkscsCodec();
00322 
00323     // Return the official name for the encoding.
00324     const char* name() const ;
00325 
00326     // Return the MIB enum for the encoding if it is listed in the
00327     // IANA character-sets encoding file.
00328     int mibEnum() const ;
00329 
00330     // Converts len characters from chars to Unicode.
00331     QString toUnicode(const char* chars, int len) const ;
00332 
00333     // Converts lenInOut characters (of type QChar) from the start of
00334     // the string uc, returning a QCString result, and also returning
00335     // the length of the result in lenInOut.
00336 #if !defined(Q_NO_USING_KEYWORD)
00337     using QTextCodec::fromUnicode;
00338 #endif
00339     QCString fromUnicode(const QString& uc, int& lenInOut ) const;
00340     void fromUnicode( const QChar *in, unsigned short *out, int length ) const;
00341 
00342     unsigned short characterFromUnicode(const QString &str, int pos) const;
00343 
00344     int heuristicContentMatch(const char *, int) const;
00345     int heuristicNameMatch(const char* hint) const;
00346 #if !defined(Q_NO_USING_KEYWORD)
00347     using QTextCodec::canEncode;
00348 #endif
00349     bool canEncode( QChar ) const;
00350 };
00351 
00352 
00353 class QFontLaoCodec : public QTextCodec
00354 {
00355 public:
00356     QFontLaoCodec();
00357 
00358     const char *name() const;
00359 
00360     int mibEnum() const;
00361 
00362 #if !defined(Q_NO_USING_KEYWORD)
00363     using QTextCodec::fromUnicode;
00364 #endif
00365     QCString fromUnicode(const QString& uc, int& lenInOut ) const;
00366     void fromUnicode( const QChar *in, unsigned short *out, int length ) const;
00367 
00368     unsigned short characterFromUnicode(const QString &str, int pos) const;
00369 
00370     int heuristicContentMatch(const char *, int) const;
00371 
00372 #if !defined(Q_NO_USING_KEYWORD)
00373     using QTextCodec::canEncode;
00374 #endif
00375     bool canEncode( QChar ) const;
00376 };
00377 
00378 #endif // QT_NO_BIG_CODECS
00379 #endif // QT_NO_CODECS
00380 
00381 #endif // QFONTCODECS_P_H
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'