1
/***************************************************************************
2
* Copyright (c) 2020 FreeCAD Developers *
3
* Author: Uwe Stöhr <uwestoehr@lyx.org> *
4
* Based on src/Mod/FEM/Gui/DlgSettingsFEMImp.cpp *
6
* This file is part of the FreeCAD CAx development system. *
8
* This library is free software; you can redistribute it and/or *
9
* modify it under the terms of the GNU Library General Public *
10
* License as published by the Free Software Foundation; either *
11
* version 2 of the License, or (at your option) any later version. *
13
* This library is distributed in the hope that it will be useful, *
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
16
* GNU Library General Public License for more details. *
18
* You should have received a copy of the GNU Library General Public *
19
* License along with this library; see the file COPYING.LIB. If not, *
20
* write to the Free Software Foundation, Inc., 59 Temple Place, *
21
* Suite 330, Boston, MA 02111-1307, USA *
23
***************************************************************************/
25
#include "PreCompiled.h"
27
#include "DlgPrefsTechDrawColorsImp.h"
28
#include "ui_DlgPrefsTechDrawColors.h"
31
using namespace TechDrawGui;
33
DlgPrefsTechDrawColorsImp::DlgPrefsTechDrawColorsImp( QWidget* parent )
34
: PreferencePage( parent )
35
, ui(new Ui_DlgPrefsTechDrawColorsImp)
40
DlgPrefsTechDrawColorsImp::~DlgPrefsTechDrawColorsImp()
42
// no need to delete child widgets, Qt does it all for us
45
void DlgPrefsTechDrawColorsImp::saveSettings()
47
ui->pcbDimColor->onSave();
48
ui->pcb_Hatch->onSave();
49
ui->pcb_Background->onSave();
50
ui->pcb_PreSelect->onSave();
51
ui->pcb_Hidden->onSave();
52
ui->pcb_Select->onSave();
53
ui->pcb_Normal->onSave();
54
ui->pcb_Surface->onSave();
55
ui->pcb_GeomHatch->onSave();
56
ui->pcb_Face->onSave();
57
ui->pcb_PaintFaces->onSave();
58
ui->pcbSectionLine->onSave();
59
ui->pcbCenterColor->onSave();
60
ui->pcbVertexColor->onSave();
61
ui->pcbMarkup->onSave();
62
ui->pcbHighlight->onSave();
63
ui->pcb_Grid->onSave();
64
ui->pcbPageColor->onSave();
65
ui->pcbLightOnDark->onSave();
66
ui->pcbMonochrome->onSave();
67
ui->pcbLightTextColor->onSave();
68
ui->pcbUnderline->onSave();
71
void DlgPrefsTechDrawColorsImp::loadSettings()
73
ui->pcbDimColor->onRestore();
74
ui->pcb_Hatch->onRestore();
75
ui->pcb_Background->onRestore();
76
ui->pcb_PreSelect->onRestore();
77
ui->pcb_Hidden->onRestore();
78
ui->pcb_Select->onRestore();
79
ui->pcb_Normal->onRestore();
80
ui->pcb_Surface->onRestore();
81
ui->pcb_GeomHatch->onRestore();
82
ui->pcb_Face->onRestore();
83
ui->pcb_PaintFaces->onRestore();
84
ui->pcbSectionLine->onRestore();
85
ui->pcbCenterColor->onRestore();
86
ui->pcbVertexColor->onRestore();
87
ui->pcbMarkup->onRestore();
88
ui->pcbHighlight->onRestore();
89
ui->pcb_Grid->onRestore();
90
ui->pcbPageColor->onRestore();
91
ui->pcbLightOnDark->onRestore();
92
ui->pcbMonochrome->onRestore();
93
ui->pcbLightTextColor->onRestore();
94
ui->pcbUnderline->onRestore();
98
* Sets the strings of the subwidgets using the current language.
100
void DlgPrefsTechDrawColorsImp::changeEvent(QEvent *e)
102
if (e->type() == QEvent::LanguageChange) {
104
ui->retranslateUi(this);
108
QWidget::changeEvent(e);
112
#include <Mod/TechDraw/Gui/moc_DlgPrefsTechDrawColorsImp.cpp>