Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

docwriter.h

00001 // -*- c++ -*-
00002 
00003 #ifndef DOCWRITER_H
00004 #define DOCWRITER_H
00005 
00006 #include <qtextstream.h>
00007 
00013 class DocWriter {
00014 public: 
00016    DocWriter( QTextStream *ts ) { this->ts = ts; }
00017    virtual ~DocWriter();
00018 
00020    void writeDoc( const QString &body, const QString &ttl=QString::null );
00021 
00023    void startDoc( const QString &ttl=QString::null );
00025    void endDoc();
00026 
00028    void startSection( const QString &heading=QString::null );
00030    void endSection();
00031 
00033    void para( const QString &text );
00035    void pre( const QString &text, bool quote=true );
00036 
00037    void startList();
00038    void li( const QString &text );
00039    void li( const QString &title, const QString &text );
00040    void li( const QString &title, int value ) { li( title, QString::number(value) ); }
00041    void endList();
00042    
00044    static QString quoteAsHTML( const QString &in );
00045    
00046 private:
00047    QTextStream *ts;
00048 };
00049 
00050 #endif
00051 
00052 // Local Variables:
00053 // c-basic-offset: 3
00054 // End:

Generated on Wed Apr 9 23:50:21 2003 for QXServlet by doxygen1.2.17