-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgeneral_view.cpp
More file actions
executable file
·101 lines (79 loc) · 2.7 KB
/
general_view.cpp
File metadata and controls
executable file
·101 lines (79 loc) · 2.7 KB
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
#include "general_view.hpp"
GeneralViewMA::GeneralViewMA(LogView *log){
// Widget initialize
videoView = new VideoView();
// Groupbox initialize
runBox = new RunGroupBox("matlab", nullptr, log);
videoBox = new VideoGroupBox(videoView, runBox, log, "matlab", nullptr);
controlBox = new ParameterMABox(log);
QObject::connect(runBox, &RunGroupBox::run, this, &GeneralViewMA::runDetected);
// Widget layout initialize
auto layout = new QGridLayout();
layout->addWidget(videoView, 0, 0);
layout->addWidget(videoBox, 1, 0);
layout->addWidget(controlBox, 0, 1);
layout->addWidget(runBox, 1, 1);
setLayout(layout);
}
void GeneralViewMA::runDetected() {
videoBox->play(false);
emit run();
}
QString GeneralViewMA::getVideoPath() {
return videoBox->finderFilePath();
}
int GeneralViewMA::getMaxSize() {
return controlBox->maxSize();
}
int GeneralViewMA::getMinSize() {
return controlBox->minSize();
}
bool GeneralViewMA::isAreaChecked() {
return controlBox->isAreaChecked();
}
bool GeneralViewMA::isEccentricityChecked() {
return controlBox->isEccentricityChecked();
}
bool GeneralViewMA::isOrientationChecked() {
return controlBox->isOrientationChecked();
}
QString GeneralViewMA::getAppPath() {
return runBox->getAppPath();
}
void GeneralViewMA::setResultVideo(QString path) {
runBox->updateRes(path);
videoBox->setResultPath(path);
}
GeneralViewPy::GeneralViewPy(QString app, UserData *data, LogView *log, HiddenVarView *hidden){
// Widget initialize
videoView = new VideoView();
// Groupbox initialize
runBox = new RunGroupBox("python", data, log);
videoBox = new VideoGroupBox(videoView, runBox, log, "python", data);
controlBox = new ParameterPyBox(hidden, log);
QObject::connect(videoBox, &VideoGroupBox::updateSrc, controlBox, &ParameterPyBox::updateSrc);
QObject::connect(hidden, &HiddenVarView::reloadParam, videoBox, &VideoGroupBox::loadOriginal);
QObject::connect(runBox, &RunGroupBox::run, this, &GeneralViewPy::runDetected);
// Widget layout initialize
auto layout = new QGridLayout();
layout->addWidget(videoView, 0, 0);
layout->addWidget(videoBox, 1, 0);
layout->addWidget(controlBox, 0, 1);
layout->addWidget(runBox, 1, 1);
setLayout(layout);
videoBox->loadOriginal();
}
void GeneralViewPy::runDetected() {
videoBox->play(false);
emit run();
}
QString GeneralViewPy::getVideoPath() {
return videoBox->finderFilePath();
}
QString GeneralViewPy::getAppPath() {
return runBox->getAppPath();
}
void GeneralViewPy::setResultVideo(QString path) {
runBox->updateRes(path);
videoBox->setResultPath(path);
}