[TD] cleanup preferences
as discussed here: https://forum.freecadweb.org/viewtopic.php?f=35&t=53680&p=461356#p461349 * change default tolerance scale to 0.8 * the tolerance scale is directly applied, thus it must have non-italic label * move tolerance scale to "Dimensions" tab * move Fuzz settings to "Advanced" tab * move Conventions to General tab since e.g. the projection angle is an important general setting * add a note for the label font that this is also used for dimensions and that it there only has an effect for new ones * use more useful step size of 0.1 for some scaling spinboxes * sort UI fields in the C++ code to avoid doubled or missing entries (there were 2 doubled entries) * uniform width of all preferences dialogs * better alignment for the HLR dialog
This commit is contained in:
@@ -53,54 +53,59 @@ DlgPrefsTechDrawGeneralImp::~DlgPrefsTechDrawGeneralImp()
|
||||
|
||||
void DlgPrefsTechDrawGeneralImp::saveSettings()
|
||||
{
|
||||
ui->pfc_DefTemp->onSave();
|
||||
ui->pfc_DefDir->onSave();
|
||||
ui->pfc_HatchFile->onSave();
|
||||
ui->pfc_FilePattern->onSave();
|
||||
ui->pfc_LineGroup->onSave();
|
||||
ui->pfc_Welding->onSave();
|
||||
ui->le_NamePattern->onSave();
|
||||
|
||||
ui->pfb_LabelFont->onSave();
|
||||
ui->plsb_LabelSize->onSave();
|
||||
|
||||
ui->cb_Global->onSave();
|
||||
ui->cb_Override->onSave();
|
||||
ui->cb_PageUpdate->onSave();
|
||||
ui->cb_AutoDist->onSave();
|
||||
|
||||
ui->pfb_LabelFont->onSave();
|
||||
ui->plsb_LabelSize->onSave();
|
||||
|
||||
ui->cbProjAngle->onSave();
|
||||
ui->cbHiddenLineStyle->onSave();
|
||||
|
||||
ui->pfc_DefTemp->onSave();
|
||||
ui->pfc_DefDir->onSave();
|
||||
ui->pfc_HatchFile->onSave();
|
||||
ui->pfc_LineGroup->onSave();
|
||||
ui->pfc_Welding->onSave();
|
||||
ui->pfc_FilePattern->onSave();
|
||||
ui->le_NamePattern->onSave();
|
||||
}
|
||||
|
||||
void DlgPrefsTechDrawGeneralImp::loadSettings()
|
||||
{
|
||||
// double labelDefault = 8.0;
|
||||
double labelDefault = Preferences::labelFontSizeMM();
|
||||
ui->plsb_LabelSize->setValue(labelDefault);
|
||||
QFont prefFont(Preferences::labelFontQString());
|
||||
ui->pfb_LabelFont->setCurrentFont(prefFont);
|
||||
// ui->pfb_LabelFont->setCurrentText(Preferences::labelFontQString()); //only works in Qt5
|
||||
|
||||
ui->pfc_DefTemp->setFileName(Preferences::defaultTemplate());
|
||||
ui->pfc_DefDir->setFileName(Preferences::defaultTemplateDir());
|
||||
ui->pfc_HatchFile->setFileName(QString::fromStdString(DrawHatch::prefSvgHatch()));
|
||||
ui->pfc_FilePattern->setFileName(QString::fromStdString(DrawGeomHatch::prefGeomHatchFile()));
|
||||
ui->pfc_Welding->setFileName(PreferencesGui::weldingDirectory());
|
||||
ui->pfc_LineGroup->setFileName(QString::fromUtf8(Preferences::lineGroupFile().c_str()));
|
||||
|
||||
ui->pfc_DefTemp->onRestore();
|
||||
ui->pfc_DefDir->onRestore();
|
||||
ui->pfc_HatchFile->onRestore();
|
||||
ui->pfc_FilePattern->onRestore();
|
||||
ui->pfc_LineGroup->onRestore();
|
||||
ui->pfc_Welding->onRestore();
|
||||
ui->le_NamePattern->onRestore();
|
||||
|
||||
ui->pfb_LabelFont->onRestore();
|
||||
ui->plsb_LabelSize->onRestore();
|
||||
|
||||
ui->cb_Global->onRestore();
|
||||
ui->cb_Override->onRestore();
|
||||
ui->cb_PageUpdate->onRestore();
|
||||
ui->cb_AutoDist->onRestore();
|
||||
|
||||
double labelDefault = Preferences::labelFontSizeMM();
|
||||
ui->plsb_LabelSize->setValue(labelDefault);
|
||||
QFont prefFont(Preferences::labelFontQString());
|
||||
ui->pfb_LabelFont->setCurrentFont(prefFont);
|
||||
// ui->pfb_LabelFont->setCurrentText(Preferences::labelFontQString()); //only works in Qt5
|
||||
|
||||
ui->pfb_LabelFont->onRestore();
|
||||
ui->plsb_LabelSize->onRestore();
|
||||
|
||||
ui->cbProjAngle->onRestore();
|
||||
ui->cbHiddenLineStyle->onRestore();
|
||||
|
||||
ui->pfc_DefTemp->setFileName(Preferences::defaultTemplate());
|
||||
ui->pfc_DefDir->setFileName(Preferences::defaultTemplateDir());
|
||||
ui->pfc_HatchFile->setFileName(QString::fromStdString(DrawHatch::prefSvgHatch()));
|
||||
ui->pfc_LineGroup->setFileName(QString::fromUtf8(Preferences::lineGroupFile().c_str()));
|
||||
ui->pfc_Welding->setFileName(PreferencesGui::weldingDirectory());
|
||||
ui->pfc_FilePattern->setFileName(QString::fromStdString(DrawGeomHatch::prefGeomHatchFile()));
|
||||
|
||||
ui->pfc_DefTemp->onRestore();
|
||||
ui->pfc_DefDir->onRestore();
|
||||
ui->pfc_HatchFile->onRestore();
|
||||
ui->pfc_LineGroup->onRestore();
|
||||
ui->pfc_Welding->onRestore();
|
||||
ui->pfc_FilePattern->onRestore();
|
||||
ui->le_NamePattern->onRestore();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user