Indicate press event
[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
9 #include <QSharedPointer>
10 #include <QMouseEvent>
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     virtual void mousePressEvent ( QMouseEvent * event );
41     virtual void mouseReleaseEvent ( QMouseEvent * event );
42 private:
43     EveSettingsDialog *m_settings;
44     EveSkillTraining *m_training;
45     //QNetworkConfigurationManager *m_net;
46     SkillTree *m_skills;
47     QSharedPointer<EveModel> m_model;
48     QTimer *m_timer;
49     QTimer *m_updateTimer;
50     bool m_pressed;
51 };
52
53 #endif // WIDGET_H