aboutsummaryrefslogtreecommitdiff
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
authorFate Bussey <lafayette_bussey@brown.edu>2023-12-12 14:04:17 -0500
committerFate Bussey <lafayette_bussey@brown.edu>2023-12-12 14:04:17 -0500
commitba17c6e047e817078b433838a2aedbe5d3ce1d21 (patch)
tree56b8946e1aad840d7c575eaa3943bd07c74f33c0 /src/mainwindow.cpp
parent2117034251eaa124ec9c6bec4524e490a0ee9ec0 (diff)
parent33082ca5ec4c20d34b79b3b1f24f3b3152db2816 (diff)
normals complete
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r--src/mainwindow.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 959862d..fbbfa02 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -48,7 +48,7 @@ void MainWindow::initialize() {
w_label->setFont(font);
QLabel *rotation_label = new QLabel(); // Rotation label
- rotation_label->setText("Rotation value:");
+ rotation_label->setText("Time value:");
rotation_label->setFont(font);
@@ -190,9 +190,9 @@ void MainWindow::initialize() {
rotationBox = new QDoubleSpinBox();
rotationBox->setMinimum(0.0f);
- rotationBox->setMaximum(180.f);
+ rotationBox->setMaximum(600.f);
rotationBox->setSingleStep(1.f);
- rotationBox->setValue(1.f);
+ rotationBox->setValue(settings.rotation);
lrotation->addWidget(rotationSlider);
lrotation->addWidget(rotationBox);
@@ -253,7 +253,7 @@ void MainWindow::initialize() {
void MainWindow::finish() {
// realtime->finish();
-// delete(realtime);
+// delete(rayTracer);
}
void MainWindow::connectUIElements() {
@@ -273,6 +273,7 @@ void MainWindow::connectUIElements() {
connect(rayTracer, &RayTracer::yzRotationChanged, this, &MainWindow::updateYzSlider);
connect(rayTracer, &RayTracer::ywRotationChanged, this, &MainWindow::updateYwSlider);
connect(rayTracer, &RayTracer::zwRotationChanged, this, &MainWindow::updateZwSlider);
+ connect(rayTracer, &RayTracer::rotationChanged, this, &MainWindow::updateRotationSlider);
connectW();
}
@@ -529,4 +530,10 @@ void MainWindow::updateZwSlider(double value) {
zwSlider->setValue(int(value*100.f));
zwBox->setValue(value);
rayTracer->settingsChanged(imageLabel);
+}
+
+void MainWindow::updateRotationSlider(float value) {
+ rotationSlider->setValue(int(value*100.f));
+ rotationBox->setValue(value);
+ rayTracer->settingsChanged(imageLabel);
} \ No newline at end of file