38 void SettingsEditor::handleAccepted() |
38 void SettingsEditor::handleAccepted() |
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->librariesEditor.saveSettings(this->settings); |
44 this->librariesEditor.saveSettings(this->settings); |
44 } |
45 } |
45 |
46 |
46 void SettingsEditor::loadLocales() |
47 void SettingsEditor::loadLocales() |
47 { |
48 { |
68 void SettingsEditor::setDefaults() |
69 void SettingsEditor::setDefaults() |
69 { |
70 { |
70 this->setCurrentLanguage(this->settings->locale()); |
71 this->setCurrentLanguage(this->settings->locale()); |
71 this->ui.mainColorButton->setSelectedColor(this->settings->mainColor()); |
72 this->ui.mainColorButton->setSelectedColor(this->settings->mainColor()); |
72 this->ui.backgroundColorButton->setSelectedColor(this->settings->backgroundColor()); |
73 this->ui.backgroundColorButton->setSelectedColor(this->settings->backgroundColor()); |
|
74 this->ui.lineThickness->setValue(static_cast<double>(this->settings->lineThickness())); |
73 } |
75 } |
74 |
76 |
75 void SettingsEditor::setCurrentLanguage(const QString& localeCode) |
77 void SettingsEditor::setCurrentLanguage(const QString& localeCode) |
76 { |
78 { |
77 for (int i = 0; i < this->ui.language->count(); i += 1) |
79 for (int i = 0; i < this->ui.language->count(); i += 1) |