-
Notifications
You must be signed in to change notification settings - Fork 9
/
rsi_overlay.h
38 lines (31 loc) · 920 Bytes
/
rsi_overlay.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
#ifndef RSI_OVERLAY_H_INCLUDED
#define RSI_OVERLAY_H_INCLUDED
// TODO: scena by se nemela sama od sebe cela rozbijet, ne?
#include "axis_pair.h"
#include "graph_overlay.h"
#include <QList>
#include <QGraphicsItem>
class RSIOverlay: public GraphOverlay {
Q_OBJECT
private:
AxisPair axisPair;
OHLCProvider* projection;
class Graphics: public QGraphicsItem {
private:
AxisPair axisPair;
public:
Graphics(AxisPair pair);
QList<QPair<QDateTime, float>> data;
QRectF boundingRect() const;
QPainterPath shape() const;
void paint(QPainter *painter, const QStyleOptionGraphicsItem *item, QWidget *widget);
};
public slots:
virtual void timeAxisChanged(TimeAxis timeAxis);
virtual void numberAxisChanged(NumberAxis numberAxis);
virtual void projectionChanged(OHLCProvider* projection);
public:
RSIOverlay();
virtual void insertIntoScene(QGraphicsScene* scene);
};
#endif