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->setSelectedColor(this->ui.selectedColorButton->selectedColor()); |
43 this->settings->setLineThickness(static_cast<GLfloat>(this->ui.lineThickness->value())); |
44 this->settings->setLineThickness(static_cast<GLfloat>(this->ui.lineThickness->value())); |
44 this->settings->setLineAntiAliasing(this->ui.lineAntiAliasing->isChecked()); |
45 this->settings->setLineAntiAliasing(this->ui.lineAntiAliasing->isChecked()); |
45 this->librariesEditor.saveSettings(this->settings); |
46 this->librariesEditor.saveSettings(this->settings); |
46 } |
47 } |
47 |
48 |
70 void SettingsEditor::setDefaults() |
71 void SettingsEditor::setDefaults() |
71 { |
72 { |
72 this->setCurrentLanguage(this->settings->locale()); |
73 this->setCurrentLanguage(this->settings->locale()); |
73 this->ui.mainColorButton->setSelectedColor(this->settings->mainColor()); |
74 this->ui.mainColorButton->setSelectedColor(this->settings->mainColor()); |
74 this->ui.backgroundColorButton->setSelectedColor(this->settings->backgroundColor()); |
75 this->ui.backgroundColorButton->setSelectedColor(this->settings->backgroundColor()); |
|
76 this->ui.selectedColorButton->setSelectedColor(this->settings->selectedColor()); |
75 this->ui.lineThickness->setValue(static_cast<double>(this->settings->lineThickness())); |
77 this->ui.lineThickness->setValue(static_cast<double>(this->settings->lineThickness())); |
76 this->ui.lineAntiAliasing->setChecked(this->settings->lineAntiAliasing()); |
78 this->ui.lineAntiAliasing->setChecked(this->settings->lineAntiAliasing()); |
77 } |
79 } |
78 |
80 |
79 void SettingsEditor::setCurrentLanguage(const QString& localeCode) |
81 void SettingsEditor::setCurrentLanguage(const QString& localeCode) |