src/settingseditor/settingseditor.cpp

changeset 45
272c84c7c87e
parent 44
c6114b3af3a6
child 48
3c10f0e2fbe0
equal deleted inserted replaced
44:c6114b3af3a6 45:272c84c7c87e
39 { 39 {
40 this->settings->setLocale(this->ui.language->currentData().toString()); 40 this->settings->setLocale(this->ui.language->currentData().toString());
41 this->settings->setMainColor(this->ui.mainColorButton->selectedColor()); 41 this->settings->setMainColor(this->ui.mainColorButton->selectedColor());
42 this->settings->setBackgroundColor(this->ui.backgroundColorButton->selectedColor()); 42 this->settings->setBackgroundColor(this->ui.backgroundColorButton->selectedColor());
43 this->settings->setLineThickness(static_cast<GLfloat>(this->ui.lineThickness->value())); 43 this->settings->setLineThickness(static_cast<GLfloat>(this->ui.lineThickness->value()));
44 this->settings->setLineAntiAliasing(this->ui.lineAntiAliasing->isChecked());
44 this->librariesEditor.saveSettings(this->settings); 45 this->librariesEditor.saveSettings(this->settings);
45 } 46 }
46 47
47 void SettingsEditor::loadLocales() 48 void SettingsEditor::loadLocales()
48 { 49 {
70 { 71 {
71 this->setCurrentLanguage(this->settings->locale()); 72 this->setCurrentLanguage(this->settings->locale());
72 this->ui.mainColorButton->setSelectedColor(this->settings->mainColor()); 73 this->ui.mainColorButton->setSelectedColor(this->settings->mainColor());
73 this->ui.backgroundColorButton->setSelectedColor(this->settings->backgroundColor()); 74 this->ui.backgroundColorButton->setSelectedColor(this->settings->backgroundColor());
74 this->ui.lineThickness->setValue(static_cast<double>(this->settings->lineThickness())); 75 this->ui.lineThickness->setValue(static_cast<double>(this->settings->lineThickness()));
76 this->ui.lineAntiAliasing->setChecked(this->settings->lineAntiAliasing());
75 } 77 }
76 78
77 void SettingsEditor::setCurrentLanguage(const QString& localeCode) 79 void SettingsEditor::setCurrentLanguage(const QString& localeCode)
78 { 80 {
79 for (int i = 0; i < this->ui.language->count(); i += 1) 81 for (int i = 0; i < this->ui.language->count(); i += 1)

mercurial