#include <Gui.h>
Definition at line 22 of file Gui.h.
◆ Gui()
Gui::Gui |
( |
QMainWindow * |
win, |
|
|
Ui_MainWindow * |
ui_win |
|
) |
| |
Constructor sets up GUI, makes signal connections
- Parameters
-
win | points to QMainWindow from main thread |
ui_win | points to Ui_MainWindow from main thread |
Definition at line 11 of file Gui.cpp.
11 {
12 widget = win;
14 ui = ui_win;
15 ui->setupUi(widget);
17 makeConnections();
18 SignapseUtils::randSeed();
19}
void SetTask(std::string newTask)
◆ buttonPressed()
void Gui::buttonPressed |
( |
| ) |
|
Method handler for when the next task button is pressed, sets new task and resets the progress bar.
Definition at line 63 of file Gui.cpp.
63 {
64 std::string new_task = SignapseUtils::makeTask();
66 currentTask = new_task;
68}
void SetTargetImage(int target)
◆ NextScene()
void Gui::NextScene |
( |
Scene |
next | ) |
|
|
virtual |
Handles the next scene from the video processing pipeline. If the result is empty, the viewing pane is updated, otherwise, the progress bar is updated.
- Parameters
-
next | The Scene to be processed |
Implements SceneCallback.
Definition at line 24 of file Gui.cpp.
24 {
25
27 cv::Mat temp;
28 cv::flip(next.
frame, temp, 1);
29 QImage imgIn = QImage((uchar *) temp.data, temp.cols, temp.rows, temp.step,
30 QImage::Format_RGB888);
31 ui->label->setPixmap(QPixmap::fromImage(imgIn));
32 ui->label->resize(ui->label->pixmap()->size());
33 }
34 else{
37 if(progress >= 100){
39 }
40 }
41
42}
void progressChanged(int progress)
int GetProgress(std::string s, std::string task)
std::string result
Member variable.
cv::Mat frame
Member variable.
◆ progressChanged
void Gui::progressChanged |
( |
int |
progress | ) |
|
|
signal |
◆ SetTargetImage() [1/2]
void Gui::SetTargetImage |
( |
int |
target | ) |
|
◆ SetTargetImage() [2/2]
void Gui::SetTargetImage |
( |
std::string |
letter | ) |
|
Sets the target to match with user sign
- Parameters
-
letter | string represenation of the target sign |
Definition at line 54 of file Gui.cpp.
54 {
55 std::string impath =
testFolder + letter +
"_test.jpg";
56 cv::Mat img = cv::imread(impath);
57 setDemoImage(img);
58 setTaskText(letter);
59}
◆ SetTask()
void Gui::SetTask |
( |
std::string |
newTask | ) |
|
Definition at line 99 of file Gui.cpp.
99 {
100 currentTask = newTask;
102}
◆ SetVisible()
void Gui::SetVisible |
( |
bool |
visible | ) |
|
Sets underlying widget visibility.
- Parameters
-
Definition at line 47 of file Gui.cpp.
47 {
48 widget->setVisible(visible);
49}
◆ updateThreshold()
void Gui::updateThreshold |
( |
| ) |
|
Definition at line 70 of file Gui.cpp.
70 {
73}
void SetThreshold(int thres)
The documentation for this class was generated from the following files: