aboutsummaryrefslogtreecommitdiff
path: root/src/mainwindow.h
blob: 35498ee534a0c57cdcb80c901a1e424ff3726ba2 (plain)
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
#pragma once

#include <QMainWindow>
#include <QCheckBox>
#include <QSlider>
#include <QSpinBox>
#include <QDoubleSpinBox>
#include <QPushButton>
#include <QLabel>
// #include "realtime.h"
#include "raytracer/raytracer.h"
#include "utils/aspectratiowidget/aspectratiowidget.hpp"

class MainWindow : public QWidget
{
    Q_OBJECT

public:
    void initialize();
    void finish();
    QLabel *imageLabel;

private:
    void connectUIElements();
    void connectUploadFile();
    void connectSaveImage();
    void connectxy();
    void connectxz();
    void connectxw();
    void connectyz();
    void connectyw();
    void connectzw();
    void connectRotationSlider();
    void connectNegativeRotation();

    RayTracer *rayTracer;
    AspectRatioWidget *aspectRatioWidget;
    QPushButton *uploadFile;
    QPushButton *saveImage;
    QSlider *xySlider;
    QDoubleSpinBox *xyBox;
    QSlider *xzSlider;
    QDoubleSpinBox *xzBox;
    QSlider *xwSlider;
    QDoubleSpinBox *xwBox;
    QSlider *yzSlider;
    QDoubleSpinBox *yzBox;
    QSlider *ywSlider;
    QDoubleSpinBox *ywBox;
    QSlider *zwSlider;
    QDoubleSpinBox *zwBox;
    QSlider *rotationSlider;
    QDoubleSpinBox *rotationBox;
    QCheckBox *rotateNegative;


private slots:
    void onUploadFile();
    void onSaveImage();
    void onValChangexySlider(int newValue);
    void onValChangexyBox(double newValue);
    void onValChangexzSlider(int newValue);
    void onValChangexzBox(double newValue);
    void onValChangexwSlider(int newValue);
    void onValChangexwBox(double newValue);
    void onValChangeyzSlider(int newValue);
    void onValChangeyzBox(double newValue);
    void onValChangeywSlider(int newValue);
    void onValChangeywBox(double newValue);
    void onValChangezwSlider(int newValue);
    void onValChangezwBox(double newValue);
    void onValChangeRotationSlider(int newValue);
    void onValChangeRotationBox(double newValue);
    void onRotateNegative();
    void updateXySlider(double newValue);
    void updateXzSlider(double newValue);
    void updateXwSlider(double newValue);
    void updateYzSlider(double newValue);
    void updateYwSlider(double newValue);
    void updateZwSlider(double newValue);
};