Eneboo - Documentación para desarrolladores
src/qt/include/qeucjpcodec.h
Ir a la documentación de este archivo.
00001 /****************************************************************************
00002 ** $Id: qt/qeucjpcodec.h   3.3.8   edited Jan 11 14:37 $
00003 **
00004 ** Definition of QEucJpCodec class
00005 **
00006 ** Created : 990225
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 // Most of the code here was originally written by Serika Kurusugawa
00039 // a.k.a. Junji Takagi, and is included in Qt with the author's permission,
00040 // and the grateful thanks of the Trolltech team.
00041 
00042 /*
00043  * Copyright (C) 1999 Serika Kurusugawa, All rights reserved.
00044  *
00045  * Redistribution and use in source and binary forms, with or without
00046  * modification, are permitted provided that the following conditions
00047  * are met:
00048  * 1. Redistributions of source code must retain the above copyright
00049  *    notice, this list of conditions and the following disclaimer.
00050  * 2. Redistributions in binary form must reproduce the above copyright
00051  *    notice, this list of conditions and the following disclaimer in the
00052  *    documentation and/or other materials provided with the distribution.
00053  *
00054  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
00055  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00056  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00057  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
00058  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00059  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
00060  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
00061  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00062  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00063  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
00064  * SUCH DAMAGE.
00065  */
00066 
00067 #ifndef QEUCJPCODEC_H
00068 #define QEUCJPCODEC_H
00069 
00070 #ifndef QT_H
00071 #include "qtextcodec.h"
00072 #include "qjpunicode.h"
00073 #endif // QT_H
00074 
00075 #ifndef QT_NO_BIG_CODECS
00076 
00077 #if defined(QT_PLUGIN)
00078 #define Q_EXPORT_CODECS_JP
00079 #else
00080 #define Q_EXPORT_CODECS_JP Q_EXPORT
00081 #endif
00082 
00083 class Q_EXPORT_CODECS_JP QEucJpCodec : public QTextCodec {
00084 public:
00085     virtual int mibEnum() const;
00086     const char* name() const;
00087     const char* mimeName() const;
00088 
00089     QTextDecoder* makeDecoder() const;
00090 
00091 #if !defined(Q_NO_USING_KEYWORD)
00092     using QTextCodec::fromUnicode;
00093 #endif
00094     QCString fromUnicode(const QString& uc, int& lenInOut) const;
00095     QString toUnicode(const char* chars, int len) const;
00096 
00097     int heuristicContentMatch(const char* chars, int len) const;
00098     int heuristicNameMatch(const char* hint) const;
00099 
00100     QEucJpCodec();
00101     ~QEucJpCodec();
00102 
00103 protected:
00104     const QJpUnicodeConv *conv;
00105 };
00106 
00107 #endif
00108 #endif
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'