QTextStream Class Reference

QTextStream Class Reference

#include <qtextstream.h>

Class Description

+ Examples:

Definition at line 73 of file qtextstream.h.

Public Types

enum  RealNumberNotation { SmartNotation, FixedNotation, ScientificNotation }
 
enum  FieldAlignment { AlignLeft, AlignRight, AlignCenter, AlignAccountingStyle }
 
enum  Status { Ok, ReadPastEnd, ReadCorruptData, WriteFailed }
 
enum  NumberFlag {
  ShowBase = 0x1, ForcePoint = 0x2, ForceSign = 0x4, UppercaseBase = 0x8,
  UppercaseDigits = 0x10
}
 

Public Member Functions

 QTextStream ()
 
 QTextStream (QIODevice *device)
 
 QTextStream (FILE *fileHandle, QIODevice::OpenMode openMode=QIODevice::ReadWrite)
 
 QTextStream (QString *string, QIODevice::OpenMode openMode=QIODevice::ReadWrite)
 
 QTextStream (QByteArray *array, QIODevice::OpenMode openMode=QIODevice::ReadWrite)
 
 QTextStream (const QByteArray &array, QIODevice::OpenMode openMode=QIODevice::ReadOnly)
 
virtual ~QTextStream ()
 
void setCodec (QTextCodec *codec)
 
void setCodec (const char *codecName)
 
QTextCodeccodec () const
 
void setAutoDetectUnicode (bool enabled)
 
bool autoDetectUnicode () const
 
void setGenerateByteOrderMark (bool generate)
 
bool generateByteOrderMark () const
 
void setLocale (const QLocale &locale)
 
QLocale locale () const
 
void setDevice (QIODevice *device)
 
QIODevicedevice () const
 
void setString (QString *string, QIODevice::OpenMode openMode=QIODevice::ReadWrite)
 
QStringstring () const
 
Status status () const
 
void setStatus (Status status)
 
void resetStatus ()
 
bool atEnd () const
 
void reset ()
 
void flush ()
 
bool seek (qint64 pos)
 
qint64 pos () const
 
void skipWhiteSpace ()
 
QString readLine (qint64 maxlen=0)
 
QString readAll ()
 
QString read (qint64 maxlen)
 
void setFieldAlignment (FieldAlignment alignment)
 
FieldAlignment fieldAlignment () const
 
void setPadChar (QChar ch)
 
QChar padChar () const
 
void setFieldWidth (int width)
 
int fieldWidth () const
 
void setNumberFlags (NumberFlags flags)
 
NumberFlags numberFlags () const
 
void setIntegerBase (int base)
 
int integerBase () const
 
void setRealNumberNotation (RealNumberNotation notation)
 
RealNumberNotation realNumberNotation () const
 
void setRealNumberPrecision (int precision)
 
int realNumberPrecision () const
 
QTextStreamoperator>> (QChar &ch)
 
QTextStreamoperator>> (char &ch)
 
QTextStreamoperator>> (signed short &i)
 
QTextStreamoperator>> (unsigned short &i)
 
QTextStreamoperator>> (signed int &i)
 
QTextStreamoperator>> (unsigned int &i)
 
QTextStreamoperator>> (signed long &i)
 
QTextStreamoperator>> (unsigned long &i)
 
QTextStreamoperator>> (qlonglong &i)
 
QTextStreamoperator>> (qulonglong &i)
 
QTextStreamoperator>> (float &f)
 
QTextStreamoperator>> (double &f)
 
QTextStreamoperator>> (QString &s)
 
QTextStreamoperator>> (QByteArray &array)
 
QTextStreamoperator>> (char *c)
 
QTextStreamoperator<< (QBool b)
 
QTextStreamoperator<< (QChar ch)
 
QTextStreamoperator<< (char ch)
 
QTextStreamoperator<< (signed short i)
 
QTextStreamoperator<< (unsigned short i)
 
QTextStreamoperator<< (signed int i)
 
QTextStreamoperator<< (unsigned int i)
 
QTextStreamoperator<< (signed long i)
 
QTextStreamoperator<< (unsigned long i)
 
QTextStreamoperator<< (qlonglong i)
 
QTextStreamoperator<< (qulonglong i)
 
QTextStreamoperator<< (float f)
 
QTextStreamoperator<< (double f)
 
QTextStreamoperator<< (const QString &s)
 
