KDStream Class Reference

Streaming operators for Qt classes. More...

#include <KDStream.h>

List of all members.

Public Member Functions

 KDStream (QString *outputString=0)
 ~KDStream ()
void flush ()
KDStreamoperator<< (bool)
KDStreamoperator<< (char)
KDStreamoperator<< (float)
KDStreamoperator<< (double)
KDStreamoperator<< (short)
KDStreamoperator<< (unsigned short)
KDStreamoperator<< (int)
KDStreamoperator<< (unsigned int)
KDStreamoperator<< (long)
KDStreamoperator<< (unsigned long)
KDStreamoperator<< (const char *)
KDStreamoperator<< (const void *)
KDStreamoperator<< (const QString &)
KDStreamoperator<< (const QCString &)
KDStreamoperator<< (const QChar &)
KDStreamoperator<< (const QColor &)
KDStreamoperator<< (const QColorGroup &)
KDStreamoperator<< (const QPalette &)
KDStreamoperator<< (const QCursor &)
KDStreamoperator<< (const QDate &)
KDStreamoperator<< (const QDateTime &)
KDStreamoperator<< (const QTime &)
KDStreamoperator<< (const QFont &)
KDStreamoperator<< (const QPen &)
KDStreamoperator<< (const QPoint &)
KDStreamoperator<< (const QSize &)
KDStreamoperator<< (const QRect &)
KDStreamoperator<< (const QBrush &)
KDStreamoperator<< (const QSizePolicy &)
KDStreamoperator<< (const QKeySequence &)
KDStreamoperator<< (const QPixmap &)
KDStreamoperator<< (const QImage &)
KDStreamoperator<< (KDSTREAMFUNC)
KDStreamoperator<< (const QVariant &)
KDStreamoperator<< (const QObject &)
KDStreamoperator<< (const QStrList &list)

Protected Member Functions

QString QColor2Str (const QColor &col)


Detailed Description

Streaming operators for Qt classes.

When debugging Qt programs the streaming operators in this class offers facilities for printing out values of a number of Qt classes.

Example:

   QPoint point(10,20);
   QString string("A test");
   QFont font = qApp->font();
   KDStream() << "the point is " << point << ", the string is " << string << ", the font is " << font << endl;

Definition at line 86 of file KDStream.h.


Constructor & Destructor Documentation

KDStream::KDStream ( QString *  outputString = 0  ) 

Creates a KDStream object.

Definition at line 79 of file KDStream.cpp.

KDStream::~KDStream (  ) 

Flushes the data to the stream and destroys the KDStream object.

Definition at line 91 of file KDStream.cpp.

References flush().

Here is the call graph for this function:


Member Function Documentation

void KDStream::flush (  ) 

Flushes buffered data to the stream.

Definition at line 100 of file KDStream.cpp.

Referenced by endl(), flush(), operator<<(), and ~KDStream().

KDStream & KDStream::operator<< ( bool  b  ) 

Writes a boolean value to the stream. The value will be represented as either "true" or "false".

Definition at line 117 of file KDStream.cpp.

KDStream & KDStream::operator<< ( char  ch  ) 

Writes a character value to the stream.

Definition at line 126 of file KDStream.cpp.

KDStream & KDStream::operator<< ( float  num  ) 

Writes a floating point value to the stream.

Definition at line 136 of file KDStream.cpp.

KDStream & KDStream::operator<< ( double  num  ) 

Writes a double-precision floating point value to the stream.

Definition at line 146 of file KDStream.cpp.

KDStream & KDStream::operator<< ( short  num  ) 

Writes a short value to the stream.

Definition at line 156 of file KDStream.cpp.

KDStream & KDStream::operator<< ( unsigned short  num  ) 

Writes an unsigned short value to the stream.

Definition at line 165 of file KDStream.cpp.

KDStream & KDStream::operator<< ( int  num  ) 

Writes an int value to the stream.

Definition at line 174 of file KDStream.cpp.

KDStream & KDStream::operator<< ( unsigned int  num  ) 

Writes an unsigned int value to the stream.

Definition at line 183 of file KDStream.cpp.

KDStream & KDStream::operator<< ( long  num  ) 

Writes a long value to the stream.

Definition at line 192 of file KDStream.cpp.

KDStream & KDStream::operator<< ( unsigned long  num  ) 

Writes an unsigned long value to the stream.

Definition at line 201 of file KDStream.cpp.

KDStream & KDStream::operator<< ( const char *  ch  ) 

Writes a C-style string to the stream.

Definition at line 210 of file KDStream.cpp.

KDStream & KDStream::operator<< ( const void *  p  ) 

Writes a pointer to the stream. The format is platform-dependent and defined by fprintf( ..., "%p" ).

Definition at line 220 of file KDStream.cpp.

KDStream & KDStream::operator<< ( const QString &  str  ) 

Writes a QString value to the stream.

Definition at line 230 of file KDStream.cpp.

References flush().

Here is the call graph for this function:

KDStream & KDStream::operator<< ( const QCString &  str  ) 

Writes a QCString value to the stream.

Definition at line 246 of file KDStream.cpp.

