25
#include "PreCompiled.h"
27
#include "DlgPrefsTechDrawGeneralImp.h"
28
#include "ui_DlgPrefsTechDrawGeneral.h"
29
#include "PreferencesGui.h"
30
#include "DrawGuiUtil.h"
33
using namespace TechDrawGui;
34
using namespace TechDraw;
36
DlgPrefsTechDrawGeneralImp::DlgPrefsTechDrawGeneralImp( QWidget* parent )
37
: PreferencePage( parent )
38
, ui(new Ui_DlgPrefsTechDrawGeneralImp)
41
ui->plsb_LabelSize->setUnit(Base::Unit::Length);
42
ui->plsb_LabelSize->setMinimum(0);
44
ui->psb_GridSpacing->setUnit(Base::Unit::Length);
45
ui->psb_GridSpacing->setMinimum(0);
48
DlgPrefsTechDrawGeneralImp::~DlgPrefsTechDrawGeneralImp()
53
void DlgPrefsTechDrawGeneralImp::saveSettings()
55
ui->cb_Global->onSave();
56
ui->cb_Override->onSave();
57
ui->cb_PageUpdate->onSave();
58
ui->cb_AutoDist->onSave();
60
ui->pfb_LabelFont->onSave();
61
ui->plsb_LabelSize->onSave();
63
ui->cbProjAngle->onSave();
64
ui->cbSectionLineStd->onSave();
66
ui->pfc_DefTemp->onSave();
67
ui->pfc_DefDir->onSave();
68
ui->pfc_HatchFile->onSave();
69
ui->pfc_LineGroup->onSave();
70
ui->pfc_Welding->onSave();
71
ui->pfc_FilePattern->onSave();
72
ui->le_NamePattern->onSave();
73
ui->cb_ShowGrid->onSave();
74
ui->psb_GridSpacing->onSave();
76
ui->cbMultiSelection->onSave();
79
void DlgPrefsTechDrawGeneralImp::loadSettings()
81
ui->cb_Global->onRestore();
82
ui->cb_Override->onRestore();
83
ui->cb_PageUpdate->onRestore();
84
ui->cb_AutoDist->onRestore();
86
double labelDefault = Preferences::labelFontSizeMM();
87
ui->plsb_LabelSize->setValue(labelDefault);
88
QFont prefFont(Preferences::labelFontQString());
89
ui->pfb_LabelFont->setCurrentFont(prefFont);
92
ui->pfb_LabelFont->onRestore();
93
ui->plsb_LabelSize->onRestore();
95
ui->cbProjAngle->onRestore();
96
ui->cbSectionLineStd->onRestore();
98
ui->pfc_DefTemp->onRestore();
99
ui->pfc_DefDir->onRestore();
100
ui->pfc_HatchFile->onRestore();
101
ui->pfc_LineGroup->onRestore();
102
ui->pfc_Welding->onRestore();
103
ui->pfc_FilePattern->onRestore();
104
ui->le_NamePattern->onRestore();
106
bool gridDefault = PreferencesGui::showGrid();
107
ui->cb_ShowGrid->setChecked(gridDefault);
108
ui->cb_ShowGrid->onRestore();
110
double spacingDefault = PreferencesGui::gridSpacing();
111
ui->psb_GridSpacing->setValue(spacingDefault);
112
ui->psb_GridSpacing->onRestore();
114
bool multiSelectionDefault = PreferencesGui::multiSelection();
115
ui->cbMultiSelection->setChecked(multiSelectionDefault);
116
ui->cbMultiSelection->onRestore();
122
void DlgPrefsTechDrawGeneralImp::changeEvent(QEvent *e)
124
if (e->type() == QEvent::LanguageChange) {
126
ui->retranslateUi(this);
130
QWidget::changeEvent(e);
134
#include <Mod/TechDraw/Gui/moc_DlgPrefsTechDrawGeneralImp.cpp>