Youtube video and text (draft).
[speedfreak] / Client / xmlreader.h
index 921ceb2..4a751a3 100644 (file)
 #include <QXmlStreamReader>
 #include <QStringList>
 #include <QNetworkReply>
+#include "categorylist.h"
 
-class XmlReader : public QObject
-{
+class XmlReader : public QObject {
+    Q_OBJECT
 public:
     XmlReader();
     ~XmlReader();
+    CategoryList *myCategoryList;
 
 private:
     QXmlStreamReader xmlreader;
-    QStringList top10List;              // Next 4 to be removed. Categorylist now in own class.
-    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(QNetworkReply *device);
+    void xmlReadTop10Results(QNetworkReply *device);
+    void xmlReadCategories(QNetworkReply *device);
+    //void xmlReadCategories(QIODevice *device);
     void xmlShow();
 };