Add copying and licence information
[evehomescreen] / src / skilltree.h
1 // Copyright (C) 2010 Jaakko Kyro <jkyro@korjaussarja.net>
2 // This file is licenced under GPL, see COPYING
3 // for full licence information
4 #ifndef SKILLTREE_H
5 #define SKILLTREE_H
6
7 #include <QObject>
8 #include <QHash>
9
10 class QNetworkAccessManager;
11 class QNetworkReply;
12
13 class SkillTree : public QObject
14 {
15     Q_OBJECT
16 public:
17     explicit SkillTree(QObject *parent = 0);
18     QString skillName(const int code) const { return skillNames.value(code); }
19 signals:
20     void skillsLoaded();
21 public slots:
22     void loadSkills();
23     void replyReady();
24     void save();
25 private:
26     void fromXml(QByteArray &content);
27     QHash<int,QString> skillNames;
28     QNetworkAccessManager *mgr;
29     QNetworkReply *reply;
30 };
31
32 #endif // SKILLTREE_H