Main Page | Namespace List | Class List | File List | Namespace Members | Class Members | File Members

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;


Constructor & Destructor Documentation

KDStream::KDStream QString *  outputString = 0  ) 
 

Creates a KDStream object.

KDStream::~KDStream  ) 
 

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


Member Function Documentation

void KDStream::flush  ) 
 

Flushes buffered data to the stream.

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

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

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.

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<< KDSTREAMFUNC  func  ) 
 

Runs a stream-processing function on the stream.

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

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

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

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

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 QSize &  size  ) 
 

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

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

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

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.

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

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

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 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 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 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 QPalette &  palette  ) 
 

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

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.

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

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

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

Writes a QChar value to the stream.

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

Writes a QCString value to the stream.

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

Writes a QString value 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 char *  ch  ) 
 

Writes a C-style string to the stream.

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

Writes an unsigned long value to the stream.

KDStream & KDStream::operator<< long  num  ) 
 

Writes a long value to the stream.

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

Writes an unsigned int value to the stream.

KDStream & KDStream::operator<< int  num  ) 
 

Writes an int value to the stream.

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

Writes an unsigned short value to the stream.

KDStream & KDStream::operator<< short  num  ) 
 

Writes a short value to the stream.

KDStream & KDStream::operator<< double  num  ) 
 

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

KDStream & KDStream::operator<< float  num  ) 
 

Writes a floating point value to the stream.

KDStream & KDStream::operator<< char  ch  ) 
 

Writes a character value to the stream.

KDStream & KDStream::operator<< bool  b  ) 
 

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

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


The documentation for this class was generated from the following files:
Generated on Tue Sep 13 05:02:11 2005 for libKipi by  doxygen 1.4.4