--- ray/src/qtrvu/mainwindow.cxx 2011/10/22 22:38:10 1.1 +++ ray/src/qtrvu/mainwindow.cxx 2012/08/06 17:51:45 1.3 @@ -150,6 +150,8 @@ void MainWindow::connectSlots() this, SLOT(saveImage())); connect(m_ui->loadView, SIGNAL(triggered()), this, SLOT(loadView())); + connect(m_ui->loadRif, SIGNAL(triggered()), + this, SLOT(loadRif())); connect(m_ui->backfaceVisibility, SIGNAL(triggered()), this, SLOT(toggleBackfaceVisibility())); connect(m_ui->grayscale, SIGNAL(triggered()), @@ -684,6 +686,10 @@ void MainWindow::showViewDialog() { m_viewDialogUi->angular->setChecked(true); } + else if(ourview.type==VT_PLS) + { + m_viewDialogUi->planispheric->setChecked(true); + } else if(ourview.type==VT_CYL) { m_viewDialogUi->cylindrical->setChecked(true); @@ -742,6 +748,11 @@ void MainWindow::adjustView() nv.type = VT_ANG; changed = true; } + if(m_viewDialogUi->planispheric->isChecked() && nv.type != VT_PLS) + { + nv.type = VT_PLS; + changed = true; + } if(m_viewDialogUi->cylindrical->isChecked() && nv.type != VT_CYL) { nv.type = VT_CYL; @@ -1012,6 +1023,21 @@ void MainWindow::toggleIrradiance() } this->runCommand(command.toAscii()); this->runCommand("new"); +} + +void MainWindow::loadRif() +{ + bool ok; + QString viewName = QInputDialog::getText(this, tr("Input view name"), + tr("Name of view:"), QLineEdit::Normal, + "", &ok); + if (ok && !viewName.isEmpty()) + { + QString radFileName = QFileDialog::getOpenFileName(this, tr("Open rad File"), + "", tr("rad files (*.rif)")); + QString command = "L " + viewName + " " + radFileName; + this->runCommand(command.toAscii()); + } } void MainWindow::appendToRif()