libKipi
KDStream Class Reference

Streaming operators for Qt classes. More...

#include <KDStream.h>

Collaboration diagram for KDStream:
Collaboration graph

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;
KDStream & endl(KDStream &stream)
Definition KDStream.cpp:264
KDStream(QString *outputString=0)
Definition KDStream.cpp:79

Constructor & Destructor Documentation

◆ KDStream()

◆ ~KDStream()

KDStream::~KDStream ( )

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

References flush().

Here is the call graph for this function:

Member Function Documentation

◆ flush()

void KDStream::flush ( )

Flushes buffered data to the stream.

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

◆ operator<<() [1/36]

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

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

References KDStream().

Here is the call graph for this function:

◆ operator<<() [2/36]

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

Writes a character value to the stream.

References KDStream().

Here is the call graph for this function:

◆ operator<<() [3/36]

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

Writes a C-style string to the stream.

References KDStream().

Here is the call graph for this function:

◆ operator<<() [4/36]

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.

References KDStream(), and QColor2Str().

Here is the call graph for this function:

◆ operator<<() [5/36]

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

Writes a QChar value to the stream.

References KDStream().

Here is the call graph for this function:

◆ operator<<() [6/36]

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

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

References KDStream(), and QColor2Str().

Here is the call graph for this function:

◆ operator<<() [7/36]

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.

References KDStream(), and QColor2Str().

Here is the call graph for this function:

◆ operator<<() [8/36]

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

Writes a QCString value to the stream.

References KDStream().

Here is the call graph for this function:

◆ operator<<() [9/36]

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.

References KDStream().

Here is the call graph for this function:

◆ operator<<() [10/36]

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.

References KDStream().

Here is the call graph for this function:

◆ operator<<() [11/36]

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.

References KDStream().

Here is the call graph for this function:

◆ operator<<() [12/36]

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

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

References KDStream().

Here is the call graph for this function:

◆ operator<<() [13/36]

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

References KDStream().

Here is the call graph for this function:

◆ operator<<() [14/36]

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

References KDStream().

Here is the call graph for this function:

◆ operator<<() [15/36]

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.

References endl(), and KDStream().

Here is the call graph for this function:

◆ operator<<() [16/36]

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.

References endl(), and KDStream().

Here is the call graph for this function:

◆ operator<<() [17/36]

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.

References KDStream(), and QColor2Str().

Here is the call graph for this function:

◆ operator<<() [18/36]

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

References KDStream().

Here is the call graph for this function:

◆ operator<<() [19/36]

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

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

References KDStream().

Here is the call graph for this function:

◆ operator<<() [20/36]

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

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

References KDStream().

Here is the call graph for this function:

◆ operator<<() [21/36]

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

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

References KDStream().

Here is the call graph for this function:

◆ operator<<() [22/36]

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.

References KDStream().

Here is the call graph for this function:

◆ operator<<() [23/36]

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

Writes a QString value to the stream.

References flush(), and KDStream().

Here is the call graph for this function:

◆ operator<<() [24/36]

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

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

References KDStream(), and KDStream_ptrListStream().

Here is the call graph for this function:

◆ operator<<() [25/36]

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.

References KDStream().

Here is the call graph for this function:

◆ operator<<() [26/36]

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.

References KDStream().

Here is the call graph for this function:

◆ operator<<() [27/36]

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

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

References KDStream().

Here is the call graph for this function:

◆ operator<<() [28/36]

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

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

References KDStream().

Here is the call graph for this function:

◆ operator<<() [29/36]

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

Writes a floating point value to the stream.

References KDStream().

Here is the call graph for this function:

◆ operator<<() [30/36]

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

Writes an int value to the stream.

References KDStream().

Here is the call graph for this function:

◆ operator<<() [31/36]

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

Runs a stream-processing function on the stream.

References KDStream().

Here is the call graph for this function:

◆ operator<<() [32/36]

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

Writes a long value to the stream.

References KDStream().

Here is the call graph for this function:

◆ operator<<() [33/36]

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

Writes a short value to the stream.

References KDStream().

Here is the call graph for this function:

◆ operator<<() [34/36]

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

Writes an unsigned int value to the stream.

References KDStream().

Here is the call graph for this function:

◆ operator<<() [35/36]

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

Writes an unsigned long value to the stream.

References KDStream().

Here is the call graph for this function:

◆ operator<<() [36/36]

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

Writes an unsigned short value to the stream.

References KDStream().

Here is the call graph for this function:

◆ QColor2Str()

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()).

Referenced by operator<<(), operator<<(), operator<<(), and operator<<().


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