QTextStreamoperator<< (const QByteArray &array)
 
QTextStreamoperator<< (const char *c)
 
QTextStreamoperator<< (const void *ptr)
 

Member Enumeration Documentation

Enumerator
SmartNotation 
FixedNotation 
ScientificNotation 

Definition at line 78 of file qtextstream.h.

Enumerator
AlignLeft 
AlignRight 
AlignCenter 
AlignAccountingStyle 

Definition at line 83 of file qtextstream.h.

enum Status
Enumerator
Ok 
ReadPastEnd 
ReadCorruptData 
WriteFailed 

Definition at line 89 of file qtextstream.h.

enum NumberFlag
Enumerator
ShowBase 
ForcePoint 
ForceSign 
UppercaseBase 
UppercaseDigits 

Definition at line 95 of file qtextstream.h.

Constructor & Destructor Documentation

QTextStream ( QIODevice device)
explicit
QTextStream ( FILE *  fileHandle,
QIODevice::OpenMode  openMode = QIODevice::ReadWrite 
)
explicit
QTextStream ( QString string,
QIODevice::OpenMode  openMode = QIODevice::ReadWrite 
)
explicit
QTextStream ( QByteArray array,
QIODevice::OpenMode  openMode = QIODevice::ReadWrite 
)
explicit
QTextStream ( const QByteArray array,
QIODevice::OpenMode  openMode = QIODevice::ReadOnly 
)
explicit
virtual ~QTextStream ( )
virtual

Member Function Documentation

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 setLocale ( const QLocale locale)
QLocale locale ( ) const
void setDevice ( QIODevice device)
QIODevice* device ( ) const
void setString ( QString string,
QIODevice::OpenMode  openMode = QIODevice::ReadWrite 
)
QString* string ( ) const
Status status ( ) const
void setStatus ( Status  status)
void resetStatus ( )
bool atEnd ( ) const
void reset ( )
void flush ( )
bool seek ( qint64  pos)
qint64 pos ( ) const
void skipWhiteSpace ( )
QString readLine ( qint64  maxlen = 0)
QString readAll ( )
QString read ( qint64  maxlen)
void setFieldAlignment ( FieldAlignment  alignment)
FieldAlignment fieldAlignment ( ) const
void setPadChar ( QChar  ch)
QChar padChar ( ) const
void setFieldWidth ( int  width)
int fieldWidth ( ) const
void setNumberFlags ( NumberFlags  flags)
NumberFlags numberFlags ( ) const
void setIntegerBase ( int  base)
int integerBase ( ) const
void setRealNumberNotation ( RealNumberNotation  notation)
RealNumberNotation realNumberNotation ( ) const
void setRealNumberPrecision ( int  precision)
int realNumberPrecision ( ) const
QTextStream& operator>> ( QChar ch)
QTextStream& operator>> ( char &  ch)
QTextStream& operator>> ( signed short &  i)
QTextStream& operator>> ( unsigned short &  i)
QTextStream& operator>> ( signed int i)
QTextStream& operator>> ( unsigned int i)
QTextStream& operator>> ( signed long &  i)
QTextStream& operator>> ( unsigned long &  i)
QTextStream& operator>> ( qlonglong i)
QTextStream& operator>> ( qulonglong i)
QTextStream& operator>> ( float &  f)
QTextStream& operator>> ( double &  f)
QTextStream& operator>> ( QString s)
QTextStream& operator>> ( QByteArray array)
QTextStream& operator>> ( char *  c)
QTextStream& operator<< ( QBool  b)
QTextStream& operator<< ( QChar  ch)
QTextStream& operator<< ( char  ch)
QTextStream& operator<< ( signed short  i)
QTextStream& operator<< ( unsigned short  i)
QTextStream& operator<< ( signed int  i)
QTextStream& operator<< ( unsigned int  i)
QTextStream& operator<< ( signed long  i)
QTextStream& operator<< ( unsigned long  i)
QTextStream& operator<< ( qlonglong  i)
QTextStream& operator<< ( qulonglong  i)
QTextStream& operator<< ( float  f)
QTextStream& operator<< ( double  f)
QTextStream& operator<< ( const QString s)
QTextStream& operator<< ( const QByteArray array)
QTextStream& operator<< ( const char *  c)
QTextStream& operator<< ( const void ptr)

The documentation for this class was generated from the following file: