Merge branch 'changes/UI'
[speedfreak] / Client / xmlreader.h
1 /*
2  * Parse xml file
3  *
4  * @author     Toni Jussila <toni.jussila@fudeco.com>
5  * @author     Tiina Kivilinna-Korhola <tiina.kivilinna-korhola@fudeco.com>
6  * @copyright  (c) 2010 Speed Freak team
7  * @license    http://opensource.org/licenses/gpl-license.php GNU Public License
8  */
9
10 #ifndef XMLREADER_H
11 #define XMLREADER_H
12
13 #include <QXmlStreamReader>
14 #include <QStringList>
15 #include <QNetworkReply>
16
17 class XmlReader : public QObject
18 {
19 public:
20     XmlReader();
21     ~XmlReader();
22     QStringList getTop10List();
23     QString getTop10AccelerationList();
24     QString getTop10SpeedList();
25     QString getTop10GforceList(); 
26
27 private:
28     QXmlStreamReader xmlreader;
29     QStringList top10List;
30     QString top10AccelerationList;
31     QString top10SpeedList;
32     QString top10GforceList;
33
34     QXmlStreamAttributes attr;
35     QString category;
36     QString unit;
37     QString description;
38     QString position;
39     QString user;
40     QString value;
41
42 public slots:
43     void xmlRead(QNetworkReply *device);
44     void xmlShow();
45 };
46
47 #endif // XMLREADER_H