Fixed bug 5709. Now result dialog shows only two decimals in time labels.
[speedfreak] / Client / xmlreader.h
index 2a77250..6dbab29 100644 (file)
 #include <QXmlStreamReader>
 #include <QStringList>
 #include <QNetworkReply>
+#include "categorylist.h"
 
-class XmlReader : public QObject
-{
+class ProfileDialog;
+
+class XmlReader : public QObject {
+    Q_OBJECT
 public:
     XmlReader();
     ~XmlReader();
-    QStringList getTop10List();
-    QStringList getCategoryList();
-    QString getTopList( QString category, int size);
+    CategoryList *myCategoryList;
+    void xmlReadProfile(QIODevice *device, ProfileDialog *profileDialog);
+    QStringList *usersList;
 
 private:
     QXmlStreamReader xmlreader;
-    QStringList top10List;
-    QStringList categoryList;
-    QString top10AccelerationList;
-    QString top10SpeedList;
-    QString top10GforceList;
-
     QXmlStreamAttributes attr;
+    ProfileDialog *profile;
     QString category;
     QString unit;
-    QString description;
+    QString date;
     QString position;
     QString user;
     QString value;
+    QString description;
+    QStringList *usersInfo;
+
+signals:
+    void receivedCategoryList();
+    void receivedTop10List();
+    void userInfo(QStringList *userInfo);
 
 public slots:
-    void xmlRead(QNetworkReply *device);
+    void xmlReadTop10Results(QNetworkReply *device, QString userName);
+    void xmlReadCategories(QNetworkReply *device);
+    //void xmlReadCategories(QIODevice *device);
     void xmlShow();
+
+    //void xmlReadUserInfo(QIODevice *device);
+    void xmlReadUserInfo(QNetworkReply *device);
+    void xmlReadUsers(QNetworkReply *device);
+    //void xmlReadUsers(QIODevice *device);
 };
 
 #endif // XMLREADER_H