-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmainwindow.cpp
More file actions
47 lines (41 loc) · 1.02 KB
/
Copy pathmainwindow.cpp
File metadata and controls
47 lines (41 loc) · 1.02 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
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QFileDialog>
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
this->setWindowTitle("RTRenderLab");
}
MainWindow::~MainWindow()
{
delete ui;
}
void MainWindow::on_actionopen_triggered()
{
QString fileName = QFileDialog::getOpenFileName(this,tr("select File"),".");
qDebug() << fileName;
ui->openGLWidget->changeObjModel(fileName);
}
void MainWindow::on_checkBox_clicked(bool checked)
{
//check box of line mode
if(checked)
ui->openGLWidget->isLineMode = GL_TRUE;
else
ui->openGLWidget->isLineMode = GL_FALSE;
}
void MainWindow::on_checkBox_2_clicked(bool checked)
{
//check box of lighting
if(checked)
ui->openGLWidget->isOpenLighting = GL_TRUE;
else {
ui->openGLWidget->isOpenLighting = GL_FALSE;
}
}
void MainWindow::on_doubleSpinBox_valueChanged(double arg1)
{
ui->openGLWidget->modelScaling = static_cast<float>(arg1);
}