много исправлений
This commit is contained in:
@@ -26,7 +26,7 @@
|
||||
ViewEditor::ViewEditor(QWidget * parent): QWidget(parent) {
|
||||
ui = new Ui::ViewEditor();
|
||||
ui->setupUi(this);
|
||||
view = 0;
|
||||
view = nullptr;
|
||||
active = true;
|
||||
ui->checkCameraLight->setCheckState(Qt::PartiallyChecked);
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5,12,0)
|
||||
@@ -54,7 +54,9 @@ void ViewEditor::assignQGLView(QGLView * v) {
|
||||
ui->lineHDR->setProperty("GLpath", view->environmentMapFile());
|
||||
ui->lineHDR->setText(QFileInfo(view->environmentMapFile()).fileName());
|
||||
ui->checkVSync->setChecked(view->getVSync());
|
||||
ui->spinSamples->setValue(view->getSamples());
|
||||
ui->colorFogBack->setColor(view->fogColor());
|
||||
ui->spinFogDecay->setValue(view->fogDecay());
|
||||
ui->spinFogDensity->setValue(view->fogDensity());
|
||||
active = true;
|
||||
}
|
||||
|
||||
@@ -181,12 +183,26 @@ void ViewEditor::on_buttonHDRSelect_clicked() {
|
||||
}
|
||||
|
||||
|
||||
void ViewEditor::on_colorFogBack_colorChanged(const QColor & color) {
|
||||
if (!view || !active) return;
|
||||
view->setFogColor(color);
|
||||
}
|
||||
|
||||
|
||||
void ViewEditor::on_spinFogDensity_valueChanged(double arg1) {
|
||||
if (!view || !active) return;
|
||||
view->setFogDensity(arg1);
|
||||
}
|
||||
|
||||
|
||||
void ViewEditor::on_spinFogDecay_valueChanged(double arg1) {
|
||||
if (!view || !active) return;
|
||||
view->setFogDecay(arg1);
|
||||
}
|
||||
|
||||
|
||||
void ViewEditor::on_checkVSync_clicked(bool val) {
|
||||
if (!view || !active) return;
|
||||
view->setVSync(val);
|
||||
}
|
||||
|
||||
|
||||
void ViewEditor::on_spinSamples_valueChanged(int arg1) {
|
||||
view->setSamples(arg1);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user