-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmainwindow.h
More file actions
74 lines (59 loc) · 1.33 KB
/
mainwindow.h
File metadata and controls
74 lines (59 loc) · 1.33 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
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
// Qt
#include <QMainWindow>
#include <QFileDialog>
#include <QString>
#include <QPixmap>
#include <QPoint>
#include <QtAlgorithms>
#include <QEvent>
#include <QMouseEvent>
#include <QShortcut>
#include <vector>
// OpenCV
#include <cv.h>
#include <highgui.h>
using namespace std;
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
private:
// fields
Ui::MainWindow *ui;
QPixmap m_pixmap;
IplImage *m_image;
IplImage *m_image_hsv;
// the vector holding the selected images
vector<QString> m_paths;
vector<QString>::iterator m_cur_path;
// variable to hold whether the current image is a thresholded one
bool m_cur_is_threshed;
// key shortcuts
QShortcut shortcut_next;
QShortcut shortcut_prev;
QShortcut shortcut_togglethresh;
// methods
void updateOutput();
void updateStatus();
public slots:
void onLoad();
void onPathChange(QString p);
void onGetHSV();
void onAdd();
void onPrevious();
void onNext();
void onThresh();
void onToggleWand();
void onWanded(vector<CvPoint> *points);
void onThreshChange(QString p);
signals:
void pathChanged(QString p);
};
#endif // MAINWINDOW_H