-
Notifications
You must be signed in to change notification settings - Fork 0
/
mainwindow.h
115 lines (102 loc) · 3.13 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
113
114
115
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#define QTLIBS_START {
#include <QMainWindow>
#include <QDebug>
#include <QColorDialog>
#include <QPalette>
#include <QLabel>
#include <QList>
#include <QVector>
#include <QListWidgetItem>
#include <QMessageBox>
#include <QStatusBar>
#include <QCloseEvent>
#define QTLIBS_END }
#define CPP_START {
#include <iostream>
#include <fstream>
#define CPP_END }
#define MYLIB_START {
#include <colortracking.h>
#include <ocvcolor.h>
#include <pcamera.h>
#include <hwcam.h>
#include <cerror.h>
#include <iodata.h>
#define MYLIB_END }
#define OPENCV_START {
#include <opencv2/imgcodecs.hpp>
#define OPENCV_END }
QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE
using namespace cv;
enum listCheck { lsCAM, lsHSV };
enum clearFields { clsCAM, clsHSV };
struct hsv {
int hueMIN, satMIN, valMIN;
int hueMAX, satMAX, valMAX;
}; typedef struct hsv shsv;
class MainWindow : public QMainWindow, private cError {
Q_OBJECT
public:
MainWindow(QWidget *parent = nullptr);
~MainWindow();
QVector<pCamera> CAMenables;
void setCAMERASenables(QVector<pCamera> inputCAMS) {
this->CAMenables = inputCAMS;
}
private slots:
#define CAMERAS_START {
//BTNs
void on_btnCAMfind_clicked();
void on_btnCAMpreview_clicked();
void on_btnCAMadd_clicked();
void on_btnCAMremove_clicked();
void on_listCAMERAS_itemClicked(QListWidgetItem *item);
#define CAMERAS_END }
#define HSVFILTER_START {
//SLIDERs
void on_sliderHUEmin_valueChanged(int value);
void on_sliderHUEmax_valueChanged(int value);
void on_sliderSATmin_valueChanged(int value);
void on_sliderSATmax_valueChanged(int value);
void on_sliderVALmin_valueChanged(int value);
void on_sliderVALmax_valueChanged(int value);
//BTNs
void on_btnAddColour_clicked();
void on_btnRmColour_clicked();
void on_btnEditColour_clicked();
void on_btnCOLOURpicker_clicked();
void on_btnHSVpreview_clicked();
void on_listCOLOUR_itemClicked(QListWidgetItem *item);
#define HSVFILTER_END }
#define COLORTRACK_START {
void on_btnCAMchroma_clicked();
void on_btnTRACKING_clicked();
#define COLORTRACK_END }
void clearME(clearFields field);
private:
//FUNCTIONS
void closeEvent(QCloseEvent *Event);
void isListEmpty(listCheck list_);
void testingValues();
//VARIABLES
Ui::MainWindow *ui;
cError msg_box;
iodata localStorage;
bool cvPREst = true;
bool cvCAMst = true;
bool cvHSVst = true;
shsv myHSV;
QVector<pCamera*> camenables;
//tempsVars
QColor selColour;
QString selName;
ColorTracking* myColor = new ColorTracking();
int* pos;
int* CAMselected;
bool editable = false;
};
#endif // MAINWINDOW_H