Youtube video and text (draft).
[speedfreak] / Client / xmlreader.h
index fa69133..4a751a3 100644 (file)
@@ -1,36 +1,47 @@
+/*
+ * Parse xml file
+ *
+ * @author     Toni Jussila <toni.jussila@fudeco.com>
+ * @author     Tiina Kivilinna-Korhola <tiina.kivilinna-korhola@fudeco.com>
+ * @copyright  (c) 2010 Speed Freak team
+ * @license    http://opensource.org/licenses/gpl-license.php GNU Public License
+ */
+
 #ifndef XMLREADER_H
 #define XMLREADER_H
 
 #include <QXmlStreamReader>
 #include <QStringList>
+#include <QNetworkReply>
+#include "categorylist.h"
 
-class XmlReader : public QObject
-{
+class XmlReader : public QObject {
+    Q_OBJECT
 public:
     XmlReader();
     ~XmlReader();
-    QStringList getTop10List();
-    QString getTop10AccelerationList();
-    QString getTop10SpeedList();
-    QString getTop10GforceList(); 
+    CategoryList *myCategoryList;
 
 private:
     QXmlStreamReader xmlreader;
-    QStringList top10List;
-    QString top10AccelerationList;
-    QString top10SpeedList;
-    QString top10GforceList;
 
     QXmlStreamAttributes attr;
     QString category;
     QString unit;
-    QString description;
+    QString date;
     QString position;
     QString user;
     QString value;
+    QString description;
+
+signals:
+    void receivedCategoryList();
+    void receivedTop10List();
 
 public slots:
-    void xmlRead(QIODevice* device);
+    void xmlReadTop10Results(QNetworkReply *device);
+    void xmlReadCategories(QNetworkReply *device);
+    //void xmlReadCategories(QIODevice *device);
     void xmlShow();
 };