-
Notifications
You must be signed in to change notification settings - Fork 9
/
view.h
42 lines (34 loc) · 911 Bytes
/
view.h
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
41
42
#ifndef VIEW_H
#define VIEW_H
#include "ohlc_provider.h"
#include "graph_viewport.h"
#include "abstract_graph_view.h"
class QGraphicsScene;
class QLabel;
class QSlider;
class QToolButton;
class GraphOverlay;
class View : public QFrame {
Q_OBJECT
public:
explicit View(const QString &name, QWidget *parent = 0);
QGraphicsScene* getMainScene();
private slots:
void graphViewDataPointHovered(QDateTime time, float price);
void zoom(QDateTime time, int delta);
signals:
void dataPointHovered(QDateTime time, float price);
public slots:
void changeDataSource(OHLCProvider* source);
void resetView(); // reset to default view
private:
GraphViewport *viewport;
OHLCProvider* source;
AbstractGraphView *mainGraph;
AbstractGraphView *RSIGraph;
AbstractGraphView *MACDGraph;
QToolButton *resetButton;
public:
int getViewportWidth(); int getViewportHeight();
};
#endif // VIEW_H