-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathloopplayerlabel.h
63 lines (46 loc) · 1.21 KB
/
loopplayerlabel.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#ifndef LOOPPLAYERLABEL_H
#define LOOPPLAYERLABEL_H
#include <QWidget>
#include <QLabel>
#include <QMouseEvent>
#include "loopplayer.h"
#include <QBitmap>
#include <vector>
#include <QVector>
#include "looproi.h"
class LoopPlayerLabel : public QLabel
{
Q_OBJECT
public:
explicit LoopPlayerLabel(QWidget *parent = nullptr);
void mouseMoveEvent(QMouseEvent *event);
void mousePressEvent(QMouseEvent *event);
void mouseReleaseEvent(QMouseEvent *event);
void resizeEvent(QResizeEvent *event);
void updateRoiFrames();
LoopPlayer * getPlayer();
LoopRoi * getLoopRoi();
void writeFile(std::string filepath);
private:
LoopPlayer * player = nullptr;
bool pressing = false;
QVector<QPoint> * selectedRoi;
QVector<QPoint> * displayingRoi;
int contentWidth = 0;
int contentHeight = 0;
double contentRatio = 0.00;
int screenWidth = 0;
int screenHeight = 0;
double screenRatio = 0.00;
double contentScale = 1.00;
int edgeLeft = 0;
int edgeTop = 0;
int edgeRight = 0;
int edgeBottom = 0;
void updateLayoutValue();
LoopRoi loopRoi;
signals:
public slots:
void updateLoopPlayerUI(QImage img);
};
#endif // LOOPPLAYERLABEL_H