35 } |
35 } |
36 |
36 |
37 void SettingsEditor::handleAccepted() |
37 void SettingsEditor::handleAccepted() |
38 { |
38 { |
39 this->settings->setValue("locale", this->ui.language->currentData().toString()); |
39 this->settings->setValue("locale", this->ui.language->currentData().toString()); |
|
40 this->settings->setValue("Render/MainColor", this->ui.mainColorButton->selectedColor().name()); |
40 this->librariesEditor.saveSettings(this->settings); |
41 this->librariesEditor.saveSettings(this->settings); |
41 } |
42 } |
42 |
43 |
43 void SettingsEditor::loadLocales() |
44 void SettingsEditor::loadLocales() |
44 { |
45 { |
63 } |
64 } |
64 |
65 |
65 void SettingsEditor::setDefaults() |
66 void SettingsEditor::setDefaults() |
66 { |
67 { |
67 this->setCurrentLanguage(this->settings->value("locale", QLocale::system().name()).toString()); |
68 this->setCurrentLanguage(this->settings->value("locale", QLocale::system().name()).toString()); |
|
69 this->ui.mainColorButton->setSelectedColor(this->settings->value("Render/MainColor").toString()); |
68 } |
70 } |
69 |
71 |
70 void SettingsEditor::setCurrentLanguage(const QString& localeCode) |
72 void SettingsEditor::setCurrentLanguage(const QString& localeCode) |
71 { |
73 { |
72 for (int i = 0; i < this->ui.language->count(); i += 1) |
74 for (int i = 0; i < this->ui.language->count(); i += 1) |