summaryrefslogtreecommitdiff
path: root/src/Preferences.cc
diff options
context:
space:
mode:
authordon bright <hugh.m.bright@gmail.com>2011-12-09 16:49:55 (GMT)
committerdon bright <hugh.m.bright@gmail.com>2011-12-09 16:49:55 (GMT)
commita4a64e7c26a0eb523f5b271c9d90f091e5933ebb (patch)
tree6e247c3f46c23a6c85b4740a2ff99abaa25fe9bd /src/Preferences.cc
parent51f24b998ba555d15f924ccd4fb5b46219f6537b (diff)
parentf577f91d25071f5ad1a9fdb6ed7c6dd3aa4c1008 (diff)
Merge remote-tracking branch 'upstream/master' into cakebaby
Diffstat (limited to 'src/Preferences.cc')
-rw-r--r--src/Preferences.cc17
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
contact: Jan Huwald // Impressum