blob: bfb2d4183ac117b437c5a5b36f561d52b555c4cf (
plain)
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
#ifndef __DRUMGIZMO_CANVASTOOLLISTEN_H__
#define __DRUMGIZMO_CANVASTOOLLISTEN_H__
#include "canvastool.h"
#include "canvas.h"
#include "player.h"
class CanvasToolListen : public CanvasTool {
Q_OBJECT
public:
CanvasToolListen(Canvas *canvas, Player &player);
QString name() { return "Listen"; }
bool mousePressEvent(QMouseEvent *event);
bool mouseReleaseEvent(QMouseEvent *event);
void paintEvent(QPaintEvent *event, QPainter &painter);
void playRange(unsigned int from, unsigned int to);
public slots:
void update(size_t position);
private:
Canvas *canvas;
Player &player;
size_t lastpos;
size_t pos;
};
#endif
|