diff options
author | Marius Kintel <marius@kintel.net> | 2011-12-09 02:43:06 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2011-12-09 02:43:06 (GMT) |
commit | f577f91d25071f5ad1a9fdb6ed7c6dd3aa4c1008 (patch) | |
tree | cfc834302cc03e520127014faa59d5ecf58d7a06 /src/Preferences.cc | |
parent | cc4f6ac1846882adbc5214157e1d7b5a1994a9db (diff) |
Better warnings and GL info related to OpenCSG capabilities and OpenGL 1.x
Diffstat (limited to 'src/Preferences.cc')
-rw-r--r-- | src/Preferences.cc | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/Preferences.cc b/src/Preferences.cc index d240a9f..577ed4a 100644 --- a/src/Preferences.cc +++ b/src/Preferences.cc @@ -40,7 +40,8 @@ Preferences::Preferences(QWidget *parent) : QMainWindow(parent) this->defaultmap["3dview/colorscheme"] = this->colorSchemeChooser->currentItem()->text(); this->defaultmap["editor/fontfamily"] = this->fontChooser->currentText(); this->defaultmap["editor/fontsize"] = this->fontSize->currentText().toUInt(); - this->defaultmap["editor/opengl20_warning_show"] = true; + this->defaultmap["advanced/opencsg_show_warning"] = true; + this->defaultmap["advanced/enable_opencsg_opengl1x"] = false; // Toolbar QActionGroup *group = new QActionGroup(this); @@ -98,7 +99,7 @@ Preferences::Preferences(QWidget *parent) : QMainWindow(parent) this, SLOT(fontFamilyChanged(const QString &))); connect(this->fontSize, SIGNAL(editTextChanged(const QString &)), this, SLOT(fontSizeChanged(const QString &))); - connect(this->openCSGWarningBox, SIGNAL(clicked(bool)), + connect(this->openCSGWarningBox, SIGNAL(toggled(bool)), this, SLOT(openCSGWarningChanged(bool))); updateGUI(); } @@ -154,7 +155,14 @@ void Preferences::openCSGWarningChanged(bool state) { QSettings settings; - settings.setValue("editor/opengl20_warning_show",state); + settings.setValue("advanced/opencsg_show_warning",state); +} + +void +Preferences::enableOpenCSGChanged(bool state) +{ + QSettings settings; + settings.setValue("advanced/enable_opencsg_opengl1x", state); } void Preferences::keyPressEvent(QKeyEvent *e) @@ -215,7 +223,8 @@ void Preferences::updateGUI() this->fontSize->setEditText(fontsize); } - this->openCSGWarningBox->setChecked(getValue("editor/opengl20_warning_show").toBool()); + this->openCSGWarningBox->setChecked(getValue("advanced/opencsg_show_warning").toBool()); + this->enableOpenCSGBox->setChecked(getValue("advanced/enable_opencsg_opengl1x").toBool()); } void Preferences::apply() const |