X-Git-Url: http://git.maemo.org/git/?p=speedfreak;a=blobdiff_plain;f=Client%2Fxmlreader.h;h=6dbab29a779173126c023f6068ec8f5fabe0410b;hp=4b19bfabd722f208dfee7fed01695593913cf584;hb=c242a09217383da0664e3270c2f1c181cc263645;hpb=eae981fe277e602eebf11259670f3c164d825418 diff --git a/Client/xmlreader.h b/Client/xmlreader.h index 4b19bfa..6dbab29 100644 --- a/Client/xmlreader.h +++ b/Client/xmlreader.h @@ -1,25 +1,59 @@ +/* + * Parse xml file + * + * @author Toni Jussila + * @author Tiina Kivilinna-Korhola + * @copyright (c) 2010 Speed Freak team + * @license http://opensource.org/licenses/gpl-license.php GNU Public License + */ + #ifndef XMLREADER_H #define XMLREADER_H -#include "ui_mainwindow.h" +#include +#include +#include +#include "categorylist.h" +class ProfileDialog; -class XmlReader : public QObject -{ +class XmlReader : public QObject { + Q_OBJECT public: - XmlReader(Ui_MainWindow* myMainWindow); + XmlReader(); ~XmlReader(); - QString errorString() const; + CategoryList *myCategoryList; + void xmlReadProfile(QIODevice *device, ProfileDialog *profileDialog); + QStringList *usersList; private: QXmlStreamReader xmlreader; - Ui_MainWindow* ui; + QXmlStreamAttributes attr; + ProfileDialog *profile; + QString category; + QString unit; + 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 xmlRead(QIODevice* 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