QGIS API Documentation  3.17.0-Master (a035f434f4)
qgsogrproxytextcodec.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsogrproxytextcodec.h
3  -------------
4  begin : June 2020
5  copyright : (C) 2020 Nyall Dawson
6  email : nyall dot dawson at gmail dot com
7  ***************************************************************************
8  * *
9  * This program is free software; you can redistribute it and/or modify *
10  * it under the terms of the GNU General Public License as published by *
11  * the Free Software Foundation; either version 2 of the License, or *
12  * (at your option) any later version. *
13  * *
14  ***************************************************************************/
15 
16 #ifndef QGSOGRPROXYTEXTCODEC_H
17 #define QGSOGRPROXYTEXTCODEC_H
18 
19 #define SIP_NO_FILE
20 
21 #include "qgis_core.h"
22 
23 #include <QTextCodec>
24 
32 class CORE_EXPORT QgsOgrProxyTextCodec: public QTextCodec
33 {
34  public:
35 
39  QgsOgrProxyTextCodec( const QByteArray &name );
40  ~QgsOgrProxyTextCodec() override = default;
41 
42  QString convertToUnicode( const char *in, int length, ConverterState *state ) const override;
43  QByteArray convertFromUnicode( const QChar *in, int length, ConverterState *state ) const override;
44  QByteArray name() const override;
45  QList<QByteArray> aliases() const override;
46  int mibEnum() const override;
47 
51  static QStringList supportedCodecs();
52 
53  private:
54 
55  QByteArray mName;
56 };
57 
58 #endif // QGSOGRPROXYTEXTCODEC_H
A QTextCodec implementation which relies on OGR to do the text conversion.