summaryrefslogtreecommitdiff
path: root/src/Preferences.cc
diff options
context:
space:
mode:
authorMarius Kintel <marius@kintel.net>2011-07-11 01:54:20 (GMT)
committerMarius Kintel <marius@kintel.net>2011-07-11 01:54:20 (GMT)
commit21ac6c05d16e9b2eca360dbbe684335ee2431af6 (patch)
tree7c5c3215565f872d83af4190437c38a6edd3d760 /src/Preferences.cc
parent65a5df881092d89e90e71e180c689a711770c801 (diff)
parent381a31199755a205189534fe727a9e8167f0715c (diff)
merged in recent changes in master
Diffstat (limited to 'src/Preferences.cc')
-rw-r--r--src/Preferences.cc16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/Preferences.cc b/src/Preferences.cc
index 6419944..eb6af61 100644
--- a/src/Preferences.cc
+++ b/src/Preferences.cc
@@ -40,6 +40,7 @@ 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;
// Toolbar
QActionGroup *group = new QActionGroup(this);
@@ -97,7 +98,8 @@ 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->OpenGL20WarningCheckbox, SIGNAL(clicked(bool)),
+ this, SLOT(OpenGL20WarningChanged(bool)));
updateGUI();
}
@@ -148,6 +150,13 @@ void Preferences::fontSizeChanged(const QString &size)
emit fontChanged(getValue("editor/fontfamily").toString(), intsize);
}
+void
+Preferences::OpenGL20WarningChanged(bool state)
+{
+ QSettings settings;
+ settings.setValue("editor/opengl20_warning_show",state);
+}
+
void Preferences::keyPressEvent(QKeyEvent *e)
{
#ifdef Q_WS_MAC
@@ -185,6 +194,7 @@ QVariant Preferences::getValue(const QString &key) const
void Preferences::updateGUI()
{
+ QSettings settings;
QList<QListWidgetItem *> found =
this->colorSchemeChooser->findItems(getValue("3dview/colorscheme").toString(),
Qt::MatchExactly);
@@ -204,6 +214,9 @@ void Preferences::updateGUI()
else {
this->fontSize->setEditText(fontsize);
}
+
+ bool opengl20_warning_show = getValue("editor/opengl20_warning_show").toBool();
+ this->OpenGL20WarningCheckbox->setChecked(opengl20_warning_show);
}
void Preferences::apply() const
@@ -211,4 +224,3 @@ void Preferences::apply() const
emit fontChanged(getValue("editor/fontfamily").toString(), getValue("editor/fontsize").toUInt());
emit requestRedraw();
}
-
contact: Jan Huwald // Impressum