Public Member Functions | List of all members
QTextOStream Class Reference

A convenience class for output streams. More...

#include <qtextstream.h>

Inheritance diagram for QTextOStream:
QTextStream

Public Member Functions

 QTextOStream (QString *s)
 
 QTextOStream (QByteArray ba)
 
 QTextOStream (FILE *f)
 
- Public Member Functions inherited from QTextStream
void setEncoding (Encoding)
 
void setCodec (QTextCodec *)
 
 QTextStream ()
 
 QTextStream (QIODevice *)
 
 QTextStream (QString *, int mode)
 
 QTextStream (QString &, int mode)
 
 QTextStream (QByteArray, int mode)
 
 QTextStream (FILE *, int mode)
 
virtual ~QTextStream ()
 
QIODevicedevice () const
 
void setDevice (QIODevice *)
 
void unsetDevice ()
 
bool atEnd () const
 
bool eof () const
 
QTextStreamoperator>> (QChar &)
 
QTextStreamoperator>> (char &)
 
QTextStreamoperator>> (signed short &)
 
QTextStreamoperator>> (unsigned short &)
 
QTextStreamoperator>> (signed int &)
 
QTextStreamoperator>> (unsigned int &)
 
QTextStreamoperator>> (signed long &)
 
QTextStreamoperator>> (unsigned long &)
 
QTextStreamoperator>> (float &)
 
QTextStreamoperator>> (double &)
 
QTextStreamoperator>> (char *)
 
QTextStreamoperator>> (QString &)
 
QTextStreamoperator>> (QCString &)
 
QTextStreamoperator<< (QChar)
 
QTextStreamoperator<< (char)
 
QTextStreamoperator<< (signed short)
 
QTextStreamoperator<< (unsigned short)
 
QTextStreamoperator<< (signed int)
 
QTextStreamoperator<< (unsigned int)
 
QTextStreamoperator<< (signed long)
 
QTextStreamoperator<< (unsigned long)
 
QTextStreamoperator<< (float)
 
QTextStreamoperator<< (double)
 
QTextStreamoperator<< (const char *)
 
QTextStreamoperator<< (const QString &)
 
QTextStreamoperator<< (const QCString &)
 
QTextStreamoperator<< (void *)
 
QTextStreamreadRawBytes (char *, uint len)
 
QTextStreamwriteRawBytes (const char *, uint len)
 
QString readLine ()
 
QString read ()
 
void skipWhiteSpace ()
 
int flags () const
 
int flags (int f)
 
int setf (int bits)
 
int setf (int bits, int mask)
 
int unsetf (int bits)
 
void reset ()
 
int width () const
 
int width (int)
 
int fill () const
 
int fill (int)
 
int precision () const
 
int precision (int)
 

Additional Inherited Members

- Public Types inherited from QTextStream
enum  Encoding {
  Locale, Latin1, Unicode, UnicodeNetworkOrder,
  UnicodeReverse, RawUnicode, UnicodeUTF8
}
 
enum  {
  skipws = 0x0001, left = 0x0002, right = 0x0004, internal = 0x0008,
  bin = 0x0010, oct = 0x0020, dec = 0x0040, hex = 0x0080,
  showbase = 0x0100, showpoint = 0x0200, uppercase = 0x0400, showpos = 0x0800,
  scientific = 0x1000, fixed = 0x2000
}
 
- Static Public Attributes inherited from QTextStream
static const int basefield = I_BASE_MASK
 
static const int adjustfield
 
static const int floatfield
 

Detailed Description

A convenience class for output streams.

For simple tasks, code should be simple. Hence this class is a shorthand to avoid passing the mode argument to the normal QTextStream constructors.

This makes it easy for example, to write things like this:

QTextOStream(&result) << "pi = " << 3.14;

Definition at line 209 of file qtextstream.h.

Constructor & Destructor Documentation

QTextOStream::QTextOStream ( QString s)
inline

Constructs a stream to write to string s.

Definition at line 211 of file qtextstream.h.

211  :
#define IO_WriteOnly
Definition: qiodevice.h:62
QTextOStream::QTextOStream ( QByteArray  ba)
inline

Constructs a stream to write to the array ba.

Definition at line 213 of file qtextstream.h.

213  :
214  QTextStream(ba,IO_WriteOnly) { }
#define IO_WriteOnly
Definition: qiodevice.h:62
QTextOStream::QTextOStream ( FILE *  f)
inline

Constructs a stream to write to the file f.

Definition at line 215 of file qtextstream.h.

215  :
#define IO_WriteOnly
Definition: qiodevice.h:62

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