[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

@@ -32,10 +32,12 @@
#include <Base/Console.h>
#include <Base/Parameter.h>
//#include <Mod/TechDraw/App/Preferences.h>
#include <Mod/TechDraw/App/DrawUtil.h>
#include <qmath.h>
#include "Rez.h"
#include "PreferencesGui.h"
#include "QGIView.h"
#include "QGISectionLine.h"
@@ -282,10 +284,7 @@ void QGISectionLine::setSectionColor(QColor c)
QColor QGISectionLine::getSectionColor()
{
Base::Reference<ParameterGrp> hGrp = App::GetApplication().GetUserParameter()
.GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/TechDraw/Decorations");
App::Color fcColor = App::Color((uint32_t) hGrp->GetUnsigned("SectionColor", 0x00000000));
return fcColor.asValue<QColor>();
return PreferencesGui::sectionLineQColor();
}
//SectionLineStyle
@@ -297,10 +296,7 @@ void QGISectionLine::setSectionStyle(int style)
Qt::PenStyle QGISectionLine::getSectionStyle()
{
Base::Reference<ParameterGrp> hGrp = App::GetApplication().GetUserParameter().GetGroup("BaseApp")->
GetGroup("Preferences")->GetGroup("Mod/TechDraw/Decorations");
Qt::PenStyle sectStyle = static_cast<Qt::PenStyle> (hGrp->GetInt("SectionLine", 2));
return sectStyle;
return PreferencesGui::sectionLineStyle();
}
//ASME("traditional") vs ISO("reference arrow method") arrows