[TD]Centralize preference getters

This commit is contained in:
wandererfan
2020-04-12 20:44:08 -04:00
committed by WandererFan
parent a6cfe5c47f
commit a3029fec74
61 changed files with 881 additions and 501 deletions

View File

@@ -39,6 +39,7 @@
#include <Mod/TechDraw/App/ArrowPropEnum.h>
#include "Rez.h"
#include "PreferencesGui.h"
#include "QGIArrow.h"
using namespace TechDrawGui;
@@ -310,19 +311,12 @@ QPainterPath QGIArrow::makePyramid(Base::Vector3d dir, double length)
int QGIArrow::getPrefArrowStyle()
{
Base::Reference<ParameterGrp> hGrp = App::GetApplication().GetUserParameter().
GetGroup("BaseApp")->GetGroup("Preferences")->
GetGroup("Mod/TechDraw/Dimensions");
int style = hGrp->GetInt("ArrowStyle", 0);
return style;
return PreferencesGui::dimArrowStyle();
}
double QGIArrow::getPrefArrowSize()
{
Base::Reference<ParameterGrp> hGrp = App::GetApplication().GetUserParameter().
GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/TechDraw/Dimensions");
double style = hGrp->GetFloat("ArrowSize", 3.5);
return style;
return PreferencesGui::dimArrowSize();
}
double QGIArrow::getOverlapAdjust(int style, double size)