Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

qfontcodecs_p.h

Go to the documentation of this file.
00001 /****************************************************************************
00002 ** $Id: qfontcodecs_p.h,v 1.2 2003/07/10 02:40:11 llornkcor Exp $
00003 **
00004 ** Font utilities for X11
00005 **
00006 ** Created : 20001101
00007 **
00008 ** Copyright (C) 1992-2002 Trolltech AS.  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 AS 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 
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     // Return the official name for the encoding.
00097     const char* name() const ;
00098 
00099     // Return the MIB enum for the encoding if it is listed in the
00100     // IANA character-sets encoding file.
00101     int mibEnum() const ;
00102 
00103     // Converts len characters from chars to Unicode.
00104     QString toUnicode(const char* chars, int len) const ;
00105 
00106     // Converts lenInOut characters (of type QChar) from the start of
00107     // the string uc, returning a QCString result, and also returning
00108     // the length of the result in lenInOut.
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     // Return the official name for the encoding.
00135     const char* name() const ;
00136 
00137     // Return the MIB enum for the encoding if it is listed in the
00138     // IANA character-sets encoding file.
00139     int mibEnum() const ;
00140 
00141     // Converts len characters from chars to Unicode.
00142     QString toUnicode(const char* chars, int len) const ;
00143 
00144     // Converts lenInOut characters (of type QChar) from the start of
00145     // the string uc, returning a QCString result, and also returning
00146     // the length of the result in lenInOut.
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     // Return the official name for the encoding.
00168     const char* name() const ;
00169 
00170     // Return the MIB enum for the encoding if it is listed in the
00171     // IANA character-sets encoding file.
00172     int mibEnum() const ;
00173 
00174     // Converts len characters from chars to Unicode.
00175     QString toUnicode(const char* chars, int len) const ;
00176 
00177     // Converts lenInOut characters (of type QChar) from the start of
00178     // the string uc, returning a QCString result, and also returning
00179     // the length of the result in lenInOut.
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     // Return the official name for the encoding.
00195     const char* name() const ;
00196 
00197     // Return the MIB enum for the encoding if it is listed in the
00198     // IANA character-sets encoding file.
00199     int mibEnum() const ;
00200 
00201     // Converts len characters from chars to Unicode.
00202     QString toUnicode(const char* chars, int len) const ;
00203 
00204     // Converts lenInOut characters (of type QChar) from the start of
00205     // the string uc, returning a QCString result, and also returning
00206     // the length of the result in lenInOut.
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     // Return the official name for the encoding.
00223     const char* name() const ;
00224 
00225     // Return the MIB enum for the encoding if it is listed in the
00226     // IANA character-sets encoding file.
00227     int mibEnum() const ;
00228 
00229     // Converts len characters from chars to Unicode.
00230     QString toUnicode(const char* chars, int len) const ;
00231 
00232     // Converts lenInOut characters (of type QChar) from the start of
00233     // the string uc, returning a QCString result, and also returning
00234     // the length of the result in lenInOut.
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     // Return the official name for the encoding.
00256     const char* name() const ;
00257 
00258     // Return the MIB enum for the encoding if it is listed in the
00259     // IANA character-sets encoding file.
00260     int mibEnum() const ;
00261 
00262     // Converts len characters from chars to Unicode.
00263     QString toUnicode(const char* chars, int len) const ;
00264 
00265     // Converts lenInOut characters (of type QChar) from the start of
00266     // the string uc, returning a QCString result, and also returning
00267     // the length of the result in lenInOut.
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     // Return the official name for the encoding.
00289     const char* name() const ;
00290 
00291     // Return the MIB enum for the encoding if it is listed in the
00292     // IANA character-sets encoding file.
00293     int mibEnum() const ;
00294 
00295     // Converts len characters from chars to Unicode.
00296     QString toUnicode(const char* chars, int len) const ;
00297 
00298     // Converts lenInOut characters (of type QChar) from the start of
00299     // the string uc, returning a QCString result, and also returning
00300     // the length of the result in lenInOut.
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 // the shaping codec for iso8859-6.8x fonts (see www.langbox.com)
00316 
00317 class QFontArabic68Codec : public QTextCodec
00318 {
00319 public:
00320     QFontArabic68Codec();
00321 
00322     // Return the official name for the encoding.
00323     const char* name() const ;
00324 
00325     // Return the MIB enum for the encoding if it is listed in the
00326     // IANA character-sets encoding file.
00327     int mibEnum() const ;
00328 
00329     // Converts len characters from chars to Unicode.
00330     QString toUnicode(const char* chars, int len) const ;
00331 
00332     // Converts lenInOut characters (of type QChar) from the start of
00333     // the string uc, returning a QCString result, and also returning
00334     // the length of the result in lenInOut.
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

Generated on Sat Nov 5 16:18:23 2005 for OPIE by  doxygen 1.4.2