From 84b858a1423b53b51cb318a93554d1ea452df993 Mon Sep 17 00:00:00 2001 From: WandererFan Date: Wed, 25 Jan 2017 18:36:33 -0500 Subject: [PATCH] fix naming conflicts --- src/Mod/TechDraw/App/AppTechDraw.cpp | 4 +- src/Mod/TechDraw/App/CMakeLists.txt | 10 ++-- src/Mod/TechDraw/App/DrawCrosshatchPyImp.cpp | 32 ----------- .../{DrawCrosshatch.cpp => DrawGeomHatch.cpp} | 54 +++++++++---------- .../App/{DrawCrosshatch.h => DrawGeomHatch.h} | 16 +++--- ...awCrosshatchPy.xml => DrawGeomHatchPy.xml} | 10 ++-- src/Mod/TechDraw/App/DrawGeomHatchPyImp.cpp | 32 +++++++++++ src/Mod/TechDraw/App/DrawViewPart.cpp | 12 ++--- src/Mod/TechDraw/App/DrawViewPart.h | 4 +- src/Mod/TechDraw/App/DrawViewSection.cpp | 6 +-- src/Mod/TechDraw/App/DrawViewSection.h | 2 +- src/Mod/TechDraw/Gui/AppTechDrawGui.cpp | 4 +- src/Mod/TechDraw/Gui/CMakeLists.txt | 4 +- src/Mod/TechDraw/Gui/CommandDecorate.cpp | 30 +++++------ src/Mod/TechDraw/Gui/QGIFace.cpp | 29 +++++----- src/Mod/TechDraw/Gui/QGIFace.h | 14 ++--- src/Mod/TechDraw/Gui/QGIViewPart.cpp | 36 ++++++------- src/Mod/TechDraw/Gui/QGIViewPart.h | 4 +- src/Mod/TechDraw/Gui/QGIViewSection.cpp | 4 +- src/Mod/TechDraw/Gui/Resources/TechDraw.qrc | 2 +- ...-crosshatch.svg => techdraw-geomhatch.svg} | 0 ...osshatch.cpp => ViewProviderGeomHatch.cpp} | 36 ++++++------- ...erCrosshatch.h => ViewProviderGeomHatch.h} | 12 ++--- src/Mod/TechDraw/Gui/ViewProviderViewPart.cpp | 6 +-- .../TechDraw/Gui/ViewProviderViewSection.cpp | 2 +- src/Mod/TechDraw/Gui/Workbench.cpp | 4 +- 26 files changed, 184 insertions(+), 185 deletions(-) delete mode 100644 src/Mod/TechDraw/App/DrawCrosshatchPyImp.cpp rename src/Mod/TechDraw/App/{DrawCrosshatch.cpp => DrawGeomHatch.cpp} (88%) rename src/Mod/TechDraw/App/{DrawCrosshatch.h => DrawGeomHatch.h} (89%) rename src/Mod/TechDraw/App/{DrawCrosshatchPy.xml => DrawGeomHatchPy.xml} (76%) create mode 100644 src/Mod/TechDraw/App/DrawGeomHatchPyImp.cpp rename src/Mod/TechDraw/Gui/Resources/icons/actions/{techdraw-crosshatch.svg => techdraw-geomhatch.svg} (100%) rename src/Mod/TechDraw/Gui/{ViewProviderCrosshatch.cpp => ViewProviderGeomHatch.cpp} (80%) rename src/Mod/TechDraw/Gui/{ViewProviderCrosshatch.h => ViewProviderGeomHatch.h} (89%) diff --git a/src/Mod/TechDraw/App/AppTechDraw.cpp b/src/Mod/TechDraw/App/AppTechDraw.cpp index cac9175a1004..9f046d2ccc13 100644 --- a/src/Mod/TechDraw/App/AppTechDraw.cpp +++ b/src/Mod/TechDraw/App/AppTechDraw.cpp @@ -31,7 +31,7 @@ #include "DrawViewSymbol.h" #include "DrawViewClip.h" #include "DrawHatch.h" -#include "DrawCrosshatch.h" +#include "DrawGeomHatch.h" #include "DrawViewDraft.h" #include "DrawViewArch.h" #include "DrawViewSpreadsheet.h" @@ -85,7 +85,7 @@ PyMODINIT_FUNC initTechDraw() TechDraw::DrawViewClip ::init(); TechDraw::DrawHatch ::init(); - TechDraw::DrawCrosshatch ::init(); + TechDraw::DrawGeomHatch ::init(); TechDraw::DrawViewDraft ::init(); TechDraw::DrawViewArch ::init(); TechDraw::DrawViewImage ::init(); diff --git a/src/Mod/TechDraw/App/CMakeLists.txt b/src/Mod/TechDraw/App/CMakeLists.txt index ca75b172c5cc..6c04a17160e1 100644 --- a/src/Mod/TechDraw/App/CMakeLists.txt +++ b/src/Mod/TechDraw/App/CMakeLists.txt @@ -37,7 +37,7 @@ generate_from_xml(DrawViewSymbolPy) generate_from_xml(DrawViewClipPy) generate_from_xml(DrawViewDimensionPy) generate_from_xml(DrawHatchPy) -generate_from_xml(DrawCrosshatchPy) +generate_from_xml(DrawGeomHatchPy) generate_from_xml(DrawViewCollectionPy) generate_from_xml(DrawProjGroupPy) generate_from_xml(DrawProjGroupItemPy) @@ -75,8 +75,8 @@ SET(Draw_SRCS DrawViewSection.h DrawHatch.cpp DrawHatch.h - DrawCrosshatch.cpp - DrawCrosshatch.h + DrawGeomHatch.cpp + DrawGeomHatch.h DrawViewDraft.cpp DrawViewDraft.h DrawViewArch.cpp @@ -133,8 +133,8 @@ SET(Python_SRCS DrawViewDimensionPyImp.cpp DrawHatchPy.xml DrawHatchPyImp.cpp - DrawCrosshatchPy.xml - DrawCrosshatchPyImp.cpp + DrawGeomHatchPy.xml + DrawGeomHatchPyImp.cpp DrawViewCollectionPy.xml DrawViewCollectionPyImp.cpp DrawProjGroupPy.xml diff --git a/src/Mod/TechDraw/App/DrawCrosshatchPyImp.cpp b/src/Mod/TechDraw/App/DrawCrosshatchPyImp.cpp deleted file mode 100644 index 7074f2ea0e12..000000000000 --- a/src/Mod/TechDraw/App/DrawCrosshatchPyImp.cpp +++ /dev/null @@ -1,32 +0,0 @@ - -#include "PreCompiled.h" - -#include "DrawCrosshatch.h" - -// inclusion of the generated files (generated out of DrawCrosshatchPy.xml) -#include -#include - -using namespace TechDraw; - -// returns a string which represents the object e.g. when printed in python -std::string DrawCrosshatchPy::representation(void) const -{ - return std::string(""); -} - - - - - - - -PyObject *DrawCrosshatchPy::getCustomAttributes(const char* /*attr*/) const -{ - return 0; -} - -int DrawCrosshatchPy::setCustomAttributes(const char* /*attr*/, PyObject* /*obj*/) -{ - return 0; -} diff --git a/src/Mod/TechDraw/App/DrawCrosshatch.cpp b/src/Mod/TechDraw/App/DrawGeomHatch.cpp similarity index 88% rename from src/Mod/TechDraw/App/DrawCrosshatch.cpp rename to src/Mod/TechDraw/App/DrawGeomHatch.cpp index 9d0e64edea97..bb2d8eb0e965 100644 --- a/src/Mod/TechDraw/App/DrawCrosshatch.cpp +++ b/src/Mod/TechDraw/App/DrawGeomHatch.cpp @@ -65,39 +65,39 @@ #include "Geometry.h" #include "DrawViewPart.h" #include "DrawViewSection.h" -#include "DrawCrosshatch.h" +#include "DrawGeomHatch.h" -#include // generated from DrawCrosshatchPy.xml +#include // generated from DrawGeomHatchPy.xml using namespace TechDraw; using namespace TechDrawGeometry; using namespace std; -PROPERTY_SOURCE(TechDraw::DrawCrosshatch, App::DocumentObject) +PROPERTY_SOURCE(TechDraw::DrawGeomHatch, App::DocumentObject) -DrawCrosshatch::DrawCrosshatch(void) +DrawGeomHatch::DrawGeomHatch(void) { - static const char *vgroup = "Crosshatch"; + static const char *vgroup = "GeomHatch"; ADD_PROPERTY_TYPE(Source,(0),vgroup,(App::PropertyType)(App::Prop_None),"The View + Face to be crosshatched"); ADD_PROPERTY_TYPE(FilePattern ,(""),vgroup,App::Prop_None,"The crosshatch pattern file for this area"); ADD_PROPERTY_TYPE(NamePattern,(""),vgroup,App::Prop_None,"The name of the pattern"); - ADD_PROPERTY_TYPE(ScalePattern,(1.0),vgroup,App::Prop_None,"Crosshatch pattern size adjustment"); + ADD_PROPERTY_TYPE(ScalePattern,(1.0),vgroup,App::Prop_None,"GeomHatch pattern size adjustment"); getParameters(); } -DrawCrosshatch::~DrawCrosshatch() +DrawGeomHatch::~DrawGeomHatch() { } -void DrawCrosshatch::onChanged(const App::Property* prop) +void DrawGeomHatch::onChanged(const App::Property* prop) { if (prop == &Source ) { if (!isRestoring()) { - DrawCrosshatch::execute(); + DrawGeomHatch::execute(); } } @@ -120,7 +120,7 @@ void DrawCrosshatch::onChanged(const App::Property* prop) App::DocumentObject::onChanged(prop); } -short DrawCrosshatch::mustExecute() const +short DrawGeomHatch::mustExecute() const { short result = 0; if (!isRestoring()) { @@ -136,20 +136,20 @@ short DrawCrosshatch::mustExecute() const } -App::DocumentObjectExecReturn *DrawCrosshatch::execute(void) +App::DocumentObjectExecReturn *DrawGeomHatch::execute(void) { return App::DocumentObject::StdReturn; } -DrawViewPart* DrawCrosshatch::getSourceView(void) const +DrawViewPart* DrawGeomHatch::getSourceView(void) const { App::DocumentObject* obj = Source.getValue(); DrawViewPart* result = dynamic_cast(obj); return result; } -std::vector DrawCrosshatch::getDecodedSpecsFromFile() +std::vector DrawGeomHatch::getDecodedSpecsFromFile() { std::string fileSpec = FilePattern.getValue(); std::string myPattern = NamePattern.getValue(); @@ -159,12 +159,12 @@ std::vector DrawCrosshatch::getDecodedSpecsFromFile() //!get all the specification lines and decode them into HatchLine structures /*static*/ -std::vector DrawCrosshatch::getDecodedSpecsFromFile(std::string fileSpec, std::string myPattern) +std::vector DrawGeomHatch::getDecodedSpecsFromFile(std::string fileSpec, std::string myPattern) { std::vector result; Base::FileInfo fi(fileSpec); if (!fi.isReadable()) { - Base::Console().Error("DrawCrosshatch::getDecodedSpecsFromFile not able to open %s!\n",fileSpec.c_str()); + Base::Console().Error("DrawGeomHatch::getDecodedSpecsFromFile not able to open %s!\n",fileSpec.c_str()); return result; } result = HatchLine::getSpecsForPattern(fileSpec,myPattern); @@ -172,7 +172,7 @@ std::vector DrawCrosshatch::getDecodedSpecsFromFile(std::string fileS return result; } -std::vector DrawCrosshatch::getDrawableLines(int i) //get the drawable lines for face i +std::vector DrawGeomHatch::getDrawableLines(int i) //get the drawable lines for face i { std::vector result; DrawViewPart* source = getSourceView(); @@ -185,7 +185,7 @@ std::vector DrawCrosshatch::getDrawableLines(int i) //get the drawab } /* static */ -std::vector DrawCrosshatch::getDrawableLines(DrawViewPart* source, std::vector lineSets, int iface, double scale ) +std::vector DrawGeomHatch::getDrawableLines(DrawViewPart* source, std::vector lineSets, int iface, double scale ) { std::vector result; @@ -230,7 +230,7 @@ std::vector DrawCrosshatch::getDrawableLines(DrawViewPart* source, std: for (auto& ls: lineSets) { HatchLine hl = ls.getHatchLine(); - std::vector candidates = DrawCrosshatch::makeEdgeOverlay(hl, bBox, scale); + std::vector candidates = DrawGeomHatch::makeEdgeOverlay(hl, bBox, scale); //make Compound for this linespec BRep_Builder builder; @@ -275,7 +275,7 @@ std::vector DrawCrosshatch::getDrawableLines(DrawViewPart* source, std: return result; } /* static */ -std::vector DrawCrosshatch::makeEdgeOverlay(HatchLine hl, Bnd_Box b, double scale) +std::vector DrawGeomHatch::makeEdgeOverlay(HatchLine hl, Bnd_Box b, double scale) { std::vector result; @@ -374,7 +374,7 @@ std::vector DrawCrosshatch::makeEdgeOverlay(HatchLine hl, Bnd_Box b return result; } -TopoDS_Edge DrawCrosshatch::makeLine(Base::Vector3d s, Base::Vector3d e) +TopoDS_Edge DrawGeomHatch::makeLine(Base::Vector3d s, Base::Vector3d e) { TopoDS_Edge result; gp_Pnt start(s.x,s.y,0.0); @@ -386,7 +386,7 @@ TopoDS_Edge DrawCrosshatch::makeLine(Base::Vector3d s, Base::Vector3d e) return result; } -void DrawCrosshatch::getParameters(void) +void DrawGeomHatch::getParameters(void) { //this is probably "/build/data/Mod/TechDraw/PAT" Base::Reference hGrp = App::GetApplication().GetUserParameter() @@ -410,10 +410,10 @@ void DrawCrosshatch::getParameters(void) } -PyObject *DrawCrosshatch::getPyObject(void) +PyObject *DrawGeomHatch::getPyObject(void) { if (PythonObject.is(Py::_None())) { - PythonObject = Py::Object(new DrawCrosshatchPy(this),true); + PythonObject = Py::Object(new DrawGeomHatchPy(this),true); } return Py::new_reference_to(PythonObject); } @@ -422,12 +422,12 @@ PyObject *DrawCrosshatch::getPyObject(void) namespace App { /// @cond DOXERR -PROPERTY_SOURCE_TEMPLATE(TechDraw::DrawCrosshatchPython, TechDraw::DrawCrosshatch) -template<> const char* TechDraw::DrawCrosshatchPython::getViewProviderName(void) const { - return "TechDrawGui::ViewProviderCrosshatch"; +PROPERTY_SOURCE_TEMPLATE(TechDraw::DrawGeomHatchPython, TechDraw::DrawGeomHatch) +template<> const char* TechDraw::DrawGeomHatchPython::getViewProviderName(void) const { + return "TechDrawGui::ViewProviderGeomHatch"; } /// @endcond // explicit template instantiation -template class TechDrawExport FeaturePythonT; +template class TechDrawExport FeaturePythonT; } diff --git a/src/Mod/TechDraw/App/DrawCrosshatch.h b/src/Mod/TechDraw/App/DrawGeomHatch.h similarity index 89% rename from src/Mod/TechDraw/App/DrawCrosshatch.h rename to src/Mod/TechDraw/App/DrawGeomHatch.h index 751104b52c85..767fb62910a7 100644 --- a/src/Mod/TechDraw/App/DrawCrosshatch.h +++ b/src/Mod/TechDraw/App/DrawGeomHatch.h @@ -20,8 +20,8 @@ * * ***************************************************************************/ -#ifndef _TechDraw_DrawCrosshatch_h_ -#define _TechDraw_DrawCrosshatch_h_ +#ifndef _TechDraw_DrawGeomHatch_h_ +#define _TechDraw_DrawGeomHatch_h_ # include # include @@ -43,13 +43,13 @@ class HatchLine; class LineSet; class DashSet; -class TechDrawExport DrawCrosshatch : public App::DocumentObject +class TechDrawExport DrawGeomHatch : public App::DocumentObject { - PROPERTY_HEADER(TechDraw::DrawCrosshatch); + PROPERTY_HEADER(TechDraw::DrawGeomHatch); public: - DrawCrosshatch(); - virtual ~DrawCrosshatch(); + DrawGeomHatch(); + virtual ~DrawGeomHatch(); App::PropertyLinkSub Source; //the dvX & face(s) this crosshatch belongs to App::PropertyFile FilePattern; @@ -60,7 +60,7 @@ class TechDrawExport DrawCrosshatch : public App::DocumentObject virtual App::DocumentObjectExecReturn *execute(void); virtual void onChanged(const App::Property* prop); virtual const char* getViewProviderName(void) const { - return "TechDrawGui::ViewProviderCrosshatch"; + return "TechDrawGui::ViewProviderGeomHatch"; } virtual PyObject *getPyObject(void); @@ -81,7 +81,7 @@ class TechDrawExport DrawCrosshatch : public App::DocumentObject private: }; -typedef App::FeaturePythonT DrawCrosshatchPython; +typedef App::FeaturePythonT DrawGeomHatchPython; diff --git a/src/Mod/TechDraw/App/DrawCrosshatchPy.xml b/src/Mod/TechDraw/App/DrawGeomHatchPy.xml similarity index 76% rename from src/Mod/TechDraw/App/DrawCrosshatchPy.xml rename to src/Mod/TechDraw/App/DrawGeomHatchPy.xml index ec5bf2c20e7e..8cedf84241e6 100644 --- a/src/Mod/TechDraw/App/DrawCrosshatchPy.xml +++ b/src/Mod/TechDraw/App/DrawGeomHatchPy.xml @@ -2,16 +2,16 @@ - Feature for creating and manipulating Technical Drawing Crosshatch areas + Feature for creating and manipulating Technical Drawing GeomHatch areas diff --git a/src/Mod/TechDraw/App/DrawGeomHatchPyImp.cpp b/src/Mod/TechDraw/App/DrawGeomHatchPyImp.cpp new file mode 100644 index 000000000000..327ae7052404 --- /dev/null +++ b/src/Mod/TechDraw/App/DrawGeomHatchPyImp.cpp @@ -0,0 +1,32 @@ + +#include "PreCompiled.h" + +#include "DrawGeomHatch.h" + +// inclusion of the generated files (generated out of DrawGeomHatchPy.xml) +#include +#include + +using namespace TechDraw; + +// returns a string which represents the object e.g. when printed in python +std::string DrawGeomHatchPy::representation(void) const +{ + return std::string(""); +} + + + + + + + +PyObject *DrawGeomHatchPy::getCustomAttributes(const char* /*attr*/) const +{ + return 0; +} + +int DrawGeomHatchPy::setCustomAttributes(const char* /*attr*/, PyObject* /*obj*/) +{ + return 0; +} diff --git a/src/Mod/TechDraw/App/DrawViewPart.cpp b/src/Mod/TechDraw/App/DrawViewPart.cpp index 64a9a34253fe..8bd9dfca76bb 100644 --- a/src/Mod/TechDraw/App/DrawViewPart.cpp +++ b/src/Mod/TechDraw/App/DrawViewPart.cpp @@ -89,7 +89,7 @@ #include "GeometryObject.h" #include "DrawViewPart.h" #include "DrawHatch.h" -#include "DrawCrosshatch.h" +#include "DrawGeomHatch.h" #include "EdgeWalker.h" @@ -409,14 +409,14 @@ std::vector DrawViewPart::getHatches() const return result; } -std::vector DrawViewPart::getCrosshatches() const +std::vector DrawViewPart::getGeomHatches() const { - std::vector result; + std::vector result; std::vector children = getInList(); for (std::vector::iterator it = children.begin(); it != children.end(); ++it) { - if ((*it)->getTypeId().isDerivedFrom(DrawCrosshatch::getClassTypeId())) { - TechDraw::DrawCrosshatch* cross = dynamic_cast(*it); - result.push_back(cross); + if ((*it)->getTypeId().isDerivedFrom(DrawGeomHatch::getClassTypeId())) { + TechDraw::DrawGeomHatch* geom = dynamic_cast(*it); + result.push_back(geom); } } return result; diff --git a/src/Mod/TechDraw/App/DrawViewPart.h b/src/Mod/TechDraw/App/DrawViewPart.h index e15a363fbd17..12fef1c53948 100644 --- a/src/Mod/TechDraw/App/DrawViewPart.h +++ b/src/Mod/TechDraw/App/DrawViewPart.h @@ -56,7 +56,7 @@ class Face; namespace TechDraw { class DrawHatch; -class DrawCrosshatch; +class DrawGeomHatch; class DrawProjectSplit; class DrawViewSection; } @@ -99,7 +99,7 @@ class TechDrawExport DrawViewPart : public DrawView std::vector getHatches(void) const; - std::vector getCrosshatches(void) const; + std::vector getGeomHatches(void) const; //TODO: are there use-cases for Python access to TechDrawGeometry??? diff --git a/src/Mod/TechDraw/App/DrawViewSection.cpp b/src/Mod/TechDraw/App/DrawViewSection.cpp index a807834f1ab5..d22753b1f469 100644 --- a/src/Mod/TechDraw/App/DrawViewSection.cpp +++ b/src/Mod/TechDraw/App/DrawViewSection.cpp @@ -81,7 +81,7 @@ #include "DrawUtil.h" #include "DrawProjGroupItem.h" #include "DrawProjectSplit.h" -#include "DrawCrosshatch.h" +#include "DrawGeomHatch.h" #include "DrawViewSection.h" using namespace TechDraw; @@ -174,7 +174,7 @@ void DrawViewSection::onChanged(const App::Property* prop) if ((!FileHatchPattern.isEmpty()) && (!NameGeomPattern.isEmpty())) { std::vector specs = - DrawCrosshatch::getDecodedSpecsFromFile(FileHatchPattern.getValue(),NameGeomPattern.getValue()); + DrawGeomHatch::getDecodedSpecsFromFile(FileHatchPattern.getValue(),NameGeomPattern.getValue()); m_lineSets.clear(); for (auto& hl: specs) { //hl.dump("hl from section"); @@ -539,7 +539,7 @@ Base::Vector3d DrawViewSection::getSectionVector (const std::string sectionName) std::vector DrawViewSection::getDrawableLines(int i) { std::vector result; - result = DrawCrosshatch::getDrawableLines(this,m_lineSets,i,HatchScale.getValue()); + result = DrawGeomHatch::getDrawableLines(this,m_lineSets,i,HatchScale.getValue()); return result; } diff --git a/src/Mod/TechDraw/App/DrawViewSection.h b/src/Mod/TechDraw/App/DrawViewSection.h index 606a8fbd79d8..bbabec82979b 100644 --- a/src/Mod/TechDraw/App/DrawViewSection.h +++ b/src/Mod/TechDraw/App/DrawViewSection.h @@ -45,7 +45,7 @@ class Face; namespace TechDraw { class DrawProjGroupItem; -class DrawCrosshatch; +class DrawGeomHatch; class HatchLine; class LineSet; class DashSet; diff --git a/src/Mod/TechDraw/Gui/AppTechDrawGui.cpp b/src/Mod/TechDraw/Gui/AppTechDrawGui.cpp index a272545c544b..1388e4fe7294 100644 --- a/src/Mod/TechDraw/Gui/AppTechDrawGui.cpp +++ b/src/Mod/TechDraw/Gui/AppTechDrawGui.cpp @@ -48,7 +48,7 @@ #include "ViewProviderSymbol.h" #include "ViewProviderViewClip.h" #include "ViewProviderHatch.h" -#include "ViewProviderCrosshatch.h" +#include "ViewProviderGeomHatch.h" #include "ViewProviderSpreadsheet.h" #include "ViewProviderImage.h" @@ -103,7 +103,7 @@ void TechDrawGuiExport initTechDrawGui() TechDrawGui::ViewProviderDraft::init(); TechDrawGui::ViewProviderArch::init(); TechDrawGui::ViewProviderHatch::init(); - TechDrawGui::ViewProviderCrosshatch::init(); + TechDrawGui::ViewProviderGeomHatch::init(); TechDrawGui::ViewProviderSpreadsheet::init(); TechDrawGui::ViewProviderImage::init(); diff --git a/src/Mod/TechDraw/Gui/CMakeLists.txt b/src/Mod/TechDraw/Gui/CMakeLists.txt index 821924b9317a..8fe24d3b2232 100644 --- a/src/Mod/TechDraw/Gui/CMakeLists.txt +++ b/src/Mod/TechDraw/Gui/CMakeLists.txt @@ -199,8 +199,8 @@ SET(TechDrawGuiViewProvider_SRCS ViewProviderViewClip.h ViewProviderHatch.cpp ViewProviderHatch.h - ViewProviderCrosshatch.cpp - ViewProviderCrosshatch.h + ViewProviderGeomHatch.cpp + ViewProviderGeomHatch.h ViewProviderImage.cpp ViewProviderImage.h ) diff --git a/src/Mod/TechDraw/Gui/CommandDecorate.cpp b/src/Mod/TechDraw/Gui/CommandDecorate.cpp index cf217b7e5300..0a4fdbac5ac2 100644 --- a/src/Mod/TechDraw/Gui/CommandDecorate.cpp +++ b/src/Mod/TechDraw/Gui/CommandDecorate.cpp @@ -49,7 +49,7 @@ #include #include #include -#include +#include #include #include #include @@ -128,24 +128,24 @@ bool CmdTechDrawNewHatch::isActive(void) } //=========================================================================== -// TechDraw_NewCrosshatch +// TechDraw_NewGeomHatch //=========================================================================== -DEF_STD_CMD_A(CmdTechDrawNewCrosshatch); +DEF_STD_CMD_A(CmdTechDrawNewGeomHatch); -CmdTechDrawNewCrosshatch::CmdTechDrawNewCrosshatch() - : Command("TechDraw_NewCrosshatch") +CmdTechDrawNewGeomHatch::CmdTechDrawNewGeomHatch() + : Command("TechDraw_NewGeomHatch") { sAppModule = "TechDraw"; sGroup = QT_TR_NOOP("TechDraw"); sMenuText = QT_TR_NOOP("Apply geometric hatch to a Face"); sToolTipText = QT_TR_NOOP("Apply geometric hatch to a Face"); - sWhatsThis = "TechDraw_NewCrosshatch"; + sWhatsThis = "TechDraw_NewGeomHatch"; sStatusTip = sToolTipText; - sPixmap = "actions/techdraw-crosshatch"; + sPixmap = "actions/techdraw-geomhatch"; } -void CmdTechDrawNewCrosshatch::activated(int iMsg) +void CmdTechDrawNewGeomHatch::activated(int iMsg) { Q_UNUSED(iMsg); if (!_checkSelectionHatch(this)) { //same requirements as hatch - page, DrawViewXXX, face @@ -161,16 +161,16 @@ void CmdTechDrawNewCrosshatch::activated(int iMsg) TechDraw::DrawPage* page = objFeat->findParentPage(); std::string PageName = page->getNameInDocument(); - std::string FeatName = getUniqueObjectName("Crosshatch"); + std::string FeatName = getUniqueObjectName("GeomHatch"); std::stringstream featLabel; featLabel << FeatName << "FX" << TechDraw::DrawUtil::getIndexFromName(subNames.at(0)); - openCommand("Create Crosshatch"); - doCommand(Doc,"App.activeDocument().addObject('TechDraw::DrawCrosshatch','%s')",FeatName.c_str()); + openCommand("Create GeomHatch"); + doCommand(Doc,"App.activeDocument().addObject('TechDraw::DrawGeomHatch','%s')",FeatName.c_str()); doCommand(Doc,"App.activeDocument().%s.Label = '%s'",FeatName.c_str(),featLabel.str().c_str()); - auto crosshatch( static_cast(getDocument()->getObject(FeatName.c_str())) ); - crosshatch->Source.setValue(objFeat, subNames); + auto geomhatch( static_cast(getDocument()->getObject(FeatName.c_str())) ); + geomhatch->Source.setValue(objFeat, subNames); commitCommand(); @@ -180,7 +180,7 @@ void CmdTechDrawNewCrosshatch::activated(int iMsg) getDocument()->recompute(); } -bool CmdTechDrawNewCrosshatch::isActive(void) +bool CmdTechDrawNewGeomHatch::isActive(void) { bool havePage = DrawGuiUtil::needPage(this); bool haveView = DrawGuiUtil::needView(this); @@ -291,7 +291,7 @@ void CreateTechDrawCommandsDecorate(void) Gui::CommandManager &rcCmdMgr = Gui::Application::Instance->commandManager(); rcCmdMgr.addCommand(new CmdTechDrawNewHatch()); - rcCmdMgr.addCommand(new CmdTechDrawNewCrosshatch()); + rcCmdMgr.addCommand(new CmdTechDrawNewGeomHatch()); rcCmdMgr.addCommand(new CmdTechDrawImage()); rcCmdMgr.addCommand(new CmdTechDrawToggleFrame()); } diff --git a/src/Mod/TechDraw/Gui/QGIFace.cpp b/src/Mod/TechDraw/Gui/QGIFace.cpp index 8d2960f3ce87..36dfb2cccc6b 100644 --- a/src/Mod/TechDraw/Gui/QGIFace.cpp +++ b/src/Mod/TechDraw/Gui/QGIFace.cpp @@ -74,7 +74,7 @@ QGIFace::QGIFace(int index) : m_styleNormal = m_styleDef; m_fillStyle = m_styleDef; m_colNormalFill = m_colDefFill; - m_crossColor = QColor(Qt::black); + m_geomColor = QColor(Qt::black); setLineWeight(0.5); //0 = cosmetic setPrettyNormal(); @@ -99,17 +99,17 @@ void QGIFace::draw() setPath(m_outline); //Face boundary if (isHatched()) { - if (m_mode == CrosshatchFill) { //crosshatch - if (!m_crossHatchPaths.empty()) { //surrogate for LineSets.empty + if (m_mode == GeomHatchFill) { //crosshatch + if (!m_geomHatchPaths.empty()) { //surrogate for LineSets.empty m_brush.setTexture(nullptr); m_fillStyle = m_styleDef; m_styleNormal = m_fillStyle; int pathNo = 0; - for (auto& pp: m_crossHatchPaths) { + for (auto& pp: m_geomHatchPaths) { QGraphicsPathItem* fillItem = m_fillItems.at(pathNo); fillItem->setPath(pp); - QPen crossPen = setCrossPen(pathNo); - fillItem->setPen(crossPen); + QPen geomPen = setGeomPen(pathNo); + fillItem->setPen(geomPen); pathNo++; } } @@ -217,7 +217,7 @@ void QGIFace::setOutline(const QPainterPath & path) void QGIFace::clearLineSets(void) { - m_crossHatchPaths.clear(); + m_geomHatchPaths.clear(); m_dashSpecs.clear(); clearFillItems(); } @@ -225,7 +225,7 @@ void QGIFace::clearLineSets(void) //each line set needs a painterpath, a dashspec and a QGPItem to show them void QGIFace::addLineSet(QPainterPath pp, std::vector dp) { - m_crossHatchPaths.push_back(pp); + m_geomHatchPaths.push_back(pp); m_dashSpecs.push_back(DashSpec(dp)); addFillItem(); } @@ -253,7 +253,7 @@ QVector QGIFace::decodeDashSpec(DashSpec patDash) //Rez::guiX(something)? double dotLength = 3.0; double unitLength = 6.0; -// double penWidth = m_crossWeight; //mark, space and dot lengths are to be in terms of penWidth(Qt) or mm(PAT)?? +// double penWidth = m_geomWeight; //mark, space and dot lengths are to be in terms of penWidth(Qt) or mm(PAT)?? // //if we want it in terms of mm, we need to divide by penWidth? // double minPen = 0.01; //avoid trouble with cosmetic pen (zero width) std::vector result; @@ -273,16 +273,15 @@ QVector QGIFace::decodeDashSpec(DashSpec patDash) } -QPen QGIFace::setCrossPen(int i) +QPen QGIFace::setGeomPen(int i) { //m_dashSpecs[i].dump("spec test"); DashSpec ourSpec = m_dashSpecs.at(i); //ourSpec.dump("our spec"); QPen result; - result.setWidthF(Rez::guiX(m_crossWeight)); //Rez::guiX() ?? line weights are in mm? -// result.setWidthF(Rez::guiX(0.09)); - result.setColor(m_crossColor); + result.setWidthF(Rez::guiX(m_geomWeight)); //Rez::guiX() ?? line weights are in mm? + result.setColor(m_geomColor); if (ourSpec.empty()) { result.setStyle(Qt::SolidLine); } else { @@ -348,7 +347,7 @@ QPixmap QGIFace::textureFromSvg(std::string fileSpec) void QGIFace::setHatchColor(App::Color c) { m_svgCol = c.asCSSString(); - m_crossColor = c.asValue(); + m_geomColor = c.asValue(); } void QGIFace::setHatchScale(double s) @@ -396,7 +395,7 @@ void QGIFace::resetFill() { } void QGIFace::setLineWeight(double w) { - m_crossWeight = w; + m_geomWeight = w; } diff --git a/src/Mod/TechDraw/Gui/QGIFace.h b/src/Mod/TechDraw/Gui/QGIFace.h index 5d405bd9315d..3fd980bfc52f 100644 --- a/src/Mod/TechDraw/Gui/QGIFace.h +++ b/src/Mod/TechDraw/Gui/QGIFace.h @@ -64,7 +64,7 @@ class QGIFace : public QGIPrimPath FromFile, SvgFill, BitmapFill, - CrosshatchFill, + GeomHatchFill, PlainFill }; @@ -100,7 +100,7 @@ class QGIFace : public QGIPrimPath void clearSvg(void); //PAT fill parms & methods - void setCrosshatchWeight(double w) { m_crossWeight = w; } + void setGeomHatchWeight(double w) { m_geomWeight = w; } void clearLineSets(void); void addLineSet(QPainterPath pp, std::vector dp); QGraphicsPathItem* addFillItem(); @@ -124,10 +124,10 @@ class QGIFace : public QGIPrimPath bool m_isHatched; QGIFace::fillMode m_mode; - QPen setCrossPen(int i); + QPen setGeomPen(int i); QVector decodeDashSpec(DashSpec d); std::vector m_fillItems; - std::vector m_crossHatchPaths; // 0/1 dashspec per crosshatchpath + std::vector m_geomHatchPaths; // 0/1 dashspec per hatchpath std::vector m_dashSpecs; @@ -146,10 +146,10 @@ class QGIFace : public QGIPrimPath QPainterPath m_outline; // - QPainterPath m_crosshatch; //crosshatch fill lines + QPainterPath m_geomhatch; //crosshatch fill lines - QColor m_crossColor; //color for crosshatch lines - double m_crossWeight; //lineweight for crosshatch lines + QColor m_geomColor; //color for crosshatch lines + double m_geomWeight; //lineweight for crosshatch lines }; } diff --git a/src/Mod/TechDraw/Gui/QGIViewPart.cpp b/src/Mod/TechDraw/Gui/QGIViewPart.cpp index f22e116fbcfb..c1dfe20a04c9 100644 --- a/src/Mod/TechDraw/Gui/QGIViewPart.cpp +++ b/src/Mod/TechDraw/Gui/QGIViewPart.cpp @@ -52,7 +52,7 @@ #include #include #include -#include +#include #include #include "Rez.h" @@ -68,7 +68,7 @@ #include "QGCustomRect.h" #include "QGIMatting.h" #include "QGIViewPart.h" -#include "ViewProviderCrosshatch.h" +#include "ViewProviderGeomHatch.h" using namespace TechDrawGui; using namespace TechDrawGeometry; @@ -378,7 +378,7 @@ void QGIViewPart::drawViewPart() if (viewPart->handleFaces()) { // Draw Faces std::vector hatchObjs = viewPart->getHatches(); - std::vector crossObjs = viewPart->getCrosshatches(); + std::vector geomObjs = viewPart->getGeomHatches(); const std::vector &faceGeoms = viewPart->getFaceGeometry(); std::vector::const_iterator fit = faceGeoms.begin(); for(int i = 0 ; fit != faceGeoms.end(); fit++, i++) { @@ -386,12 +386,12 @@ void QGIViewPart::drawViewPart() newFace->isHatched(false); newFace->setFillMode(QGIFace::PlainFill); TechDraw::DrawHatch* fHatch = faceIsHatched(i,hatchObjs); - TechDraw::DrawCrosshatch* fCross = faceIsCrosshatched(i,crossObjs); - if (fCross) { - const std::vector &sourceNames = fCross->Source.getSubValues(); + TechDraw::DrawGeomHatch* fGeom = faceIsGeomHatched(i,geomObjs); + if (fGeom) { + const std::vector &sourceNames = fGeom->Source.getSubValues(); if (!sourceNames.empty()) { int fdx = TechDraw::DrawUtil::getIndexFromName(sourceNames.at(0)); - std::vector lineSets = fCross->getDrawableLines(fdx); + std::vector lineSets = fGeom->getDrawableLines(fdx); if (!lineSets.empty()) { newFace->clearLineSets(); for (auto& ls: lineSets) { @@ -403,14 +403,14 @@ void QGIViewPart::drawViewPart() newFace->addLineSet(bigPath,ls.getDashSpec()); } newFace->isHatched(true); - newFace->setFillMode(QGIFace::CrosshatchFill); - newFace->setHatchScale(fCross->ScalePattern.getValue()); - newFace->setHatchFile(fCross->FilePattern.getValue()); - Gui::ViewProvider* gvp = QGIView::getViewProvider(fCross); - ViewProviderCrosshatch* crossVp = dynamic_cast(gvp); - if (crossVp != nullptr) { - newFace->setHatchColor(crossVp->ColorPattern.getValue()); - newFace->setLineWeight(crossVp->WeightPattern.getValue()); + newFace->setFillMode(QGIFace::GeomHatchFill); + newFace->setHatchScale(fGeom->ScalePattern.getValue()); + newFace->setHatchFile(fGeom->FilePattern.getValue()); + Gui::ViewProvider* gvp = QGIView::getViewProvider(fGeom); + ViewProviderGeomHatch* geomVp = dynamic_cast(gvp); + if (geomVp != nullptr) { + newFace->setHatchColor(geomVp->ColorPattern.getValue()); + newFace->setLineWeight(geomVp->WeightPattern.getValue()); } } } @@ -887,10 +887,10 @@ TechDraw::DrawHatch* QGIViewPart::faceIsHatched(int i,std::vector crossObjs) const +TechDraw::DrawGeomHatch* QGIViewPart::faceIsGeomHatched(int i,std::vector geomObjs) const { - TechDraw::DrawCrosshatch* result = nullptr; - for (auto& h:crossObjs) { + TechDraw::DrawGeomHatch* result = nullptr; + for (auto& h:geomObjs) { const std::vector &sourceNames = h->Source.getSubValues(); int fdx = TechDraw::DrawUtil::getIndexFromName(sourceNames.at(0)); if (fdx == i) { diff --git a/src/Mod/TechDraw/Gui/QGIViewPart.h b/src/Mod/TechDraw/Gui/QGIViewPart.h index 4a82d3102f7d..33e488d29baf 100644 --- a/src/Mod/TechDraw/Gui/QGIViewPart.h +++ b/src/Mod/TechDraw/Gui/QGIViewPart.h @@ -34,7 +34,7 @@ namespace TechDraw { class DrawViewPart; class DrawViewSection; class DrawHatch; -class DrawCrosshatch; +class DrawGeomHatch; } namespace TechDrawGui @@ -90,7 +90,7 @@ class TechDrawGuiExport QGIViewPart : public QGIView virtual QVariant itemChange(GraphicsItemChange change, const QVariant &value) override; TechDraw::DrawHatch* faceIsHatched(int i,std::vector hatchObjs) const; - TechDraw::DrawCrosshatch* faceIsCrosshatched(int i,std::vector crossObjs) const; + TechDraw::DrawGeomHatch* faceIsGeomHatched(int i,std::vector geomObjs) const; void dumpPath(const char* text,QPainterPath path); void removePrimitives(void); void removeDecorations(void); diff --git a/src/Mod/TechDraw/Gui/QGIViewSection.cpp b/src/Mod/TechDraw/Gui/QGIViewSection.cpp index cecbd4df1107..61ae49cb2698 100644 --- a/src/Mod/TechDraw/Gui/QGIViewSection.cpp +++ b/src/Mod/TechDraw/Gui/QGIViewSection.cpp @@ -42,7 +42,7 @@ #include #include -#include +#include #include @@ -113,7 +113,7 @@ void QGIViewSection::drawSectionFace() QString ext = hfi.suffix(); if ((ext.toUpper() == QString::fromUtf8("PAT")) && !patternName.empty() ) { - newFace->setFillMode(QGIFace::CrosshatchFill); + newFace->setFillMode(QGIFace::GeomHatchFill); newFace->setLineWeight(sectionVp->WeightPattern.getValue()); std::vector lineSets = section->getDrawableLines(i); if (!lineSets.empty()) { diff --git a/src/Mod/TechDraw/Gui/Resources/TechDraw.qrc b/src/Mod/TechDraw/Gui/Resources/TechDraw.qrc index 8851fbbe5d98..aa958470fdee 100644 --- a/src/Mod/TechDraw/Gui/Resources/TechDraw.qrc +++ b/src/Mod/TechDraw/Gui/Resources/TechDraw.qrc @@ -49,7 +49,7 @@ icons/actions/techdraw-saveSVG.svg icons/actions/techdraw-viewsection.svg icons/actions/techdraw-hatch.svg - icons/actions/techdraw-crosshatch.svg + icons/actions/techdraw-geomhatch.svg icons/actions/techdraw-toggleframe.svg icons/actions/techdraw-projgroup.svg icons/actions/techdraw-spreadsheet.svg diff --git a/src/Mod/TechDraw/Gui/Resources/icons/actions/techdraw-crosshatch.svg b/src/Mod/TechDraw/Gui/Resources/icons/actions/techdraw-geomhatch.svg similarity index 100% rename from src/Mod/TechDraw/Gui/Resources/icons/actions/techdraw-crosshatch.svg rename to src/Mod/TechDraw/Gui/Resources/icons/actions/techdraw-geomhatch.svg diff --git a/src/Mod/TechDraw/Gui/ViewProviderCrosshatch.cpp b/src/Mod/TechDraw/Gui/ViewProviderGeomHatch.cpp similarity index 80% rename from src/Mod/TechDraw/Gui/ViewProviderCrosshatch.cpp rename to src/Mod/TechDraw/Gui/ViewProviderGeomHatch.cpp index 5ef17124bd49..ee377a36ccbf 100644 --- a/src/Mod/TechDraw/Gui/ViewProviderCrosshatch.cpp +++ b/src/Mod/TechDraw/Gui/ViewProviderGeomHatch.cpp @@ -49,48 +49,48 @@ #include #include -#include +#include #include #include #include "ViewProviderDrawingView.h" -#include "ViewProviderCrosshatch.h" +#include "ViewProviderGeomHatch.h" using namespace TechDrawGui; -PROPERTY_SOURCE(TechDrawGui::ViewProviderCrosshatch, Gui::ViewProviderDocumentObject) +PROPERTY_SOURCE(TechDrawGui::ViewProviderGeomHatch, Gui::ViewProviderDocumentObject) //************************************************************************** // Construction/Destruction -ViewProviderCrosshatch::ViewProviderCrosshatch() +ViewProviderGeomHatch::ViewProviderGeomHatch() { static const char *vgroup = "Format"; - sPixmap = "actions/techdraw-crosshatch"; + sPixmap = "actions/techdraw-geomhatch"; ADD_PROPERTY_TYPE(ColorPattern,(0),vgroup,App::Prop_None,"The color of the pattern"); - ADD_PROPERTY_TYPE(WeightPattern,(0.1),vgroup,App::Prop_None,"Crosshatch pattern line thickness"); + ADD_PROPERTY_TYPE(WeightPattern,(0.1),vgroup,App::Prop_None,"GeomHatch pattern line thickness"); getParameters(); } -ViewProviderCrosshatch::~ViewProviderCrosshatch() +ViewProviderGeomHatch::~ViewProviderGeomHatch() { } -void ViewProviderCrosshatch::attach(App::DocumentObject *pcFeat) +void ViewProviderGeomHatch::attach(App::DocumentObject *pcFeat) { // call parent attach method ViewProviderDocumentObject::attach(pcFeat); } -void ViewProviderCrosshatch::setDisplayMode(const char* ModeName) +void ViewProviderGeomHatch::setDisplayMode(const char* ModeName) { ViewProviderDocumentObject::setDisplayMode(ModeName); } -std::vector ViewProviderCrosshatch::getDisplayModes(void) const +std::vector ViewProviderGeomHatch::getDisplayModes(void) const { // get the modes of the father std::vector StrList = ViewProviderDocumentObject::getDisplayModes(); @@ -99,7 +99,7 @@ std::vector ViewProviderCrosshatch::getDisplayModes(void) const } //for VP properties -void ViewProviderCrosshatch::onChanged(const App::Property* prop) +void ViewProviderGeomHatch::onChanged(const App::Property* prop) { if (prop == &WeightPattern || prop == &ColorPattern ) { @@ -110,7 +110,7 @@ void ViewProviderCrosshatch::onChanged(const App::Property* prop) } //for feature properties -void ViewProviderCrosshatch::updateData(const App::Property* prop) +void ViewProviderGeomHatch::updateData(const App::Property* prop) { if (prop == &(getViewObject()->ScalePattern)) { updateGraphic(); @@ -118,9 +118,9 @@ void ViewProviderCrosshatch::updateData(const App::Property* prop) Gui::ViewProviderDocumentObject::updateData(prop); } -void ViewProviderCrosshatch::updateGraphic(void) +void ViewProviderGeomHatch::updateGraphic(void) { - TechDraw::DrawCrosshatch* dc = getViewObject(); + TechDraw::DrawGeomHatch* dc = getViewObject(); if (dc) { TechDraw::DrawViewPart* dvp = dc->getSourceView(); if (dvp) { @@ -138,12 +138,12 @@ void ViewProviderCrosshatch::updateGraphic(void) } -void ViewProviderCrosshatch::getParameters(void) +void ViewProviderGeomHatch::getParameters(void) { Base::Reference hGrp = App::GetApplication().GetUserParameter() .GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/TechDraw/Colors"); App::Color fcColor; - fcColor.setPackedValue(hGrp->GetUnsigned("Crosshatch", 0x00000000)); + fcColor.setPackedValue(hGrp->GetUnsigned("GeomHatch", 0x00000000)); ColorPattern.setValue(fcColor); hGrp = App::GetApplication().GetUserParameter() @@ -152,7 +152,7 @@ void ViewProviderCrosshatch::getParameters(void) WeightPattern.setValue(lineWeight); } -TechDraw::DrawCrosshatch* ViewProviderCrosshatch::getViewObject() const +TechDraw::DrawGeomHatch* ViewProviderGeomHatch::getViewObject() const { - return dynamic_cast(pcObject); + return dynamic_cast(pcObject); } diff --git a/src/Mod/TechDraw/Gui/ViewProviderCrosshatch.h b/src/Mod/TechDraw/Gui/ViewProviderGeomHatch.h similarity index 89% rename from src/Mod/TechDraw/Gui/ViewProviderCrosshatch.h rename to src/Mod/TechDraw/Gui/ViewProviderGeomHatch.h index 2c8bd0f699d4..16d49888aa08 100644 --- a/src/Mod/TechDraw/Gui/ViewProviderCrosshatch.h +++ b/src/Mod/TechDraw/Gui/ViewProviderGeomHatch.h @@ -33,21 +33,21 @@ namespace TechDraw{ - class DrawCrosshatch; + class DrawGeomHatch; } namespace TechDrawGui { -class TechDrawGuiExport ViewProviderCrosshatch : public Gui::ViewProviderDocumentObject +class TechDrawGuiExport ViewProviderGeomHatch : public Gui::ViewProviderDocumentObject { - PROPERTY_HEADER(TechDrawGui::ViewProviderCrosshatch); + PROPERTY_HEADER(TechDrawGui::ViewProviderGeomHatch); public: /// constructor - ViewProviderCrosshatch(); + ViewProviderGeomHatch(); /// destructor - virtual ~ViewProviderCrosshatch(); + virtual ~ViewProviderGeomHatch(); App::PropertyFloat WeightPattern; App::PropertyColor ColorPattern; @@ -63,7 +63,7 @@ class TechDrawGuiExport ViewProviderCrosshatch : public Gui::ViewProviderDocumen void updateGraphic(void); void getParameters(void); - TechDraw::DrawCrosshatch* getViewObject() const; + TechDraw::DrawGeomHatch* getViewObject() const; }; } // namespace TechDrawGui diff --git a/src/Mod/TechDraw/Gui/ViewProviderViewPart.cpp b/src/Mod/TechDraw/Gui/ViewProviderViewPart.cpp index 049629c9cc56..0854ceb83f68 100644 --- a/src/Mod/TechDraw/Gui/ViewProviderViewPart.cpp +++ b/src/Mod/TechDraw/Gui/ViewProviderViewPart.cpp @@ -39,7 +39,7 @@ #include #include #include -#include +#include #include #include "ViewProviderViewPart.h" @@ -118,7 +118,7 @@ std::vector ViewProviderViewPart::claimChildren(void) cons // valid children of a ViewPart are: // - Dimensions // - Hatches - // - Crosshatches + // - GeomHatches std::vector temp; const std::vector &views = getViewPart()->getInList(); try { @@ -134,7 +134,7 @@ std::vector ViewProviderViewPart::claimChildren(void) cons } } else if ((*it)->getTypeId().isDerivedFrom(TechDraw::DrawHatch::getClassTypeId())) { temp.push_back((*it)); - } else if ((*it)->getTypeId().isDerivedFrom(TechDraw::DrawCrosshatch::getClassTypeId())) { + } else if ((*it)->getTypeId().isDerivedFrom(TechDraw::DrawGeomHatch::getClassTypeId())) { temp.push_back((*it)); } } diff --git a/src/Mod/TechDraw/Gui/ViewProviderViewSection.cpp b/src/Mod/TechDraw/Gui/ViewProviderViewSection.cpp index d2f70d1adb7d..8d7472d77d6d 100644 --- a/src/Mod/TechDraw/Gui/ViewProviderViewSection.cpp +++ b/src/Mod/TechDraw/Gui/ViewProviderViewSection.cpp @@ -55,7 +55,7 @@ ViewProviderViewSection::ViewProviderViewSection() ADD_PROPERTY_TYPE(CutSurfaceColor,(0.0,0.0,0.0),sgroup,App::Prop_None,"The color to shade the cut surface"); ADD_PROPERTY_TYPE(HatchCutSurface ,(false),hgroup,App::Prop_None,"Hatch the cut surface"); ADD_PROPERTY_TYPE(HatchColor,(0.0,0.0,0.0),hgroup,App::Prop_None,"The color of the hatch pattern"); - ADD_PROPERTY_TYPE(WeightPattern,(0.1),hgroup,App::Prop_None,"Crosshatch pattern line thickness"); + ADD_PROPERTY_TYPE(WeightPattern,(0.1),hgroup,App::Prop_None,"GeomHatch pattern line thickness"); getParameters(); diff --git a/src/Mod/TechDraw/Gui/Workbench.cpp b/src/Mod/TechDraw/Gui/Workbench.cpp index 6b2ab1690ad4..e8e1aa67ef4f 100644 --- a/src/Mod/TechDraw/Gui/Workbench.cpp +++ b/src/Mod/TechDraw/Gui/Workbench.cpp @@ -126,7 +126,7 @@ Gui::ToolBarItem* Workbench::setupToolBars() const Gui::ToolBarItem *decor = new Gui::ToolBarItem(root); decor->setCommand("TechDraw Decoration"); *decor << "TechDraw_NewHatch"; - *decor << "TechDraw_NewCrosshatch"; + *decor << "TechDraw_NewGeomHatch"; *decor << "TechDraw_Symbol"; *decor << "TechDraw_Image"; *decor << "TechDraw_ToggleFrame"; @@ -176,7 +176,7 @@ Gui::ToolBarItem* Workbench::setupCommandBars() const Gui::ToolBarItem *decor = new Gui::ToolBarItem(root); decor->setCommand("TechDraw Decoration"); *decor << "TechDraw_NewHatch"; - *decor << "TechDraw_NewCrosshatch"; + *decor << "TechDraw_NewGeomHatch"; *decor << "TechDraw_Symbol"; *decor << "TechDraw_Image"; *decor << "TechDraw_ToggleFrame";