summaryrefslogtreecommitdiffstats
path: root/kwordquiz/src/wqlreader.h
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commitce599e4f9f94b4eb00c1b5edb85bce5431ab3df2 (patch)
treed3bb9f5d25a2dc09ca81adecf39621d871534297 /kwordquiz/src/wqlreader.h
downloadtdeedu-ce599e4f9f94b4eb00c1b5edb85bce5431ab3df2.tar.gz
tdeedu-ce599e4f9f94b4eb00c1b5edb85bce5431ab3df2.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeedu@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kwordquiz/src/wqlreader.h')
-rw-r--r--kwordquiz/src/wqlreader.h75
1 files changed, 75 insertions, 0 deletions
diff --git a/kwordquiz/src/wqlreader.h b/kwordquiz/src/wqlreader.h
new file mode 100644
index 00000000..37920f5d
--- /dev/null
+++ b/kwordquiz/src/wqlreader.h
@@ -0,0 +1,75 @@
+/***************************************************************************
+ wqlreader.h
+ -------------------
+ 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 WQLREADER_H
+#define WQLREADER_H
+
+/**
+@author Peter Hedlund
+*/
+
+#include <qstring.h>
+#include <qvaluelist.h>
+#include <qfont.h>
+
+class KWqlDataItem
+{
+public:
+ KWqlDataItem();
+ KWqlDataItem(const QString &front, const QString &back, int height);
+ virtual ~KWqlDataItem();
+
+ QString frontText() const {return m_front;}
+ QString backText() const {return m_back;}
+ int rowHeight() const {return m_height;}
+
+private:
+ QString m_front;
+ QString m_back;
+ int m_height;
+};
+
+typedef QValueList<KWqlDataItem> KWqlDataItemList;
+
+class WqlReader{
+public:
+ WqlReader();
+ KWqlDataItemList parse(const QString &fileName);
+ int colWidth(int col);
+ int numRows() {return m_numRows;}
+ int startCol() {return m_topLeft;}
+ int startRow() {return m_topRight;}
+ int endCol() {return m_bottomLeft;}
+ int endRow() {return m_bottomRight;}
+ QString language(int col);
+ QFont font() {return m_font;}
+ QString specialCharacters() {return m_specialCharacters;}
+
+private:
+ QFont m_font;
+ int m_colWidth1;
+ int m_colWidth2;
+ int m_numRows;
+ int m_topLeft;
+ int m_topRight;
+ int m_bottomLeft;
+ int m_bottomRight;
+ QString m_language1;
+ QString m_language2;
+ QString m_specialCharacters;
+
+};
+
+#endif