This repository has been archived by the owner on Jun 24, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mainwindow.h
98 lines (82 loc) · 2.21 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
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QFileDialog>
#include <QDebug>
#include <QFileInfo>
#include <QList>
#include <QVector>
#include <QString>
#include <QListWidgetItem>
#include <QGraphicsScene>
#include <QGraphicsItem>
#include <QHash>
#include <QTime>
//#include "imageshandler.h"
#include "fullsearch.h"
#include "hexagonalsearch.h"
#include "rhombussearch.h"
#include "improvesearch.h"
namespace Ui {
class MainWindow;
}
enum SetDisplay{
NoItemFlags = 0,
Image = 1,
MovementDots = 2,
MovementLines = 4,
SearchWindow = 8
};
struct Movement{
QPair<int,int> bestFit;
QVector<QPair<int,int> > candidateFits;
};
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
void setFlags(int flags);
void updateDisplay();
void updateDisplay(int flags);
private slots:
void on_addImagesButton_released();
//void on_filesListWidget_itemSelectionChanged();
void on_blockSizeSlider_valueChanged(int value);
void on_searchWindowSlider_valueChanged(int value);
void on_diamondBigSize_valueChanged(int value);
void on_diamondSmallSize_valueChanged(int value);
void on_actionRun_triggered();
void on_actionClear_Vectors_triggered();
void getMovementLines();
void drawSearchWindow(int x, int y);
void on_actionExport_view_as_image_triggered();
void on_useImportantCheckBox_toggled(bool checked);
void on_filesListWidget_currentRowChanged(int currentRow);
private:
short blockSize;
short windowSize;
short flags;
short currentFrame;
bool operationComplete;
QVector<QList<QPair<QPoint,QPoint> > >* draw;
QList<QPair<QPoint,QVector<QPoint> > >* cbfPoints;
Ui::MainWindow *ui;
QList<QString> imagesPath;
QList<QImage*> images;
QPixmap pixmapObject;
QGraphicsScene displayScene;
QGraphicsItem *backgroundImage;
FullSearch* fullFinder;
HexagonalSearch* hexFinder;
RhombusSearch* rhombusFinder;
ImproveSearch* improvedFinder;
void clearVectors();
void loadImages();
void drawLines();
void drawDots();
void redisplayImage();
void exportResults();
};
#endif // MAINWINDOW_H