-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmainwindow.h
More file actions
103 lines (76 loc) · 1.94 KB
/
mainwindow.h
File metadata and controls
103 lines (76 loc) · 1.94 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
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
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#define DeleteIfNotNull(x) if (x != 0) { delete x; x = 0; }
#include <QList>
#include <QMainWindow>
#include <QSpacerItem>
#include "config.h"
#include "imageentry.h"
#include "progressiveCut.h"
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
protected:
bool eventFilter(QObject *obj, QEvent *event);
private slots:
// Слоты progressive Cut
void buttonForegroundClicked();
void buttonBackgroundClicked();
void buttonCreateGraphClicked();
// Слоты панели маски
void maskButtonClicked(bool checked);
void maskMergeButtonClicked();
void maskCancelButtonClicked();
void maskSpinChanged(int value);
void maskSliderChanged(int value);
// Файл
void menuFileOpen();
void menuFileExit();
private:
void loadImage();
void activateMenu();
void maskValueChanged(int value);
void addEntryToHistory(const QString& text = "", int index = -1);
void clearHistory();
#include "structuralElements.h"
private:
Ui::MainWindow *ui;
QImage *image;
//Макса
private:
bool masking;
bool maskingDrawing;
bool maskIsEmpty;
int maskValue;
QImage* maskImage;
QImage* maskImageAlpha;
QCursor* maskCursor;
QImage* maskedImage;
//Выделение
private:
void selectionMerging();
void selectionPreview();
QImage* selection;
QImage* selectionBuffer;
QImage* selectionAlpha;
// Гистограмма
long* computeHistogramRGB();
private:
QLayout* historyLayout;
QSpacerItem* historySpacer;
QList<imageEntry*> historyList;
// Progressive Cut
private:
ProgressiveCut* progressiveCut;
bool graphCreated;
bool segmentBackgroundNew;
bool segmentForegroundNew;
friend class ProgressiveCut;
};
#endif // MAINWINDOW_H