-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmainwindow.h
55 lines (49 loc) · 1006 Bytes
/
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
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QtCore>
#include <QtGui>
#include <omp.h>
#include "sourceimage.h"
class MainWindow : public QWidget
{
Q_OBJECT
public:
MainWindow(QWidget *parent = 0);
void paintEvent (QPaintEvent *e);
qreal fitness(const QImage image, int left, int right, int top, int bottom);
private:
QGridLayout *layout;
QPushButton *load;
QPushButton *start;
QPushButton *stop;
QPushButton *loadImage;
QPushButton *saveGen;
QPushButton *saveRez;
QSlider *sizeSlider;
SourceImage *left;
QLabel *right;
int numCores;
int width;
int height;
double scaleFactor;
QPixmap *loadMap;
QImage source;
QPixmap *imageMap;
QPixmap *rezMap;
QTime startTime;
QTimer *timer;
int step;
public slots:
void loadFile();
void continueGenerate();
void saveGenerate();
void saveRezult();
void startGenerate();
void stopGenerate();
void changeSize(int Size);
void paintStep()
{
paintEvent (0);
}
};
#endif // MAINWINDOW_H