-
Notifications
You must be signed in to change notification settings - Fork 0
/
MainWindow.h
92 lines (68 loc) · 2.16 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
#pragma once
#include "DatasetProject.h"
#include <QMainWindow>
#include <QWheelEvent>
#include <QTableWidgetItem>
#include <QMessageBox>
#include <QListWidget>
#include <QtWidgets/QProgressDialog>
#include <QtCore/QProcess>
#include <yolo_v2_class.hpp>
#include <iostream>
#include <fstream>
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = nullptr);
~MainWindow();
private slots:
void on_pushButton_create_from_video_clicked();
void on_pushButtonOpenProject_clicked();
void on_pushButton_save_clicked();
void on_pushButton_remove_clicked();
void on_pushButton_prev_clicked();
void on_pushButton_next_clicked();
void on_tableWidget_label_cellDoubleClicked(int , int );
void on_tableWidget_label_cellClicked(int , int );
void on_horizontalSlider_images_sliderMoved(int );
void clearAllClassBoxes();
void nextClass();
void prevClass();
void datasetListUpdated();
void on_pushButtonValidate_clicked();
void on_pushButtonGenerateDataset_clicked();
void on_loadDarknetModel_clicked();
void on_darknetAutoLabeling_toggled(bool checked);
void on_isDarknetBoxesVisible_toggled(bool checked);
protected:
void wheelEvent(QWheelEvent*);
void keyPressEvent(QKeyEvent *);
private:
void init();
void initTableWidget();
void initTableWidgetContextMenuSetup();
void setNextImage();
void setPreviousImage();
void setCurrentImg();
void updateButtonEnabling(bool isEnabled);
void updateDatasetNavigator();
bool openVideos();
void updateCurrentClass();
void updateClassesTable();
void loadClassNameList(QString const& classesFilePath);
void loadDatasetList(QString const& datasetPath);
void exportClassListToFile();
void detect();
Ui::MainWindow* _ui;
// TODO: May be it should be stored in the datasetproject source
QVariantMap _datasetList;
QVariantMap::iterator _datasetIt;
QVariantMap _classesList;
QVariantMap::iterator _classesIt;
DatasetProject _datasetProject;
std::unique_ptr<Detector> _net;
};