-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathplayerdialog.h
60 lines (44 loc) · 1.13 KB
/
playerdialog.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
#ifndef PLAYERDIALOG_H
#define PLAYERDIALOG_H
#include <QDialog>
#include <QMouseEvent>
#include <QTimer>
#include <trackerrunner.h>
#include <opencv2/opencv.hpp>
#include <vector>
namespace Ui {
class PlayerDialog;
}
class PlayerDialog : public QDialog
{
Q_OBJECT
public:
explicit PlayerDialog(QWidget *parent = 0);
explicit PlayerDialog(QString path, QWidget *parent = 0);
void mousePressEvent(QMouseEvent* ev) override;
void mouseReleaseEvent(QMouseEvent* ev) override;
void mouseMoveEvent(QMouseEvent*) override;
~PlayerDialog();
private:
Ui::PlayerDialog *ui;
QString m_Path;
QTimer *m_Timer;
QImage m_Image;
private:
std::unique_ptr<TrackerRunner> m_TrackerRunner;
bool m_VideoOnStart;
std::vector<cv::Rect2i> m_Rects;
private:
void refreshTracker();
std::vector<cv::Rect2d> convertRectsToRois();
protected:
void paintEvent(QPaintEvent*) override;
signals:
void repaintSignal();
private slots:
void mainExec();
void on_playButton_clicked();
void on_stopButton_clicked();
void on_comboBox_currentIndexChanged(int index);
};
#endif // PLAYERDIALOG_H