[TechDraw] Simplify retrievement of user preferences
for all TechDraw files
This commit is contained in:
committed by
WandererFan
parent
50c2b7e9d8
commit
5d05acc87e
@@ -29,13 +29,14 @@
|
||||
# include <QStyleOptionGraphicsItem>
|
||||
#endif
|
||||
|
||||
#include <App/Application.h>
|
||||
#include <Base/Parameter.h>
|
||||
#include <Mod/TechDraw/App/Preferences.h>
|
||||
|
||||
#include "QGICenterLine.h"
|
||||
#include "PreferencesGui.h"
|
||||
|
||||
|
||||
using namespace TechDraw;
|
||||
using namespace TechDrawGui;
|
||||
|
||||
QGICenterLine::QGICenterLine()
|
||||
@@ -77,9 +78,7 @@ QColor QGICenterLine::getCenterColor()
|
||||
|
||||
Qt::PenStyle QGICenterLine::getCenterStyle()
|
||||
{
|
||||
Base::Reference<ParameterGrp> hGrp = App::GetApplication().GetUserParameter().GetGroup("BaseApp")->
|
||||
GetGroup("Preferences")->GetGroup("Mod/TechDraw/Decorations");
|
||||
Qt::PenStyle centerStyle = static_cast<Qt::PenStyle> (hGrp->GetInt("CenterLine", 2));
|
||||
Qt::PenStyle centerStyle = static_cast<Qt::PenStyle> (Preferences::getPreferenceGroup("Decorations")->GetInt("CenterLine", 2));
|
||||
return centerStyle;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user