KDStream & KDStream::operator<< ( const QChar &  ch  ) 

Writes a QChar value to the stream.

Definition at line 283 of file KDStream.cpp.

KDStream & KDStream::operator<< ( const QColor &  col  ) 

Writes a QColor value to the stream. See QColor2Str for a description of the output format.

Definition at line 294 of file KDStream.cpp.

References QColor2Str().

Here is the call graph for this function:

KDStream & KDStream::operator<< ( const QColorGroup &  colgrp  ) 

Writes a QColorGroup value to the stream. Each color role output with its name and the corresponding color value.

Definition at line 304 of file KDStream.cpp.

References QColor2Str().

Here is the call graph for this function:

KDStream & KDStream::operator<< ( const QPalette &  palette  ) 

Writes a QPalette value to the stream. Each color group is output with its role and the corresponding QColorGroup value.

Definition at line 328 of file KDStream.cpp.

References endl().

Here is the call graph for this function:

KDStream & KDStream::operator<< ( const QCursor &  cursor  ) 

Writes a QCursor value to the stream. Each cursor is output with its name as listed in the QCursor reference documentation.

Definition at line 341 of file KDStream.cpp.

KDStream & KDStream::operator<< ( const QDate &  date  ) 

Writes a QDate value to the stream. The format is the one defined by QDate::toString() and may be system-dependent.

Definition at line 392 of file KDStream.cpp.

KDStream & KDStream::operator<< ( const QDateTime &  datetime  ) 

Writes a QDateTime value to the stream. The format is the one defined by QDateTime::toString() and may be system-dependent.

Definition at line 402 of file KDStream.cpp.

KDStream & KDStream::operator<< ( const QTime &  time  ) 

Writes a QTime value to the stream. The format is the one defined by QTime::toString() and may be system-dependent.

Definition at line 412 of file KDStream.cpp.

KDStream & KDStream::operator<< ( const QFont &  font  ) 

Writes a the raw name of a QFont value to the stream.

Definition at line 421 of file KDStream.cpp.

KDStream & KDStream::operator<< ( const QPen &  pen  ) 

Writes a QPen value to the stream. The format is "QPen" plus the width, the color, and the style as defined in the QPen reference documentation.

Definition at line 432 of file KDStream.cpp.

References QColor2Str().

Here is the call graph for this function:

KDStream & KDStream::operator<< ( const QPoint &  point  ) 

Writes a QPoint value to the stream. The format is "(x,y)".

Definition at line 455 of file KDStream.cpp.

KDStream & KDStream::operator<< ( const QSize &  size  ) 

Writes a QSize value to the stream. The format is "(w x h)".

Definition at line 464 of file KDStream.cpp.

KDStream & KDStream::operator<< ( const QRect &  rect  ) 

Writes a QRect value to the stream. The format is "(width x height xoffset xpos yoffset ypos)".

Definition at line 474 of file KDStream.cpp.

KDStream & KDStream::operator<< ( const QBrush &  brush  ) 

Writes a QBrush value to the stream. The format is "QBrush" plus the brush style as listed in the QBrush reference documentation and the brush color.

Definition at line 615 of file KDStream.cpp.

References QColor2Str().

Here is the call graph for this function:

KDStream & KDStream::operator<< ( const QSizePolicy &  policy  ) 

Writes a QSizePolicy value to the stream. The output contains the horizontal and vertical size policy and whether the policy has a "height for width" setting.

Definition at line 646 of file KDStream.cpp.

KDStream& KDStream::operator<< ( const QKeySequence &   ) 

KDStream & KDStream::operator<< ( const QPixmap &   ) 

Definition at line 703 of file KDStream.cpp.

KDStream & KDStream::operator<< ( const QImage &   ) 

Definition at line 712 of file KDStream.cpp.

KDStream & KDStream::operator<< ( KDSTREAMFUNC  func  ) 

Runs a stream-processing function on the stream.

Definition at line 256 of file KDStream.cpp.

KDStream & KDStream::operator<< ( const QVariant &  var  ) 

Writes a QVariant value to the stream. The format is dependent on the actual contents of the QVariant object.

Definition at line 564 of file KDStream.cpp.

KDStream & KDStream::operator<< ( const QObject &  obj  ) 

Writes a QObject value to the stream. Included information is the class name, the object name, the properties and their types.

Definition at line 543 of file KDStream.cpp.

References endl().

Here is the call graph for this function:

KDStream & KDStream::operator<< ( const QStrList &  list  ) 

Writes a QStrList value to the stream. The output is the individual strings.

Definition at line 696 of file KDStream.cpp.

References KDStream_ptrListStream().

Here is the call graph for this function:

QString KDStream::QColor2Str ( const QColor &  col  )  [protected]

This is a helper method that converts a QColor object into a string. For the predefined Qt colors, their name is output, for all other colors, the output is in the form RRGGBB (as defined by QColor::name()).

Definition at line 495 of file KDStream.cpp.

Referenced by operator<<().


The documentation for this class was generated from the following files:
Generated on Mon Nov 27 23:42:38 2006 for libKipi by  doxygen 1.5.0