-
Notifications
You must be signed in to change notification settings - Fork 0
/
Application.hpp
40 lines (33 loc) · 910 Bytes
/
Application.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#include <QObject>
#include <QList>
#include <QSocketNotifier>
#include <dqtx/QAppIndicator.hpp>
#include <dqtx/QIconTheme.hpp>
#include <ctime>
class Application : public QObject
{
Q_OBJECT
public:
static const int8_t PROVIDER_REDIS = 0;
static const int8_t PROVIDER_YAHOO = 1;
protected:
dqtx::QIconTheme m_iconTheme;
dqtx::QAppIndicator m_appIndicator;
dqtx::QAppIndicatorMenu m_appIndicatorMenu;
dqtx::QAppIndicatorMenuItem m_quitMenuItem;
time_t m_lastTimestamp;
QList< QPair< double, time_t > > m_obs;
QList< QPair< time_t, QColor > > m_divisions;
QString m_symbol;
QString m_displaySymbol;
public:
Application();
~Application();
bool Initialize(int _argc, char *_argv[]);
protected:
void readData();
void addObservation(double _price, time_t _timestamp);
public slots:
void onTimeout();
void onQuit();
};