// qtextstream.sip generated by MetaSIP on Fri Sep 28 17:07:47 2007 // // This file is part of the QtCore Python extension module. // // Copyright (c) 2007 // Phil Thompson // // This file is part of PyQt. // // This copy of PyQt is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License version 2 as published by // the Free Software Foundation and appearing in the file LICENSE included in the // packaging of this file. // // PyQt is supplied in the hope that it will be useful, but WITHOUT ANY // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS // FOR A PARTICULAR PURPOSE. See the GNU General Public License for more // details. // // You should have received a copy of the GNU General Public License along with // PyQt; see the file LICENSE. If not, write to the Free Software Foundation, // Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. %ModuleCode #include %End class QTextStream { %TypeHeaderCode #include %End public: enum RealNumberNotation { SmartNotation, FixedNotation, ScientificNotation, }; enum FieldAlignment { AlignLeft, AlignRight, AlignCenter, AlignAccountingStyle, }; enum NumberFlag { ShowBase, ForcePoint, ForceSign, UppercaseBase, UppercaseDigits, }; enum Status { Ok, ReadPastEnd, ReadCorruptData, }; typedef QFlags NumberFlags; QTextStream(); explicit QTextStream(QIODevice *device); QTextStream(QString *string, QFlags openMode = QIODevice::ReadWrite); QTextStream(QByteArray *array, QFlags openMode = QIODevice::ReadWrite); virtual ~QTextStream(); void setCodec(QTextCodec *codec); void setCodec(const char *codecName); QTextCodec *codec() const; void setAutoDetectUnicode(bool enabled); bool autoDetectUnicode() const; void setGenerateByteOrderMark(bool generate); bool generateByteOrderMark() const; void setDevice(QIODevice *device); QIODevice *device() const; void setString(QString *string, QFlags openMode = QIODevice::ReadWrite); QString *string() const; bool atEnd() const; void reset(); void flush() /ReleaseGIL/; bool seek(qint64 pos); void skipWhiteSpace(); QString read(qint64 maxlen) /ReleaseGIL/; QString readLine(qint64 maxlen = 0) /ReleaseGIL/; QString readAll() /ReleaseGIL/; void setFieldAlignment(QTextStream::FieldAlignment alignment); QTextStream::FieldAlignment fieldAlignment() const; void setPadChar(QChar ch); QChar padChar() const; void setFieldWidth(int width); int fieldWidth() const; void setNumberFlags(QFlags flags); QFlags numberFlags() const; void setIntegerBase(int base); int integerBase() const; void setRealNumberNotation(QTextStream::RealNumberNotation notation); QTextStream::RealNumberNotation realNumberNotation() const; void setRealNumberPrecision(int precision); int realNumberPrecision() const; QTextStream::Status status() const; void setStatus(QTextStream::Status status); void resetStatus(); %If (Qt_4_2_0 -) qint64 pos() const; %End QTextStream &operator>>(QChar &ch); QTextStream &operator>>(QString &s); QTextStream &operator>>(QByteArray &array); QTextStream &operator<<(QChar ch); QTextStream &operator<<(double f /Constrained/); QTextStream &operator<<(bool b /Constrained/); QTextStream &operator<<(int i /Constrained/); QTextStream &operator<<(qlonglong i); QTextStream &operator<<(qulonglong i); QTextStream &operator<<(const QString &s); QTextStream &operator<<(const QByteArray &array); private: QTextStream(const QTextStream &); }; QFlags operator|(QTextStream::NumberFlag f1, QFlags f2); QFlags operator|(QTextStream::NumberFlag f1, QTextStream::NumberFlag f2); class QTextStreamManipulator; QTextStream &operator<<(QTextStream &s, QTextStreamManipulator m); QTextStream &bin(QTextStream &s); QTextStream &oct(QTextStream &s); QTextStream &dec(QTextStream &s); QTextStream &hex(QTextStream &s); QTextStream &showbase(QTextStream &s); QTextStream &forcesign(QTextStream &s); QTextStream &forcepoint(QTextStream &s); QTextStream &noshowbase(QTextStream &s); QTextStream &noforcesign(QTextStream &s); QTextStream &noforcepoint(QTextStream &s); QTextStream &uppercasebase(QTextStream &s); QTextStream &uppercasedigits(QTextStream &s); QTextStream &lowercasebase(QTextStream &s); QTextStream &lowercasedigits(QTextStream &s); QTextStream &fixed(QTextStream &s); QTextStream &scientific(QTextStream &s); QTextStream &left(QTextStream &s); QTextStream &right(QTextStream &s); QTextStream ¢er(QTextStream &s); QTextStream &endl(QTextStream &s); QTextStream &flush(QTextStream &s); QTextStream &reset(QTextStream &s); QTextStream &bom(QTextStream &s); QTextStream &ws(QTextStream &s); QTextStreamManipulator qSetFieldWidth(int width); QTextStreamManipulator qSetPadChar(QChar ch); QTextStreamManipulator qSetRealNumberPrecision(int precision);