moved kdeaccessibility kdeaddons kdeadmin kdeartwork kdebindings kdeedu kdegames...
[kdeedu.git] / kwordquiz / src / wqlreader.h
bloba6e66a227d996be92f596d2b4d9fd98907d4dfed
1 /***************************************************************************
2 wqlreader.h
3 -------------------
4 copyright : (C) 2004 by Peter Hedlund
5 email : peter@peterandlinda.com
6 ***************************************************************************/
8 /***************************************************************************
9 * *
10 * This program is free software; you can redistribute it and/or modify *
11 * it under the terms of the GNU General Public License as published by *
12 * the Free Software Foundation; either version 2 of the License, or *
13 * (at your option) any later version. *
14 * *
15 ***************************************************************************/
16 #ifndef WQLREADER_H
17 #define WQLREADER_H
19 /**
20 @author Peter Hedlund
23 #include <qstring.h>
24 #include <qvaluelist.h>
25 #include <qfont.h>
27 class KWqlDataItem
29 public:
30 KWqlDataItem();
31 KWqlDataItem(const QString &front, const QString &back, int height);
32 virtual ~KWqlDataItem();
34 QString frontText() const {return m_front;};
35 QString backText() const {return m_back;};
36 int rowHeight() const {return m_height;};
38 private:
39 QString m_front;
40 QString m_back;
41 int m_height;
44 typedef QValueList<KWqlDataItem> KWqlDataItemList;
46 class WqlReader{
47 public:
48 WqlReader();
49 KWqlDataItemList parse(const QString &fileName);
50 int colWidth(int col);
51 int numRows() {return m_numRows;};
52 int startCol() {return m_topLeft;};
53 int startRow() {return m_topRight;};
54 int endCol() {return m_bottomLeft;};
55 int endRow() {return m_bottomRight;};
56 QString language(int col);
57 QFont font() {return m_font;};
58 QString specialCharacters() {return m_specialCharacters;};
60 private:
61 QFont m_font;
62 int m_colWidth1;
63 int m_colWidth2;
64 int m_numRows;
65 int m_topLeft;
66 int m_topRight;
67 int m_bottomLeft;
68 int m_bottomRight;
69 QString m_language1;
70 QString m_language2;
71 QString m_specialCharacters;
75 #endif