src/settingseditor/settingseditor.cpp

changeset 237
10a6298f636f
parent 218
63125c36de73
child 256
c6f5de03dc0f
equal deleted inserted replaced
236:1fa0e1de9f0a 237:10a6298f636f
43 setSetting<Setting::MainColor>(this->ui.mainColorButton->selectedColor()); 43 setSetting<Setting::MainColor>(this->ui.mainColorButton->selectedColor());
44 setSetting<Setting::BackgroundColor>(this->ui.backgroundColorButton->selectedColor()); 44 setSetting<Setting::BackgroundColor>(this->ui.backgroundColorButton->selectedColor());
45 setSetting<Setting::SelectedColor>(this->ui.selectedColorButton->selectedColor()); 45 setSetting<Setting::SelectedColor>(this->ui.selectedColorButton->selectedColor());
46 setSetting<Setting::LineThickness>(static_cast<GLfloat>(this->ui.lineThickness->value())); 46 setSetting<Setting::LineThickness>(static_cast<GLfloat>(this->ui.lineThickness->value()));
47 setSetting<Setting::LineAntiAliasing>(this->ui.lineAntiAliasing->isChecked()); 47 setSetting<Setting::LineAntiAliasing>(this->ui.lineAntiAliasing->isChecked());
48 setSetting<Setting::LogOpenGLDebugMessages>(this->ui.logOpenGLDebugMessages->isChecked());
48 const int viewMode = this->ui.viewModeButtonGroup->checkedId(); 49 const int viewMode = this->ui.viewModeButtonGroup->checkedId();
49 if (viewMode != -1) { 50 if (viewMode != -1) {
50 setSetting<Setting::ViewMode>(static_cast<QMdiArea::ViewMode>(viewMode)); 51 setSetting<Setting::ViewMode>(static_cast<QMdiArea::ViewMode>(viewMode));
51 } 52 }
52 this->librariesEditor.saveSettings(); 53 this->librariesEditor.saveSettings();
80 this->ui.mainColorButton->setSelectedColor(setting<Setting::MainColor>()); 81 this->ui.mainColorButton->setSelectedColor(setting<Setting::MainColor>());
81 this->ui.backgroundColorButton->setSelectedColor(setting<Setting::BackgroundColor>()); 82 this->ui.backgroundColorButton->setSelectedColor(setting<Setting::BackgroundColor>());
82 this->ui.selectedColorButton->setSelectedColor(setting<Setting::SelectedColor>()); 83 this->ui.selectedColorButton->setSelectedColor(setting<Setting::SelectedColor>());
83 this->ui.lineThickness->setValue(double_cast(setting<Setting::LineThickness>())); 84 this->ui.lineThickness->setValue(double_cast(setting<Setting::LineThickness>()));
84 this->ui.lineAntiAliasing->setChecked(setting<Setting::LineAntiAliasing>()); 85 this->ui.lineAntiAliasing->setChecked(setting<Setting::LineAntiAliasing>());
86 this->ui.logOpenGLDebugMessages->setChecked(setting<Setting::LogOpenGLDebugMessages>());
85 auto* const viewModeButton = this->ui.viewModeButtonGroup->button(setting<Setting::ViewMode>()); 87 auto* const viewModeButton = this->ui.viewModeButtonGroup->button(setting<Setting::ViewMode>());
86 if (viewModeButton != nullptr) { 88 if (viewModeButton != nullptr) {
87 viewModeButton->setChecked(true); 89 viewModeButton->setChecked(true);
88 } 90 }
89 } 91 }

mercurial