200246430e47aba0175aee8ba9dd866d401bdde3
[evehomescreen] / src / widget.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 WIDGET_H
5 #define WIDGET_H
6
7 #include <QtGui/QLabel>
8 #include <QNetworkConfigurationManager>
9 #include <QSharedPointer>
10
11 QTM_USE_NAMESPACE
12
13 class EveCharacter;
14 class EveSettingsDialog;
15 class EveSkillTraining;
16 class SkillTree;
17 class EveModel;
18
19 class Widget : public QLabel
20 {
21     Q_OBJECT
22     enum TrainingState {
23         QueueEmpty, // <! No items in training queue
24         QueuePartial, // <! The queue still has room
25         QueueFull // <! The queue is full
26     };
27
28 public:
29     Widget(QWidget *parent = 0);
30     ~Widget();
31     QSize sizeHint() const;
32
33 public slots:
34     void showSettingsDialog();
35     void paintEvent(QPaintEvent *event);
36     void skillReady();
37     void onlineStateChanged(bool online);
38     void loadTraining();
39     void trainingLoaded();
40 private:
41     EveSettingsDialog *m_settings;
42     EveSkillTraining *m_training;
43     QNetworkConfigurationManager *m_net;
44     SkillTree *m_skills;
45     QSharedPointer<EveModel> m_model;
46     QTimer *m_timer;
47 };
48
49 #endif // WIDGET_H