summaryrefslogtreecommitdiffstats
path: root/kwordquiz/src/kvtmlwriter.h
blob: 3e1c4876aa964a7e8908156856403c82f1f4016e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/***************************************************************************
                          kvtmlwriter.h  -  description
                             -------------------
   copyright            : (C) 2004 by Peter Hedlund
   email                : peter.hedlund@kdemail.net
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/
 
#ifndef KVTMLWRITER_H
#define KVTMLWRITER_H

#include <tqfile.h>
#include <textstream.h>

/**
@author Peter Hedlund
*/
class KVTMLWriter{
public:
  KVTMLWriter(TQFile *file);

  ~KVTMLWriter();
  void addFirstItem(const TQString &ll, int lwidth, const TQString &left, const TQString &rl, int rwidth, const TQString &right);
  void addHeader(const TQString &generator, int cols, int rows, const TQString &title);
  void addItem(const TQString &left, const TQString &right);
private:
  TQString escape(const TQString &);
  TQFile *outputFile;
  TQTextStream outputStream;
};

#endif