23
#include "PreCompiled.h"
25
#include "DlgSettingsObjectColor.h"
26
#include "ui_DlgSettingsObjectColor.h"
29
using namespace PartGui;
37
DlgSettingsObjectColor::DlgSettingsObjectColor(QWidget* parent)
38
: PreferencePage(parent)
39
, ui(new Ui_DlgSettingsObjectColor)
42
ui->DefaultShapeColor->setDisabled(ui->checkRandomColor->isChecked());
48
DlgSettingsObjectColor::~DlgSettingsObjectColor() = default;
50
void DlgSettingsObjectColor::saveSettings()
53
ui->DefaultShapeColor->onSave();
54
ui->DefaultAmbientColor->onSave();
55
ui->DefaultEmissiveColor->onSave();
56
ui->DefaultSpecularColor->onSave();
57
ui->checkRandomColor->onSave();
58
ui->DefaultShapeTransparency->onSave();
59
ui->DefaultShapeShininess->onSave();
60
ui->DefaultShapeLineColor->onSave();
61
ui->DefaultShapeLineWidth->onSave();
62
ui->DefaultShapeVertexColor->onSave();
63
ui->DefaultShapeVertexSize->onSave();
64
ui->BoundingBoxColor->onSave();
65
ui->BoundingBoxFontSize->onSave();
66
ui->twosideRendering->onSave();
68
ui->AnnotationTextColor->onSave();
71
void DlgSettingsObjectColor::loadSettings()
74
ui->DefaultShapeColor->onRestore();
75
ui->DefaultAmbientColor->onRestore();
76
ui->DefaultEmissiveColor->onRestore();
77
ui->DefaultSpecularColor->onRestore();
78
ui->checkRandomColor->onRestore();
79
ui->DefaultShapeTransparency->onRestore();
80
ui->DefaultShapeShininess->onRestore();
81
ui->DefaultShapeLineColor->onRestore();
82
ui->DefaultShapeLineWidth->onRestore();
83
ui->DefaultShapeVertexColor->onRestore();
84
ui->DefaultShapeVertexSize->onRestore();
85
ui->BoundingBoxColor->onRestore();
86
ui->BoundingBoxFontSize->onRestore();
87
ui->twosideRendering->onRestore();
89
ui->AnnotationTextColor->onRestore();
95
void DlgSettingsObjectColor::changeEvent(QEvent *e)
97
if (e->type() == QEvent::LanguageChange) {
98
ui->retranslateUi(this);
101
QWidget::changeEvent(e);
105
#include "moc_DlgSettingsObjectColor.cpp"