libKipi
|
Streaming operators for Qt classes. More...
#include <KDStream.h>
Public Member Functions | |
KDStream (QString *outputString=0) | |
~KDStream () | |
void | flush () |
KDStream & | operator<< (bool) |
KDStream & | operator<< (char) |
KDStream & | operator<< (float) |
KDStream & | operator<< (double) |
KDStream & | operator<< (short) |
KDStream & | operator<< (unsigned short) |
KDStream & | operator<< (int) |
KDStream & | operator<< (unsigned int) |
KDStream & | operator<< (long) |
KDStream & | operator<< (unsigned long) |
KDStream & | operator<< (const char *) |
KDStream & | operator<< (const void *) |
KDStream & | operator<< (const QString &) |
KDStream & | operator<< (const QCString &) |
KDStream & | operator<< (const QChar &) |
KDStream & | operator<< (const QColor &) |
KDStream & | operator<< (const QColorGroup &) |
KDStream & | operator<< (const QPalette &) |
KDStream & | operator<< (const QCursor &) |
KDStream & | operator<< (const QDate &) |
KDStream & | operator<< (const QDateTime &) |
KDStream & | operator<< (const QTime &) |
KDStream & | operator<< (const QFont &) |
KDStream & | operator<< (const QPen &) |
KDStream & | operator<< (const QPoint &) |
KDStream & | operator<< (const QSize &) |
KDStream & | operator<< (const QRect &) |
KDStream & | operator<< (const QBrush &) |
KDStream & | operator<< (const QSizePolicy &) |
KDStream & | operator<< (const QKeySequence &) |
KDStream & | operator<< (const QPixmap &) |
KDStream & | operator<< (const QImage &) |
KDStream & | operator<< (KDSTREAMFUNC) |
KDStream & | operator<< (const QVariant &) |
KDStream & | operator<< (const QObject &) |
KDStream & | operator<< (const QStrList &list) |
Protected Member Functions | |
QString | QColor2Str (const QColor &col) |
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:
KDStream::KDStream | ( | QString * | outputString = 0 | ) |
Creates a KDStream object.
KDStream::~KDStream | ( | ) |
void KDStream::flush | ( | ) |
Flushes buffered data to the stream.
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".
KDStream & KDStream::operator<< | ( | char | ch | ) |
Writes a character value to the stream.
KDStream & KDStream::operator<< | ( | float | num | ) |
Writes a floating point value to the stream.
KDStream & KDStream::operator<< | ( | double | num | ) |
Writes a double-precision floating point value to the stream.
KDStream & KDStream::operator<< | ( | short | num | ) |
Writes a short value to the stream.
KDStream & KDStream::operator<< | ( | unsigned short | num | ) |
Writes an unsigned short value to the stream.
KDStream & KDStream::operator<< | ( | int | num | ) |
Writes an int value to the stream.
KDStream & KDStream::operator<< | ( | unsigned int | num | ) |
Writes an unsigned int value to the stream.
KDStream & KDStream::operator<< | ( | long | num | ) |
Writes a long value to the stream.
KDStream & KDStream::operator<< | ( | unsigned long | num | ) |
Writes an unsigned long value to the stream.
KDStream & KDStream::operator<< | ( | const char * | ch | ) |
Writes a C-style string to the stream.
KDStream & KDStream::operator<< | ( | const void * | p | ) |
Writes a pointer to the stream. The format is platform-dependent and defined by fprintf( ..., "%p" ).
KDStream & KDStream::operator<< | ( | const QString & | str | ) |
KDStream & KDStream::operator<< | ( | const QCString & | str | ) |
Writes a QCString value to the stream.
KDStream & KDStream::operator<< | ( | const QChar & | ch | ) |
Writes a QChar value to the stream.
KDStream & KDStream::operator<< | ( | const QColor & | col | ) |
Writes a QColor value to the stream. See QColor2Str for a description of the output format.
References QColor2Str().
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 QColor2Str().
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().
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.
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.
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.
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.
KDStream & KDStream::operator<< | ( | const QFont & | font | ) |
Writes a the raw name of a QFont value to the stream.
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 QColor2Str().
KDStream & KDStream::operator<< | ( | const QPoint & | point | ) |
Writes a QPoint value to the stream. The format is "(x,y)".
KDStream & KDStream::operator<< | ( | const QSize & | size | ) |
Writes a QSize value to the stream. The format is "(w x h)".
KDStream & KDStream::operator<< | ( | const QRect & | rect | ) |
Writes a QRect value to the stream. The format is "(width x height xoffset xpos yoffset ypos)".
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 QColor2Str().
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.
KDStream& KDStream::operator<< | ( | const QKeySequence & | ) |
KDStream & KDStream::operator<< | ( | const QPixmap & | pixmap | ) |
KDStream & KDStream::operator<< | ( | const QImage & | pixmap | ) |
KDStream & KDStream::operator<< | ( | KDSTREAMFUNC | func | ) |
Runs a stream-processing function on the stream.
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.
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().
KDStream & KDStream::operator<< | ( | const QStrList & | list | ) |
Writes a QStrList value to the stream. The output is the individual strings.
References KDStream_ptrListStream().
|
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<<().