File indexing completed on 2025-01-05 04:26:48

0001 /*
0002  * Replacement fot QT Bindings that were removed from QT5
0003  * Copyright (C) 2020  Pedro de Carvalho Gomes <pedrogomes81@gmail.com>
0004  *
0005  * This program is free software: you can redistribute it and/or modify
0006  * it under the terms of the GNU General Public License as published by
0007  * the Free Software Foundation, either version 3 of the License, or
0008  * (at your option) any later version.
0009  *
0010  * This program is distributed in the hope that it will be useful,
0011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
0012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0013  * GNU General Public License for more details.
0014  *
0015  * You should have received a copy of the GNU General Public License
0016  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
0017  */
0018 
0019 #include "CoreTextStream.h"
0020 
0021 using namespace QtBindings::Core;
0022 
0023 TextStream::TextStream()
0024 {
0025 }
0026 
0027 TextStream::TextStream(const TextStream &textStream) : QObject(), QTextStream(textStream.device())
0028 {
0029 }
0030 
0031 TextStream::TextStream(QIODevice *device) : QTextStream(device)
0032 {
0033 }
0034 
0035 TextStream::TextStream(FILE *fileHandle, QIODevice::OpenMode openMode) : QTextStream(fileHandle, openMode)
0036 {
0037 }
0038 
0039 TextStream::TextStream(QString *string, QIODevice::OpenMode openMode) : QTextStream(string, openMode)
0040 {
0041 }
0042 
0043 TextStream::TextStream(QByteArray *array, QIODevice::OpenMode openMode) : QTextStream(array, openMode)
0044 {
0045 }
0046 
0047 TextStream::TextStream(const QByteArray &array, QIODevice::OpenMode openMode) : QTextStream(array, openMode)
0048 {
0049 }
0050 
0051 bool TextStream::atEnd() const
0052 {
0053     return QTextStream::atEnd();
0054 }
0055 
0056 bool TextStream::autoDetectUnicode() const
0057 {
0058     return QTextStream::autoDetectUnicode();
0059 }
0060 
0061 QTextCodec *TextStream::codec() const
0062 {
0063     return QTextStream::codec();
0064 }
0065 
0066 QIODevice *TextStream::device() const
0067 {
0068     return QTextStream::device();
0069 }
0070 
0071 QTextStream::FieldAlignment TextStream::fieldAlignment() const
0072 {
0073     return QTextStream::fieldAlignment();
0074 }
0075 
0076 int TextStream::fieldWidth() const
0077 {
0078     return QTextStream::fieldWidth();
0079 }
0080 
0081 void TextStream::flush()
0082 {
0083     QTextStream::flush();
0084 }
0085 
0086 bool TextStream::generateByteOrderMark() const
0087 {
0088     return QTextStream::generateByteOrderMark();
0089 }
0090 
0091 int TextStream::integerBase() const
0092 {
0093     return QTextStream::integerBase();
0094 }
0095 
0096 QLocale TextStream::locale() const
0097 {
0098     return QTextStream::locale();
0099 }
0100 
0101 QTextStream::NumberFlags TextStream::numberFlags() const
0102 {
0103     return QTextStream::numberFlags();
0104 }
0105 
0106 QChar TextStream::padChar() const
0107 {
0108     return QTextStream::padChar();
0109 }
0110 
0111 qint64 TextStream::pos() const
0112 {
0113     return QTextStream::pos();
0114 }
0115 
0116 QString TextStream::readAll()
0117 {
0118     return QTextStream::readAll();
0119 }
0120 
0121 bool TextStream::readLineInto(QString *line, qint64 maxlen)
0122 {
0123     return QTextStream::readLineInto(line, maxlen);
0124 }
0125 
0126 QString TextStream::readLine(qint64 maxlen)
0127 {
0128     return QTextStream::readLine(maxlen);
0129 }
0130 
0131 QString TextStream::read(qint64 maxlen)
0132 {
0133     return QTextStream::read(maxlen);
0134 }
0135 
0136 QTextStream::RealNumberNotation TextStream::realNumberNotation() const
0137 {
0138     return QTextStream::realNumberNotation();
0139 }
0140 
0141 int TextStream::realNumberPrecision() const
0142 {
0143     return QTextStream::realNumberPrecision();
0144 }
0145 
0146 void TextStream::reset()
0147 {
0148     QTextStream::reset();
0149 }
0150 
0151 void TextStream::resetStatus()
0152 {
0153     QTextStream::resetStatus();
0154 }
0155 
0156 bool TextStream::seek(qint64 pos)
0157 {
0158     return QTextStream::seek(pos);
0159 }
0160 
0161 void TextStream::setAutoDetectUnicode(bool enabled)
0162 {
0163     QTextStream::setAutoDetectUnicode(enabled);
0164 }
0165 
0166 void TextStream::setCodec(const char *codecName)
0167 {
0168     QTextStream::setCodec(codecName);
0169 }
0170 
0171 void TextStream::setCodec(QTextCodec *codec)
0172 {
0173     QTextStream::setCodec(codec);
0174 }
0175 
0176 void TextStream::setDevice(QIODevice *device)
0177 {
0178     QTextStream::setDevice(device);
0179 }
0180 
0181 void TextStream::setFieldAlignment(QTextStream::FieldAlignment alignment)
0182 {
0183     QTextStream::setFieldAlignment(alignment);
0184 }
0185 
0186 void TextStream::setFieldWidth(int width)
0187 {
0188     QTextStream::setFieldWidth(width);
0189 }
0190 
0191 void TextStream::setGenerateByteOrderMark(bool generate)
0192 {
0193     QTextStream::setGenerateByteOrderMark(generate);
0194 }
0195 
0196 void TextStream::setIntegerBase(int base)
0197 {
0198     QTextStream::setIntegerBase(base);
0199 }
0200 
0201 void TextStream::setLocale(const QLocale &locale)
0202 {
0203     QTextStream::setLocale(locale);
0204 }
0205 
0206 void TextStream::setNumberFlags(QTextStream::NumberFlags flags)
0207 {
0208     QTextStream::setNumberFlags(flags);
0209 }
0210 
0211 void TextStream::setPadChar(QChar ch)
0212 {
0213     QTextStream::setPadChar(ch);
0214 }
0215 
0216 void TextStream::setRealNumberNotation(QTextStream::RealNumberNotation notation)
0217 {
0218     QTextStream::setRealNumberNotation(notation);
0219 }
0220 
0221 void TextStream::setRealNumberPrecision(int precision)
0222 {
0223     QTextStream::setRealNumberPrecision(precision);
0224 }
0225 
0226 void TextStream::setStatus(QTextStream::Status status)
0227 {
0228     QTextStream::setStatus(status);
0229 }
0230 
0231 void TextStream::setString(QString *string, QIODevice::OpenMode openMode)
0232 {
0233     QTextStream::setString(string, openMode);
0234 }
0235 
0236 void TextStream::skipWhiteSpace()
0237 {
0238     QTextStream::skipWhiteSpace();
0239 }
0240 
0241 QTextStream::Status TextStream::status() const
0242 {
0243     return QTextStream::status();
0244 }
0245 
0246 QString *TextStream::string() const
0247 {
0248     return QTextStream::string();
0249 }
0250 
0251 TextStream &TextStream::operator=(const TextStream &other)
0252 {
0253     if (this != &other) {
0254         this->setAutoDetectUnicode( other.autoDetectUnicode() );
0255         this->setCodec( other.codec() );
0256         this->setDevice( other.device() );
0257         this->setFieldAlignment( other.fieldAlignment() );
0258         this->setFieldWidth( other.fieldWidth() );
0259         this->setGenerateByteOrderMark( other.generateByteOrderMark() );
0260         this->setIntegerBase( other.integerBase() );
0261         this->setLocale( other.locale() );
0262         this->setNumberFlags( other.numberFlags() );
0263         this->setPadChar( other.padChar() );
0264         this->setRealNumberNotation( other.realNumberNotation() );
0265         this->setRealNumberPrecision( other.realNumberPrecision() );
0266         this->setStatus( other.status() );
0267         this->setString( other.string() );
0268     }
0269     return *this;
0270 }