-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMainWindow.h
112 lines (89 loc) · 2.2 KB
/
MainWindow.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QVBoxLayout>
#include <QGridLayout>
#include <QHBoxLayout>
#include <QPushButton>
#include <QSignalMapper>
#include <QLabel>
#include <QScrollArea>
#include <QGroupBox>
#include <QRadioButton>
#include "Recorder.h"
#include "utils.h"
#include "Video.h"
#include "Information.h"
#include "VideoDetector.h"
#include "VideoPlayer.h"
#include "LoadingDialog.h"
#include "NotePushableWidget.h"
#include "PaintableView.h"
enum State
{
Idel,
ReadyToDetect,
BusyDetecting,
ShowDetectionResult,
SelectingtRegion,
Recording
};
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
signals:
public slots:
void load();
void detect();
void cancel();
void playPeriod(int i);
void prepareToShowResult();
void recordStart();
void recordEnd();
void selectRegion();
void handleQuit();
protected:
void mousePressEvent(QMouseEvent* event);
void mouseMoveEvent(QMouseEvent* event);
void mouseReleaseEvent(QMouseEvent* event);
private:
void setCurrentState(State state);
void stateChanged();
QWidget* createModPanel();
QWidget* createRecordPanel();
void deleteMutables();
private:
QHBoxLayout* _layout_main;
QVBoxLayout* _layout_right;
QVBoxLayout* _layout_left;
QGridLayout* _layout_result;
QWidget* _container;
QLabel* _mod_info;
QPushButton* _btn_load;
QPushButton* _btn_detect;
QPushButton* _btn_quit;
QPushButton* _btn_select_region;
QPushButton* _btn_record;
QPushButton* _btn_stop;
QRadioButton* _radio_btn_record_normal;
QRadioButton* _radio_btn_record_dynamic_frame;
QRadioButton* _radio_btn_record_dynamic_period;
NotePushableWidget** _results;
QWidget* _content_view;
LoadingDialog* _loading_dialog;
QScrollArea* _scroll_container;
QSignalMapper* _signalMapper;
Information* _info;
State _current_state;
Video* _video;
VideoDetector* _detector;
VideoPlayer* _player;
Recorder* _recorder;
QSize _button_size;
QSize _display_pic_size;
TimePeriod _time_period;
};
#endif // MAINWINDOW_H