[TD]common preference getters for hatches
This commit is contained in:
@@ -627,6 +627,15 @@ std::string DrawGeomHatch::prefGeomHatchName()
|
||||
return result;
|
||||
}
|
||||
|
||||
App::Color DrawGeomHatch::prefGeomHatchColor()
|
||||
{
|
||||
Base::Reference<ParameterGrp> hGrp = App::GetApplication().GetUserParameter()
|
||||
.GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/TechDraw/Colors");
|
||||
App::Color fcColor;
|
||||
fcColor.setPackedValue(hGrp->GetUnsigned("GeomHatch", 0x00FF0000));
|
||||
return fcColor;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Python Drawing feature ---------------------------------------------------------
|
||||
|
||||
@@ -23,9 +23,10 @@
|
||||
#ifndef _TechDraw_DrawGeomHatch_h_
|
||||
#define _TechDraw_DrawGeomHatch_h_
|
||||
|
||||
# include <App/DocumentObject.h>
|
||||
# include <App/FeaturePython.h>
|
||||
# include <App/PropertyLinks.h>
|
||||
#include <App/DocumentObject.h>
|
||||
#include <App/FeaturePython.h>
|
||||
#include <App/Material.h>
|
||||
#include <App/PropertyLinks.h>
|
||||
#include <App/PropertyFile.h>
|
||||
|
||||
class TopoDS_Edge;
|
||||
@@ -80,6 +81,8 @@ public:
|
||||
static TopoDS_Face extractFace(DrawViewPart* source, int iface );
|
||||
static std::string prefGeomHatchFile(void);
|
||||
static std::string prefGeomHatchName();
|
||||
static App::Color prefGeomHatchColor();
|
||||
|
||||
|
||||
protected:
|
||||
virtual void onDocumentRestored() override;
|
||||
|
||||
@@ -261,7 +261,7 @@ void DrawHatch::unsetupObject(void)
|
||||
App::DocumentObject::unsetupObject();
|
||||
}
|
||||
|
||||
//standard preference getter
|
||||
//standard preference getters
|
||||
std::string DrawHatch::prefSvgHatch(void)
|
||||
{
|
||||
Base::Reference<ParameterGrp> hGrp = App::GetApplication().GetUserParameter()
|
||||
@@ -273,6 +273,16 @@ std::string DrawHatch::prefSvgHatch(void)
|
||||
return result;
|
||||
}
|
||||
|
||||
App::Color DrawHatch::prefSvgHatchColor(void)
|
||||
{
|
||||
Base::Reference<ParameterGrp> hGrp = App::GetApplication().GetUserParameter()
|
||||
.GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/TechDraw/Colors");
|
||||
App::Color fcColor;
|
||||
fcColor.setPackedValue(hGrp->GetUnsigned("Hatch", 0x00FF0000));
|
||||
return fcColor;
|
||||
}
|
||||
|
||||
|
||||
// Python Drawing feature ---------------------------------------------------------
|
||||
|
||||
namespace App {
|
||||
|
||||
@@ -23,9 +23,10 @@
|
||||
#ifndef _TechDraw_DrawHatch_h_
|
||||
#define _TechDraw_DrawHatch_h_
|
||||
|
||||
# include <App/DocumentObject.h>
|
||||
# include <App/FeaturePython.h>
|
||||
# include <App/PropertyLinks.h>
|
||||
#include <App/DocumentObject.h>
|
||||
#include <App/FeaturePython.h>
|
||||
#include <App/Material.h>
|
||||
#include <App/PropertyLinks.h>
|
||||
#include <App/PropertyFile.h>
|
||||
|
||||
namespace TechDraw
|
||||
@@ -62,7 +63,8 @@ public:
|
||||
bool empty(void);
|
||||
static bool faceIsHatched(int i,std::vector<TechDraw::DrawHatch*> hatchObjs);
|
||||
static std::string prefSvgHatch(void);
|
||||
|
||||
static App::Color prefSvgHatchColor(void);
|
||||
|
||||
protected:
|
||||
void onChanged(const App::Property* prop) override;
|
||||
virtual void onDocumentRestored() override;
|
||||
|
||||
Reference in New Issue
Block a user