-
Notifications
You must be signed in to change notification settings - Fork 0
/
mainwindow.h
112 lines (85 loc) · 2.13 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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QMessageBox>
#include <QDebug>
#include <QDir>
#include <QProcess>
#include <QFileDialog>
#include <QProgressDialog>
#include <QThread>
#include <QInputDialog>
#include <QtGui>
#include <QtCore>
#include <vector>
#include <QColorDialog>
#include <sstream>
#include "renderedwindow.h"
#include "ui_mainwindow.h"
namespace Ui {
class MainWindow;
}
class Object;
class Light;
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0, QApplication *app = 0);
~MainWindow();
QGraphicsScene *getScene();
protected:
void changeEvent(QEvent *e);
void paintEvent(QPaintEvent *ev);
private slots:
void on_actionExit_triggered();
void on_actionNew_Scene_triggered();
void on_actionLoad_Scene_triggered();
void on_renderButton_clicked();
void on_objectButton_clicked();
void on_lightButton_clicked();
void on_resetButton_clicked();
void s_addSphere();
void s_addCube();
void s_addPlane();
void on_sizeSlider_valueChanged(int value);
void on_colorBox_currentIndexChanged(const QString &arg1);
void on_nameEdit_textChanged();
void on_removeButton_clicked();
void on_reflSlider_valueChanged(int value);
void on_gammaSlider_valueChanged(int value);
void on_actionSave_Scene_triggered();
void on_actionSave_Scene_As_triggered();
void on_actionRender_Settings_triggered();
public:
Ui::MainWindow *ui;
private:
QGraphicsScene *m_pimageScene;
QString m_workDir;
QFileDialog *m_pfileDialog;
QApplication *m_papp;
QMenu *m_addMenu;
QAction *addCube;
QAction *addSphere;
QAction *addPlane;
//vector<Cube> objects;
Object *obj;
int m_objCount;
int m_lightCount;
Light *light;
RenderedWindow *m_prenderedWin;
QColorDialog *m_colorDialog;
void resizeEvent(QResizeEvent* event);
void quit();
};
class Thread : public QThread
{
private:
void run()
{
QMessageBox msgBox;
msgBox.setText("Wait, new scene is being set...");
msgBox.exec();
}
};
#endif // MAINWINDOW_H