From ae71abd1cc8dc1eaa45020ab7209fae55d09fc41 Mon Sep 17 00:00:00 2001 From: luz paz Date: Sat, 14 Nov 2020 06:36:36 -0500 Subject: [PATCH] TechDraw: Header uniformity and whitespace fixes --- src/Mod/TechDraw/App/AppTechDraw.cpp | 22 ++++++++++---- src/Mod/TechDraw/App/DrawGeomHatchPyImp.cpp | 19 ++++++++++++ src/Mod/TechDraw/App/DrawHatchPyImp.cpp | 21 +++++++++++++ src/Mod/TechDraw/App/DrawLeaderLine.cpp | 16 +++++----- src/Mod/TechDraw/App/DrawLeaderLine.h | 2 +- src/Mod/TechDraw/App/DrawLeaderLinePyImp.cpp | 2 +- src/Mod/TechDraw/App/DrawProjGroupPyImp.cpp | 21 +++++++++++++ src/Mod/TechDraw/App/DrawRichAnno.cpp | 2 +- src/Mod/TechDraw/App/DrawRichAnno.h | 2 +- src/Mod/TechDraw/App/DrawRichAnnoPyImp.cpp | 2 +- src/Mod/TechDraw/App/DrawSVGTemplatePyImp.cpp | 21 +++++++++++++ src/Mod/TechDraw/App/DrawTile.cpp | 4 +-- src/Mod/TechDraw/App/DrawTilePyImp.cpp | 2 +- src/Mod/TechDraw/App/DrawTileWeld.h | 4 +-- src/Mod/TechDraw/App/DrawTileWeldPyImp.cpp | 2 +- .../TechDraw/App/DrawViewAnnotationPyImp.cpp | 2 +- src/Mod/TechDraw/App/DrawViewClipPyImp.cpp | 21 +++++++++++++ src/Mod/TechDraw/App/DrawViewCollection.h | 2 +- .../TechDraw/App/DrawViewCollectionPyImp.cpp | 21 +++++++++++++ src/Mod/TechDraw/App/DrawViewDimExtent.cpp | 8 ++--- src/Mod/TechDraw/App/DrawViewDimExtent.h | 2 +- src/Mod/TechDraw/App/DrawViewImage.cpp | 2 +- src/Mod/TechDraw/App/DrawViewImage.h | 2 +- src/Mod/TechDraw/App/DrawViewMulti.h | 1 + src/Mod/TechDraw/App/DrawViewPartPyImp.cpp | 30 +++++++++---------- src/Mod/TechDraw/App/DrawViewPyImp.cpp | 30 ++++++++++++++----- src/Mod/TechDraw/App/DrawViewSection.h | 3 +- src/Mod/TechDraw/App/DrawViewSpreadsheet.h | 2 +- src/Mod/TechDraw/App/DrawViewSymbolPyImp.cpp | 21 +++++++++++++ src/Mod/TechDraw/App/DrawWeldSymbol.cpp | 6 ++-- src/Mod/TechDraw/App/DrawWeldSymbol.h | 2 +- src/Mod/TechDraw/App/DrawWeldSymbolPyImp.cpp | 2 +- src/Mod/TechDraw/App/EdgeWalker.cpp | 6 ++-- src/Mod/TechDraw/App/EdgeWalker.h | 4 +-- src/Mod/TechDraw/App/HatchLine.cpp | 24 +++++++-------- src/Mod/TechDraw/App/HatchLine.h | 24 +++++++-------- src/Mod/TechDraw/App/LineGroup.cpp | 2 +- src/Mod/TechDraw/App/LineGroup.h | 8 ++--- src/Mod/TechDraw/App/PreCompiled.cpp | 2 +- src/Mod/TechDraw/App/ShapeExtractor.cpp | 26 ++++++++-------- src/Mod/TechDraw/App/ShapeExtractor.h | 4 +-- src/Mod/TechDraw/Gui/Command.cpp | 24 ++++++++++----- src/Mod/TechDraw/Gui/PreCompiled.cpp | 2 +- src/Mod/TechDraw/Gui/QGCustomImage.cpp | 4 +-- src/Mod/TechDraw/Gui/QGCustomImage.h | 2 +- src/Mod/TechDraw/Gui/QGEPath.cpp | 2 +- src/Mod/TechDraw/Gui/QGEPath.h | 8 ++--- src/Mod/TechDraw/Gui/QGISVGTemplate.h | 4 +-- src/Mod/TechDraw/Gui/QGIViewAnnotation.cpp | 8 ++--- src/Mod/TechDraw/Gui/QGIViewAnnotation.h | 2 +- src/Mod/TechDraw/Gui/QGIViewClip.cpp | 4 +-- src/Mod/TechDraw/Gui/QGIViewImage.cpp | 2 +- src/Mod/TechDraw/Gui/QGIViewImage.h | 2 +- src/Mod/TechDraw/Gui/QGIViewSpreadsheet.cpp | 2 +- src/Mod/TechDraw/Gui/QGIViewSpreadsheet.h | 2 +- src/Mod/TechDraw/Gui/QGIViewSymbol.cpp | 4 +-- src/Mod/TechDraw/Gui/QGIViewSymbol.h | 2 +- src/Mod/TechDraw/Gui/QGMText.cpp | 2 +- src/Mod/TechDraw/Gui/Rez.h | 4 +-- src/Mod/TechDraw/Gui/SymbolChooser.cpp | 12 ++++---- src/Mod/TechDraw/Gui/SymbolChooser.h | 4 +-- src/Mod/TechDraw/Gui/TaskActiveView.cpp | 8 ++--- src/Mod/TechDraw/Gui/TaskCenterLine.cpp | 10 +++---- src/Mod/TechDraw/Gui/TaskCosVertex.cpp | 8 ++--- src/Mod/TechDraw/Gui/TaskCosmeticLine.cpp | 10 +++---- src/Mod/TechDraw/Gui/TaskDetail.cpp | 14 ++++----- src/Mod/TechDraw/Gui/TaskLeaderLine.cpp | 18 +++++------ src/Mod/TechDraw/Gui/TaskProjGroup.cpp | 12 ++++---- src/Mod/TechDraw/Gui/TaskProjGroup.h | 4 +-- src/Mod/TechDraw/Gui/TaskRichAnno.cpp | 18 +++++------ src/Mod/TechDraw/Gui/TaskWeldingSymbol.cpp | 16 +++++----- src/Mod/TechDraw/Gui/TemplateTextField.cpp | 2 +- .../TechDraw/Gui/ViewProviderGeomHatch.cpp | 2 +- src/Mod/TechDraw/Gui/ViewProviderGeomHatch.h | 2 +- src/Mod/TechDraw/Gui/ViewProviderHatch.cpp | 2 +- src/Mod/TechDraw/Gui/ViewProviderHatch.h | 4 +-- src/Mod/TechDraw/Gui/ViewProviderImage.cpp | 2 +- src/Mod/TechDraw/Gui/ViewProviderImage.h | 2 +- src/Mod/TechDraw/Gui/ViewProviderPage.cpp | 14 ++++----- .../TechDraw/Gui/ViewProviderProjGroup.cpp | 4 +-- .../Gui/ViewProviderProjGroupItem.cpp | 2 +- .../TechDraw/Gui/ViewProviderSpreadsheet.cpp | 2 +- .../TechDraw/Gui/ViewProviderSpreadsheet.h | 2 +- src/Mod/TechDraw/Init.py | 8 ++--- src/Mod/TechDraw/InitGui.py | 16 +++++----- src/Mod/TechDraw/TestTechDrawApp.py | 1 + src/Mod/TechDraw/moveViews.py | 30 ++++++++++++++++--- 87 files changed, 454 insertions(+), 254 deletions(-) diff --git a/src/Mod/TechDraw/App/AppTechDraw.cpp b/src/Mod/TechDraw/App/AppTechDraw.cpp index 80dbc32d4c..5814f252dc 100644 --- a/src/Mod/TechDraw/App/AppTechDraw.cpp +++ b/src/Mod/TechDraw/App/AppTechDraw.cpp @@ -1,14 +1,24 @@ /*************************************************************************** + * Copyright (c) 2007 Jürgen Riegel * * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU Library General Public License as * - * published by the Free Software Foundation; either version 2 of the * - * License, or (at your option) any later version. * - * for detail see the LICENCE text file. * - * Jürgen Riegel 2007 * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of the GNU Library General Public * + * License as published by the Free Software Foundation; either * + * version 2 of the License, or (at your option) any later version. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU Library General Public License for more details. * + * * + * You should have received a copy of the GNU Library General Public * + * License along with this library; see the file COPYING.LIB. If not, * + * write to the Free Software Foundation, Inc., 59 Temple Place, * + * Suite 330, Boston, MA 02111-1307, USA * * * ***************************************************************************/ + #include "PreCompiled.h" #ifndef _PreComp_ # include diff --git a/src/Mod/TechDraw/App/DrawGeomHatchPyImp.cpp b/src/Mod/TechDraw/App/DrawGeomHatchPyImp.cpp index 327ae70524..5df0c78f25 100644 --- a/src/Mod/TechDraw/App/DrawGeomHatchPyImp.cpp +++ b/src/Mod/TechDraw/App/DrawGeomHatchPyImp.cpp @@ -1,3 +1,22 @@ +/*************************************************************************** + * Copyright (c) 2017 WandererFan * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of the GNU Library General Public * + * License as published by the Free Software Foundation; either * + * version 2 of the License, or (at your option) any later version. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU Library General Public License for more details. * + * * + * You should have received a copy of the GNU Library General Public * + * License along with this library; see the file COPYING.LIB. If not, * + * write to the Free Software Foundation, Inc., 59 Temple Place, * + * Suite 330, Boston, MA 02111-1307, USA * + * * + ***************************************************************************/ #include "PreCompiled.h" diff --git a/src/Mod/TechDraw/App/DrawHatchPyImp.cpp b/src/Mod/TechDraw/App/DrawHatchPyImp.cpp index 437246e516..010e2c4f79 100644 --- a/src/Mod/TechDraw/App/DrawHatchPyImp.cpp +++ b/src/Mod/TechDraw/App/DrawHatchPyImp.cpp @@ -1,3 +1,24 @@ +/*************************************************************************** + * Copyright (c) 2016 WandererFan * + * * + * This file is part of the FreeCAD CAx development system. * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of the GNU Library General Public * + * License as published by the Free Software Foundation; either * + * version 2 of the License, or (at your option) any later version. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU Library General Public License for more details. * + * * + * You should have received a copy of the GNU Library General Public * + * License along with this library; see the file COPYING.LIB. If not, * + * write to the Free Software Foundation, Inc., 59 Temple Place, * + * Suite 330, Boston, MA 02111-1307, USA * + * * + ***************************************************************************/ #include "PreCompiled.h" diff --git a/src/Mod/TechDraw/App/DrawLeaderLine.cpp b/src/Mod/TechDraw/App/DrawLeaderLine.cpp index 4931216a8b..6904e47f86 100644 --- a/src/Mod/TechDraw/App/DrawLeaderLine.cpp +++ b/src/Mod/TechDraw/App/DrawLeaderLine.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) 2019 Wanderer Fan * + * Copyright (c) 2019 WandererFan * * * * This file is part of the FreeCAD CAx development system. * * * @@ -47,7 +47,7 @@ using namespace TechDraw; PROPERTY_SOURCE(TechDraw::DrawLeaderLine, TechDraw::DrawView) //TODO: share this between DrawViewBalloon, DrawLeaderLine, QGIArrow, Prefs, etc -//const char* DrawLeaderLine::ArrowTypeEnums[]= { +//const char* DrawLeaderLine::ArrowTypeEnums[]= { // "FILLED_ARROW", // "OPEN_ARROW", // "TICK", @@ -57,7 +57,7 @@ PROPERTY_SOURCE(TechDraw::DrawLeaderLine, TechDraw::DrawView) // "FILLED_TRIANGLE", // "NONE" // NULL}; -//const char* DrawLeaderLine::ArrowTypeEnums2[]= { +//const char* DrawLeaderLine::ArrowTypeEnums2[]= { // "FILLED_ARROW", // "OPEN_ARROW", // "TICK", @@ -77,7 +77,7 @@ DrawLeaderLine::DrawLeaderLine(void) LeaderParent.setScope(App::LinkScope::Global); ADD_PROPERTY_TYPE(WayPoints,(Base::Vector3d()) ,group, App::Prop_None, "Intermediate points for Leader line"); - + // EndType.setEnums(ArrowTypeEnums); // ADD_PROPERTY(EndType,(prefEnd())); @@ -124,7 +124,7 @@ short DrawLeaderLine::mustExecute() const if (result) { return result; } - + const App::DocumentObject* docObj = getBaseObject(); if (docObj != nullptr) { result = docObj->isTouched(); //object property points to is touched @@ -137,7 +137,7 @@ short DrawLeaderLine::mustExecute() const } App::DocumentObjectExecReturn *DrawLeaderLine::execute(void) -{ +{ // Base::Console().Message("DLL::execute()\n"); if (!keepUpdated()) { return App::DocumentObject::StdReturn; @@ -165,7 +165,7 @@ App::DocumentObject* DrawLeaderLine::getBaseObject(void) const DrawView* view = getBaseView(); if (view != nullptr) { result = view; - } + } return result; } @@ -219,7 +219,7 @@ Base::Vector3d DrawLeaderLine::getAttachPoint(void) return result; } -void DrawLeaderLine::adjustLastSegment(void) +void DrawLeaderLine::adjustLastSegment(void) { // Base::Console().Message("DLL::adjustLastSegment()\n"); bool adjust = AutoHorizontal.getValue(); diff --git a/src/Mod/TechDraw/App/DrawLeaderLine.h b/src/Mod/TechDraw/App/DrawLeaderLine.h index 87c66882fd..7ccd19919e 100644 --- a/src/Mod/TechDraw/App/DrawLeaderLine.h +++ b/src/Mod/TechDraw/App/DrawLeaderLine.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) 2019 Wanderer Fan * + * Copyright (c) 2019 WandererFan * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/TechDraw/App/DrawLeaderLinePyImp.cpp b/src/Mod/TechDraw/App/DrawLeaderLinePyImp.cpp index 54a62775ff..067118688b 100644 --- a/src/Mod/TechDraw/App/DrawLeaderLinePyImp.cpp +++ b/src/Mod/TechDraw/App/DrawLeaderLinePyImp.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) 2019 WandererFan (wandererfan@gmail.com) * + * Copyright (c) 2019 WandererFan * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/TechDraw/App/DrawProjGroupPyImp.cpp b/src/Mod/TechDraw/App/DrawProjGroupPyImp.cpp index eb67eaabc7..663dfaefd3 100644 --- a/src/Mod/TechDraw/App/DrawProjGroupPyImp.cpp +++ b/src/Mod/TechDraw/App/DrawProjGroupPyImp.cpp @@ -1,3 +1,24 @@ +/*************************************************************************** + * Copyright (c) 2016 WandererFan * + * * + * This file is part of the FreeCAD CAx development system. * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of the GNU Library General Public * + * License as published by the Free Software Foundation; either * + * version 2 of the License, or (at your option) any later version. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU Library General Public License for more details. * + * * + * You should have received a copy of the GNU Library General Public * + * License along with this library; see the file COPYING.LIB. If not, * + * write to the Free Software Foundation, Inc., 59 Temple Place, * + * Suite 330, Boston, MA 02111-1307, USA * + * * + ***************************************************************************/ #include "PreCompiled.h" diff --git a/src/Mod/TechDraw/App/DrawRichAnno.cpp b/src/Mod/TechDraw/App/DrawRichAnno.cpp index 95798334ba..2a6a7e1a42 100644 --- a/src/Mod/TechDraw/App/DrawRichAnno.cpp +++ b/src/Mod/TechDraw/App/DrawRichAnno.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) 2019 Wanderer Fan * + * Copyright (c) 2019 WandererFan * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/TechDraw/App/DrawRichAnno.h b/src/Mod/TechDraw/App/DrawRichAnno.h index 179797296c..1562783aa1 100644 --- a/src/Mod/TechDraw/App/DrawRichAnno.h +++ b/src/Mod/TechDraw/App/DrawRichAnno.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) 2019 Wanderer Fan * + * Copyright (c) 2019 WandererFan * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/TechDraw/App/DrawRichAnnoPyImp.cpp b/src/Mod/TechDraw/App/DrawRichAnnoPyImp.cpp index d50a0abbd4..852eb5a0b2 100644 --- a/src/Mod/TechDraw/App/DrawRichAnnoPyImp.cpp +++ b/src/Mod/TechDraw/App/DrawRichAnnoPyImp.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) 2019 WandererFan (wandererfan@gmail.com) * + * Copyright (c) 2019 WandererFan * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/TechDraw/App/DrawSVGTemplatePyImp.cpp b/src/Mod/TechDraw/App/DrawSVGTemplatePyImp.cpp index 032c79567e..cca9db485a 100644 --- a/src/Mod/TechDraw/App/DrawSVGTemplatePyImp.cpp +++ b/src/Mod/TechDraw/App/DrawSVGTemplatePyImp.cpp @@ -1,3 +1,24 @@ +/*************************************************************************** + * Copyright (c) 2016 WandererFan * + * * + * This file is part of the FreeCAD CAx development system. * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of the GNU Library General Public * + * License as published by the Free Software Foundation; either * + * version 2 of the License, or (at your option) any later version. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU Library General Public License for more details. * + * * + * You should have received a copy of the GNU Library General Public * + * License along with this library; see the file COPYING.LIB. If not, * + * write to the Free Software Foundation, Inc., 59 Temple Place, * + * Suite 330, Boston, MA 02111-1307, USA * + * * + ***************************************************************************/ #include "PreCompiled.h" diff --git a/src/Mod/TechDraw/App/DrawTile.cpp b/src/Mod/TechDraw/App/DrawTile.cpp index fbeb6b4c27..e31e6f0e34 100644 --- a/src/Mod/TechDraw/App/DrawTile.cpp +++ b/src/Mod/TechDraw/App/DrawTile.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) 2019 Wanderer Fan * + * Copyright (c) 2019 WandererFan * * * * This file is part of the FreeCAD CAx development system. * * * @@ -81,7 +81,7 @@ short DrawTile::mustExecute() const } App::DocumentObjectExecReturn *DrawTile::execute(void) -{ +{ // Base::Console().Message("DT::execute()\n"); return DocumentObject::execute(); } diff --git a/src/Mod/TechDraw/App/DrawTilePyImp.cpp b/src/Mod/TechDraw/App/DrawTilePyImp.cpp index ae48cfe9fd..260e63dd55 100644 --- a/src/Mod/TechDraw/App/DrawTilePyImp.cpp +++ b/src/Mod/TechDraw/App/DrawTilePyImp.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) 2019 WandererFan (wandererfan@gmail.com) * + * Copyright (c) 2019 WandererFan * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/TechDraw/App/DrawTileWeld.h b/src/Mod/TechDraw/App/DrawTileWeld.h index 0f1a5bb4fc..8067f6e9c2 100644 --- a/src/Mod/TechDraw/App/DrawTileWeld.h +++ b/src/Mod/TechDraw/App/DrawTileWeld.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) 2019 Wanderer Fan * + * Copyright (c) 2019 WandererFan * * * * This file is part of the FreeCAD CAx development system. * * * @@ -51,7 +51,7 @@ public: virtual short mustExecute() const; virtual App::DocumentObjectExecReturn *execute(void); - virtual void onDocumentRestored(); + virtual void onDocumentRestored(); virtual void setupObject(); virtual const char* getViewProviderName(void) const { diff --git a/src/Mod/TechDraw/App/DrawTileWeldPyImp.cpp b/src/Mod/TechDraw/App/DrawTileWeldPyImp.cpp index 5fb4342a2d..2fd5fddca4 100644 --- a/src/Mod/TechDraw/App/DrawTileWeldPyImp.cpp +++ b/src/Mod/TechDraw/App/DrawTileWeldPyImp.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) 2019 WandererFan (wandererfan@gmail.com) * + * Copyright (c) 2019 WandererFan * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/TechDraw/App/DrawViewAnnotationPyImp.cpp b/src/Mod/TechDraw/App/DrawViewAnnotationPyImp.cpp index a559b6ee05..fcaacf7e40 100644 --- a/src/Mod/TechDraw/App/DrawViewAnnotationPyImp.cpp +++ b/src/Mod/TechDraw/App/DrawViewAnnotationPyImp.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) 2018 WandererFan (wandererfan@gmail.com) * + * Copyright (c) 2018 WandererFan * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/TechDraw/App/DrawViewClipPyImp.cpp b/src/Mod/TechDraw/App/DrawViewClipPyImp.cpp index 0179e67f7b..b803bce3be 100644 --- a/src/Mod/TechDraw/App/DrawViewClipPyImp.cpp +++ b/src/Mod/TechDraw/App/DrawViewClipPyImp.cpp @@ -1,3 +1,24 @@ +/*************************************************************************** + * Copyright (c) 2016 WandererFan * + * * + * This file is part of the FreeCAD CAx development system. * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of the GNU Library General Public * + * License as published by the Free Software Foundation; either * + * version 2 of the License, or (at your option) any later version. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU Library General Public License for more details. * + * * + * You should have received a copy of the GNU Library General Public * + * License along with this library; see the file COPYING.LIB. If not, * + * write to the Free Software Foundation, Inc., 59 Temple Place, * + * Suite 330, Boston, MA 02111-1307, USA * + * * + ***************************************************************************/ #include "PreCompiled.h" diff --git a/src/Mod/TechDraw/App/DrawViewCollection.h b/src/Mod/TechDraw/App/DrawViewCollection.h index d7936b091c..b76046d69f 100644 --- a/src/Mod/TechDraw/App/DrawViewCollection.h +++ b/src/Mod/TechDraw/App/DrawViewCollection.h @@ -1,6 +1,6 @@ /*************************************************************************** * Copyright (c) 2007 Jürgen Riegel * - * Copyright (c) 2013 Luke Parry * + * Copyright (c) 2013 Luke Parry * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/TechDraw/App/DrawViewCollectionPyImp.cpp b/src/Mod/TechDraw/App/DrawViewCollectionPyImp.cpp index 5e2ba1628a..cb696f7983 100644 --- a/src/Mod/TechDraw/App/DrawViewCollectionPyImp.cpp +++ b/src/Mod/TechDraw/App/DrawViewCollectionPyImp.cpp @@ -1,3 +1,24 @@ +/*************************************************************************** + * Copyright (c) 2016 WandererFan * + * * + * This file is part of the FreeCAD CAx development system. * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of the GNU Library General Public * + * License as published by the Free Software Foundation; either * + * version 2 of the License, or (at your option) any later version. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU Library General Public License for more details. * + * * + * You should have received a copy of the GNU Library General Public * + * License along with this library; see the file COPYING.LIB. If not, * + * write to the Free Software Foundation, Inc., 59 Temple Place, * + * Suite 330, Boston, MA 02111-1307, USA * + * * + ***************************************************************************/ #include "PreCompiled.h" diff --git a/src/Mod/TechDraw/App/DrawViewDimExtent.cpp b/src/Mod/TechDraw/App/DrawViewDimExtent.cpp index afc2c103b7..77b8c8410d 100644 --- a/src/Mod/TechDraw/App/DrawViewDimExtent.cpp +++ b/src/Mod/TechDraw/App/DrawViewDimExtent.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) 2019 Wandererfan * + * Copyright (c) 2019 WandererFan * * * * This file is part of the FreeCAD CAx development system. * * * @@ -121,7 +121,7 @@ App::DocumentObjectExecReturn *DrawViewDimExtent::execute(void) std::vector edgeNames = getSubNames(); int direction = DirExtent.getValue(); - std::pair endPoints = + std::pair endPoints = DrawDimHelper::minMax(dvp, edgeNames, direction); @@ -156,7 +156,7 @@ App::DocumentObjectExecReturn *DrawViewDimExtent::execute(void) CosmeticVertex* cvTemp = dvp->getCosmeticVertex(cTags[0]); cvTemp->permaPoint = refMin / scale; cvTemp = dvp->getCosmeticVertex(cTags[1]); - cvTemp->permaPoint = refMax / scale; + cvTemp->permaPoint = refMax / scale; } } } @@ -169,7 +169,7 @@ std::vector DrawViewDimExtent::getSubNames(void) { std::vector result; std::vector edgeNames = Source.getSubValues(); - if (!edgeNames.empty() && + if (!edgeNames.empty() && (edgeNames[0].size() == 0)) { //garbage first entry - nop } else { diff --git a/src/Mod/TechDraw/App/DrawViewDimExtent.h b/src/Mod/TechDraw/App/DrawViewDimExtent.h index 15537b0c78..66330b1e5e 100644 --- a/src/Mod/TechDraw/App/DrawViewDimExtent.h +++ b/src/Mod/TechDraw/App/DrawViewDimExtent.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) 2019 Wandererfan * + * Copyright (c) 2019 WandererFan * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/TechDraw/App/DrawViewImage.cpp b/src/Mod/TechDraw/App/DrawViewImage.cpp index 95f543e426..ec87ad1216 100644 --- a/src/Mod/TechDraw/App/DrawViewImage.cpp +++ b/src/Mod/TechDraw/App/DrawViewImage.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) 2016 WandererFan (wandererfan@gmail.com) * + * Copyright (c) 2016 WandererFan * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/TechDraw/App/DrawViewImage.h b/src/Mod/TechDraw/App/DrawViewImage.h index 524b883a4b..990c22e75c 100644 --- a/src/Mod/TechDraw/App/DrawViewImage.h +++ b/src/Mod/TechDraw/App/DrawViewImage.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) 2016 WandererFan (wandererfan@gmail.com) * + * Copyright (c) 2016 WandererFan * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/TechDraw/App/DrawViewMulti.h b/src/Mod/TechDraw/App/DrawViewMulti.h index 2a6fb8d34b..c4df38771b 100644 --- a/src/Mod/TechDraw/App/DrawViewMulti.h +++ b/src/Mod/TechDraw/App/DrawViewMulti.h @@ -2,6 +2,7 @@ * Copyright (c) 2007 Jürgen Riegel * * Copyright (c) 2013 Luke Parry * * Copyright (c) 2016 WandererFan * + * * * This file is part of the FreeCAD CAx development system. * * * * This library is free software; you can redistribute it and/or * diff --git a/src/Mod/TechDraw/App/DrawViewPartPyImp.cpp b/src/Mod/TechDraw/App/DrawViewPartPyImp.cpp index abb38c5925..08f25daf24 100644 --- a/src/Mod/TechDraw/App/DrawViewPartPyImp.cpp +++ b/src/Mod/TechDraw/App/DrawViewPartPyImp.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) 2019 WandererFan (wandererfan@gmail.com) * + * Copyright (c) 2019 WandererFan * * * * This file is part of the FreeCAD CAx development system. * * * @@ -163,7 +163,7 @@ PyObject* DrawViewPartPy::makeCosmeticVertex(PyObject *args) std::string dvpName = dvp->getNameInDocument(); Base::Vector3d pnt1 = static_cast(pPnt1)->value(); std::string id = dvp->addCosmeticVertex(pnt1); - //int link = + //int link = dvp->add1CVToGV(id); dvp->requestPaint(); return PyUnicode_FromString(id.c_str()); //return tag for new CV @@ -181,9 +181,9 @@ PyObject* DrawViewPartPy::makeCosmeticVertex3d(PyObject *args) Base::Vector3d centroid = dvp->getOriginalCentroid(); pnt1 = pnt1 - centroid; Base::Vector3d projected = DrawUtil::invertY(dvp->projectPoint(pnt1)); - + std::string id = dvp->addCosmeticVertex(projected); - //int link = + //int link = dvp->add1CVToGV(id); dvp->refreshCVGeoms(); dvp->requestPaint(); @@ -208,7 +208,7 @@ PyObject* DrawViewPartPy::getCosmeticVertex(PyObject *args) return result; } -//get by selection name +//get by selection name PyObject* DrawViewPartPy::getCosmeticVertexBySelection(PyObject *args) { PyObject* result = nullptr; @@ -217,7 +217,7 @@ PyObject* DrawViewPartPy::getCosmeticVertexBySelection(PyObject *args) throw Py::TypeError("expected (string)"); } DrawViewPart* dvp = getDrawViewPartPtr(); - + TechDraw::CosmeticVertex* cv = dvp->getCosmeticVertexBySelection(selName); if (cv != nullptr) { result = cv->getPyObject(); @@ -272,7 +272,7 @@ PyObject* DrawViewPartPy::removeCosmeticVertex(PyObject *args) } } else { throw Py::TypeError("expected (CosmeticVertex or [CosmeticVertex])"); - } + } return Py_None; } @@ -281,7 +281,7 @@ PyObject* DrawViewPartPy::replaceCosmeticVertex(PyObject *args) (void) args; Base::Console().Message("DVPP::replaceCosmeticVertex() - deprecated. do not use.\n"); return PyBool_FromLong(0l); - + } @@ -321,7 +321,7 @@ PyObject* DrawViewPartPy::makeCosmeticLine(PyObject *args) Base::Console().Message("%s\n",msg.c_str()); throw Py::RuntimeError(msg); } - //int link = + //int link = dvp->add1CEToGE(newTag); dvp->requestPaint(); return PyUnicode_FromString(newTag.c_str()); //return tag for new CE @@ -369,7 +369,7 @@ PyObject* DrawViewPartPy::makeCosmeticLine3D(PyObject *args) Base::Console().Message("%s\n",msg.c_str()); throw Py::RuntimeError(msg); } - //int link = + //int link = dvp->add1CEToGE(newTag); dvp->requestPaint(); return PyUnicode_FromString(newTag.c_str()); //return tag for new CE @@ -409,7 +409,7 @@ PyObject* DrawViewPartPy::makeCosmeticCircle(PyObject *args) Base::Console().Message("%s\n",msg.c_str()); throw Py::RuntimeError(msg); } - //int link = + //int link = dvp->add1CEToGE(newTag); dvp->requestPaint(); return PyUnicode_FromString(newTag.c_str()); //return tag for new CE @@ -453,7 +453,7 @@ PyObject* DrawViewPartPy::makeCosmeticCircleArc(PyObject *args) throw Py::RuntimeError(msg); } - //int link = + //int link = dvp->add1CEToGE(newTag); dvp->requestPaint(); return PyUnicode_FromString(newTag.c_str()); //return tag for new CE @@ -530,7 +530,7 @@ PyObject* DrawViewPartPy::removeCosmeticEdge(PyObject *args) } DrawViewPart* dvp = getDrawViewPartPtr(); dvp->removeCosmeticEdge(tag); - Py_INCREF(Py_None); + Py_INCREF(Py_None); return Py_None; } @@ -580,7 +580,7 @@ PyObject* DrawViewPartPy::makeCenterLine(PyObject *args) throw Py::RuntimeError(msg); } } - //int link = + //int link = dvp->add1CLToGE(tag); dvp->requestPaint(); @@ -653,7 +653,7 @@ PyObject* DrawViewPartPy::removeCenterLine(PyObject *args) } DrawViewPart* dvp = getDrawViewPartPtr(); dvp->removeCenterLine(tag); - Py_INCREF(Py_None); + Py_INCREF(Py_None); return Py_None; } diff --git a/src/Mod/TechDraw/App/DrawViewPyImp.cpp b/src/Mod/TechDraw/App/DrawViewPyImp.cpp index 406360e13f..905e427168 100644 --- a/src/Mod/TechDraw/App/DrawViewPyImp.cpp +++ b/src/Mod/TechDraw/App/DrawViewPyImp.cpp @@ -1,3 +1,24 @@ +/*************************************************************************** + * Copyright (c) 2016 WandererFan * + * * + * This file is part of the FreeCAD CAx development system. * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of the GNU Library General Public * + * License as published by the Free Software Foundation; either * + * version 2 of the License, or (at your option) any later version. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU Library General Public License for more details. * + * * + * You should have received a copy of the GNU Library General Public * + * License along with this library; see the file COPYING.LIB. If not, * + * write to the Free Software Foundation, Inc., 59 Temple Place, * + * Suite 330, Boston, MA 02111-1307, USA * + * * + ***************************************************************************/ #include "PreCompiled.h" @@ -16,11 +37,6 @@ std::string DrawViewPy::representation(void) const } - - - - - PyObject *DrawViewPy::getCustomAttributes(const char* /*attr*/) const { return 0; @@ -28,7 +44,5 @@ PyObject *DrawViewPy::getCustomAttributes(const char* /*attr*/) const int DrawViewPy::setCustomAttributes(const char* /*attr*/, PyObject* /*obj*/) { - return 0; + return 0; } - - diff --git a/src/Mod/TechDraw/App/DrawViewSection.h b/src/Mod/TechDraw/App/DrawViewSection.h index 0bbd9acbeb..d7b7a91ba3 100644 --- a/src/Mod/TechDraw/App/DrawViewSection.h +++ b/src/Mod/TechDraw/App/DrawViewSection.h @@ -2,6 +2,7 @@ * Copyright (c) 2007 Jürgen Riegel * * Copyright (c) 2013 Luke Parry * * Copyright (c) 2016 WandererFan * + * * * This file is part of the FreeCAD CAx development system. * * * * This library is free software; you can redistribute it and/or * @@ -67,7 +68,7 @@ public: App::PropertyVector SectionNormal; App::PropertyVector SectionOrigin; App::PropertyEnumeration SectionDirection; - + App::PropertyEnumeration CutSurfaceDisplay; //new v019 App::PropertyFile FileHatchPattern; App::PropertyFile FileGeomPattern; //new v019 diff --git a/src/Mod/TechDraw/App/DrawViewSpreadsheet.h b/src/Mod/TechDraw/App/DrawViewSpreadsheet.h index 6e6d8ae94c..7edc6607ca 100644 --- a/src/Mod/TechDraw/App/DrawViewSpreadsheet.h +++ b/src/Mod/TechDraw/App/DrawViewSpreadsheet.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) 2016 WandererFan (wandererfan@gmail.com) * + * Copyright (c) 2016 WandererFan * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/TechDraw/App/DrawViewSymbolPyImp.cpp b/src/Mod/TechDraw/App/DrawViewSymbolPyImp.cpp index 1e3723fce7..8b43e20665 100644 --- a/src/Mod/TechDraw/App/DrawViewSymbolPyImp.cpp +++ b/src/Mod/TechDraw/App/DrawViewSymbolPyImp.cpp @@ -1,3 +1,24 @@ +/*************************************************************************** + * Copyright (c) 2016 WandererFan * + * * + * This file is part of the FreeCAD CAx development system. * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of the GNU Library General Public * + * License as published by the Free Software Foundation; either * + * version 2 of the License, or (at your option) any later version. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU Library General Public License for more details. * + * * + * You should have received a copy of the GNU Library General Public * + * License along with this library; see the file COPYING.LIB. If not, * + * write to the Free Software Foundation, Inc., 59 Temple Place, * + * Suite 330, Boston, MA 02111-1307, USA * + * * + ***************************************************************************/ #include "PreCompiled.h" diff --git a/src/Mod/TechDraw/App/DrawWeldSymbol.cpp b/src/Mod/TechDraw/App/DrawWeldSymbol.cpp index 2484105111..26ed21e046 100644 --- a/src/Mod/TechDraw/App/DrawWeldSymbol.cpp +++ b/src/Mod/TechDraw/App/DrawWeldSymbol.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) 2019 Wanderer Fan * + * Copyright (c) 2019 WandererFan * * * * This file is part of the FreeCAD CAx development system. * * * @@ -69,7 +69,7 @@ DrawWeldSymbol::~DrawWeldSymbol() { } -//DWS always has exactly 2 child tiles - ArrowSide and OtherSide. +//DWS always has exactly 2 child tiles - ArrowSide and OtherSide. //OtherSide tile may be hidden; //once DWS has been added to the document, add 2x DrawTileWeld //but if this is a restore of an existing DWS, the tiles will loaded elsewhere @@ -120,7 +120,7 @@ short DrawWeldSymbol::mustExecute() const } App::DocumentObjectExecReturn *DrawWeldSymbol::execute(void) -{ +{ // Base::Console().Message("DWS::execute()\n"); if (!keepUpdated()) { return App::DocumentObject::StdReturn; diff --git a/src/Mod/TechDraw/App/DrawWeldSymbol.h b/src/Mod/TechDraw/App/DrawWeldSymbol.h index 7e8e60787d..122fe01872 100644 --- a/src/Mod/TechDraw/App/DrawWeldSymbol.h +++ b/src/Mod/TechDraw/App/DrawWeldSymbol.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) 2019 Wanderer Fan * + * Copyright (c) 2019 WandererFan * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/TechDraw/App/DrawWeldSymbolPyImp.cpp b/src/Mod/TechDraw/App/DrawWeldSymbolPyImp.cpp index 578ad3f703..15900e2fd4 100644 --- a/src/Mod/TechDraw/App/DrawWeldSymbolPyImp.cpp +++ b/src/Mod/TechDraw/App/DrawWeldSymbolPyImp.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) 2019 WandererFan (wandererfan@gmail.com) * + * Copyright (c) 2019 WandererFan * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/TechDraw/App/EdgeWalker.cpp b/src/Mod/TechDraw/App/EdgeWalker.cpp index cca58447d1..3ba07f8874 100644 --- a/src/Mod/TechDraw/App/EdgeWalker.cpp +++ b/src/Mod/TechDraw/App/EdgeWalker.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) 2016 Wandererfan * + * Copyright (c) 2016 WandererFan * * * * This file is part of the FreeCAD CAx development system. * * * @@ -372,7 +372,7 @@ std::vector EdgeWalker::sortStrip(std::vector fw, bool if (BRep_Tool::IsClosed(w)) { closedWires.push_back(w); } - } + } std::vector sortedWires = sortWiresBySize(closedWires,false); //biggest 1st if (!sortedWires.size()) { Base::Console().Log("INFO - EW::sortStrip - no sorted Wires!\n"); @@ -382,7 +382,7 @@ std::vector EdgeWalker::sortStrip(std::vector fw, bool if (!includeBiggest) { sortedWires.erase(sortedWires.begin()); } - + return sortedWires; } diff --git a/src/Mod/TechDraw/App/EdgeWalker.h b/src/Mod/TechDraw/App/EdgeWalker.h index 0ce31b9d55..3fa02b6f2e 100644 --- a/src/Mod/TechDraw/App/EdgeWalker.h +++ b/src/Mod/TechDraw/App/EdgeWalker.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) 2016 Wandererfan * + * Copyright (c) 2016 WandererFan * * * * This file is part of the FreeCAD CAx development system. * * * @@ -54,7 +54,7 @@ typedef boost::property > graph; - + typedef boost::graph_traits < graph >::vertex_descriptor vertex_t; diff --git a/src/Mod/TechDraw/App/HatchLine.cpp b/src/Mod/TechDraw/App/HatchLine.cpp index b21eb2cb72..00bfc7e4a5 100644 --- a/src/Mod/TechDraw/App/HatchLine.cpp +++ b/src/Mod/TechDraw/App/HatchLine.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) 2017 Wandererfan * + * Copyright (c) 2017 WandererFan * * * * This file is part of the FreeCAD CAx development system. * * * @@ -85,12 +85,12 @@ Base::Vector3d LineSet::calcApparentStart(TechDraw::BaseGeom* g) Base::Vector3d result; Base::Vector3d start(g->getStartPoint().x,g->getStartPoint().y,0.0); double angle = getPATLineSpec().getAngle(); - if (angle == 0.0) { //horizontal + if (angle == 0.0) { //horizontal result = Base::Vector3d(getMinX(),start.y,0.0); } else if ((angle == 90.0) || (angle == -90.0)) { //vertical result = Base::Vector3d(start.x,getMinY(),0.0); - } else { + } else { double slope = getPATLineSpec().getSlope(); double y = getMinY(); double x = ((y - start.y) / slope) + start.x; @@ -162,7 +162,7 @@ Base::Vector3d LineSet::getPatternStartPoint(TechDraw::BaseGeom* g, double &offs double distX,distY; int overlayIndex = 0; //interval & offset are not patternscaled - + //figure out which line this is in the overlay if (angle == 0.0) { //odd case - horizontal line distY = (thisStart.y - atomStart.y); //this is patternscaled @@ -202,12 +202,12 @@ Base::Vector3d LineSet::getPatternStartPoint(TechDraw::BaseGeom* g, double &offs } else { // //ugly case - partial pattern result = gStart; - offset = patsStartOrg - (int)patsStartOrg; //fraction of a patternLength + offset = patsStartOrg - (int)patsStartOrg; //fraction of a patternLength offset = offset * patternLength; } - } else if (lenStartOrg > lenEndOrg) { //origin is after end + } else if (lenStartOrg > lenEndOrg) { //origin is after end double c = ceil(patsEndOrg); - if (c <= patsStartOrg) { //c is an integer pattern count in [patsStartOrg,patsEndOrg] + if (c <= patsStartOrg) { //c is an integer pattern count in [patsStartOrg,patsEndOrg] result = lineOrigin - c*patternLength*getUnitDir(); offset = 0.0; } else { @@ -320,7 +320,7 @@ std::vector PATLineSpec::getSpecsForPattern(std::string& parmFile, Base::Console().Message( "Could not find pattern: %s\n",parmName.c_str() ); return result; } - + //decode definition lines into PATLineSpec objects for (auto& l: lineSpecs) { PATLineSpec hl(l); @@ -431,7 +431,7 @@ bool PATLineSpec::isDashed(void) //! X component of distance between lines double PATLineSpec::getIntervalX(void) -{ +{ if (getAngle() == 0.0) { return 0.0; } else if ((getAngle() == 90.0) || (getAngle() == -90.0)) { @@ -444,14 +444,14 @@ double PATLineSpec::getIntervalX(void) //! Y component of distance between lines double PATLineSpec::getIntervalY(void) -{ +{ if (getAngle() == 0.0) { return getInterval(); } else if ((getAngle() == 90.0) || (getAngle() == -90.0)) { return 0.0; } else { double perpAngle = fabs(getAngle() - 90.0); - return fabs(getInterval() * tan(perpAngle * M_PI/180.0)); + return fabs(getInterval() * tan(perpAngle * M_PI/180.0)); } } @@ -484,7 +484,7 @@ void DashSpec::dump(const char* title) } Base::Console().Message("DUMP - DashSpec - %s\n",ss.str().c_str()); } - + diff --git a/src/Mod/TechDraw/App/HatchLine.h b/src/Mod/TechDraw/App/HatchLine.h index 724348e9a0..c8e706d7cf 100644 --- a/src/Mod/TechDraw/App/HatchLine.h +++ b/src/Mod/TechDraw/App/HatchLine.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) 2017 Wandererfan * + * Copyright (c) 2017 WandererFan * * * * This file is part of the FreeCAD CAx development system. * * * @@ -19,7 +19,7 @@ * Suite 330, Boston, MA 02111-1307, USA * * * ***************************************************************************/ - + //! HatchLine - Classes related to processing PAT files #ifndef _TechDraw_HATCHLINE_H_ @@ -48,11 +48,11 @@ class DrawUtil; //DashSpec is the parsed portion of a PATLineSpec related to mark/space/dot class TechDrawExport DashSpec { -public: +public: DashSpec() {} DashSpec(std::vector p) { m_parms = p; } ~DashSpec() {} - + double get(int i) {return m_parms.at(i); } std::vector get(void) {return m_parms;} bool empty(void) {return m_parms.empty();} @@ -60,7 +60,7 @@ public: double length(void); void dump(const char* title); DashSpec reversed(void); - + private: std::vector m_parms; }; @@ -72,7 +72,7 @@ public: PATLineSpec(); PATLineSpec(std::string& lineSpec); ~PATLineSpec(); - + void load(std::string& lineSpec); double getAngle(void) {return m_angle;} @@ -89,12 +89,12 @@ public: static bool findPatternStart(std::ifstream& inFile, std::string& parmName); static std::vector loadPatternDef(std::ifstream& inFile); static std::vector getPatternList(std::string& parmFile); - + bool isDashed(void); void dump(const char* title); -private: +private: void init(void); std::vector split(std::string line); //PAT line extracted tokens @@ -111,7 +111,7 @@ class TechDrawExport LineSet public: LineSet() {} ~LineSet() {} - + void setPATLineSpec(const PATLineSpec& s) { m_hatchLine = s; } void setEdges(std::vector e) {m_edges = e;} void setGeoms(std::vector g) {m_geoms = g;} @@ -124,7 +124,7 @@ public: PATLineSpec getPATLineSpec(void) { return m_hatchLine; } double getOffset(void) { return m_hatchLine.getOffset(); } //delta X offset double getAngle(void) { return m_hatchLine.getAngle(); } - Base::Vector3d getOrigin(void) { return m_hatchLine.getOrigin(); } + Base::Vector3d getOrigin(void) { return m_hatchLine.getOrigin(); } double getInterval(void) {return m_hatchLine.getInterval(); } //space between lines double getIntervalX(void) { return m_hatchLine.getIntervalX(); } //interval X-component double getIntervalY(void) { return m_hatchLine.getIntervalY(); } //interval Y-component @@ -132,7 +132,7 @@ public: double getPatternLength(void) { return m_hatchLine.getLength(); } Base::Vector3d getUnitDir(void); Base::Vector3d getUnitOrtho(void); - DashSpec getDashSpec(void) { return m_hatchLine.getDashParms();} + DashSpec getDashSpec(void) { return m_hatchLine.getDashParms();} Base::Vector3d calcApparentStart(TechDraw::BaseGeom* g); Base::Vector3d findAtomStart(void); Base::Vector3d getLineOrigin(void); //point corresponding to pattern origin for this line (O + n*intervalX) @@ -145,7 +145,7 @@ public: double getMaxY(void); bool isDashed(void); - + private: std::vector m_edges; std::vector m_geoms; diff --git a/src/Mod/TechDraw/App/LineGroup.cpp b/src/Mod/TechDraw/App/LineGroup.cpp index 039ec6d733..f9d98785f1 100644 --- a/src/Mod/TechDraw/App/LineGroup.cpp +++ b/src/Mod/TechDraw/App/LineGroup.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) 2017 Wandererfan * + * Copyright (c) 2017 WandererFan * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/TechDraw/App/LineGroup.h b/src/Mod/TechDraw/App/LineGroup.h index 23ad96d878..76826741d7 100644 --- a/src/Mod/TechDraw/App/LineGroup.h +++ b/src/Mod/TechDraw/App/LineGroup.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) 2017 Wandererfan * + * Copyright (c) 2017 WandererFan * * * * This file is part of the FreeCAD CAx development system. * * * @@ -19,7 +19,7 @@ * Suite 330, Boston, MA 02111-1307, USA * * * ***************************************************************************/ - + //! LineGroup - Classes related to processing LineGroup definition CSV files #ifndef _TechDraw_LINEGROUP_H_ @@ -32,7 +32,7 @@ namespace TechDraw class TechDrawExport LineGroup { -public: +public: LineGroup(); LineGroup(std::string groupName); ~LineGroup(); @@ -52,7 +52,7 @@ public: //static LineGroup maker static LineGroup* lineGroupFactory(std::string groupName); - static double getDefaultWidth(std::string weightName, + static double getDefaultWidth(std::string weightName, std::string groupName = std::string()); diff --git a/src/Mod/TechDraw/App/PreCompiled.cpp b/src/Mod/TechDraw/App/PreCompiled.cpp index 09241c2335..bef7d3ea9f 100644 --- a/src/Mod/TechDraw/App/PreCompiled.cpp +++ b/src/Mod/TechDraw/App/PreCompiled.cpp @@ -20,4 +20,4 @@ * * ***************************************************************************/ -#include "PreCompiled.h" +#include "PreCompiled.h" diff --git a/src/Mod/TechDraw/App/ShapeExtractor.cpp b/src/Mod/TechDraw/App/ShapeExtractor.cpp index 31792a17bb..f9dd2673d3 100644 --- a/src/Mod/TechDraw/App/ShapeExtractor.cpp +++ b/src/Mod/TechDraw/App/ShapeExtractor.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) 2019 WandererFan * + * Copyright (c) 2019 WandererFan * * * * This file is part of the FreeCAD CAx development system. * * * @@ -145,7 +145,7 @@ TopoDS_Shape ShapeExtractor::getShapes(const std::vector l TopoDS_Shape shape = BuilderCopy.Shape(); builder.Add(comp, shape); } - //it appears that an empty compound is !IsNull(), so we need to check a different way + //it appears that an empty compound is !IsNull(), so we need to check a different way //if we added anything to the compound. if (!found) { Base::Console().Error("SE::getSourceShapes - source shape is empty!\n"); @@ -181,7 +181,7 @@ std::vector ShapeExtractor::getXShapes(const App::Link* xLink) if (cLinkElem->hasPlacement()) { childPlm = cLinkElem->getLinkPlacementProperty()->getValue(); } - } + } auto shape = Part::Feature::getShape(l); if(!shape.IsNull()) { Base::Placement netPlm = linkPlm; @@ -234,7 +234,7 @@ std::vector ShapeExtractor::getShapesFromObject(const App::Documen { // Base::Console().Message("SE::getShapesFromObject(%s)\n", docObj->getNameInDocument()); std::vector result; - + const App::GroupExtension* gex = dynamic_cast(docObj); App::Property* gProp = docObj->getPropertyByName("Group"); App::Property* sProp = docObj->getPropertyByName("Shape"); @@ -335,8 +335,8 @@ std::vector ShapeExtractor::extractDrawableShapes(const TopoDS_Sha extShapes.push_back(s); } } - //vs using 2d geom as construction geom? - //get edges not part of a solid + //vs using 2d geom as construction geom? + //get edges not part of a solid //???? should this look for Faces(Wires?) before Edges? TopExp_Explorer expEdge(shapeIn, TopAbs_EDGE, TopAbs_SOLID); for (int i = 1; expEdge.More(); expEdge.Next(), i++) { @@ -349,7 +349,7 @@ std::vector ShapeExtractor::extractDrawableShapes(const TopoDS_Sha //not a Compound or a CompSolid just push_back shape_In) extShapes.push_back(shapeIn); } - + result = extShapes; if (!extEdges.empty()) { result.insert(std::end(result), std::begin(extEdges), std::end(extEdges)); @@ -375,11 +375,11 @@ bool ShapeExtractor::isEdgeType(App::DocumentObject* obj) // if (t.isDerivedFrom(Part::Line::getClassTypeId()) ) { // result = true; // } else if (t.isDerivedFrom(Part::Circle::getClassTypeId())) { -// result = true; +// result = true; // } else if (t.isDerivedFrom(Part::Ellipse::getClassTypeId())) { -// result = true; +// result = true; // } else if (t.isDerivedFrom(Part::RegularPolygon::getClassTypeId())) { -// result = true; +// result = true; // } return result; } @@ -389,7 +389,7 @@ bool ShapeExtractor::isPointType(App::DocumentObject* obj) bool result = false; Base::Type t = obj->getTypeId(); if (t.isDerivedFrom(Part::Vertex::getClassTypeId())) { - result = true; + result = true; } else if (isDraftPoint(obj)) { result = true; } @@ -443,7 +443,7 @@ bool ShapeExtractor::prefAdd2d(void) { Base::Reference hGrp = App::GetApplication().GetUserParameter() .GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/TechDraw/General"); - bool result = hGrp->GetBool("ShowLoose2d", false); + bool result = hGrp->GetBool("ShowLoose2d", false); return result; } - + diff --git a/src/Mod/TechDraw/App/ShapeExtractor.h b/src/Mod/TechDraw/App/ShapeExtractor.h index 373e1dea52..02d7007159 100644 --- a/src/Mod/TechDraw/App/ShapeExtractor.h +++ b/src/Mod/TechDraw/App/ShapeExtractor.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) 2019 WandererFan * + * Copyright (c) 2019 WandererFan * * * * This file is part of the FreeCAD CAx development system. * * * @@ -45,7 +45,7 @@ namespace TechDraw class TechDrawExport ShapeExtractor { public: - static TopoDS_Shape getShapes(const std::vector links); + static TopoDS_Shape getShapes(const std::vector links); static std::vector getShapes2d(const std::vector links); static std::vector getXShapes(const App::Link* xLink); static std::vector getShapesFromObject(const App::DocumentObject* docObj); diff --git a/src/Mod/TechDraw/Gui/Command.cpp b/src/Mod/TechDraw/Gui/Command.cpp index 2cdc101fd4..6ac4dad974 100644 --- a/src/Mod/TechDraw/Gui/Command.cpp +++ b/src/Mod/TechDraw/Gui/Command.cpp @@ -1,15 +1,25 @@ /*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU Library General Public License as * - * published by the Free Software Foundation; either version 2 of the * - * License, or (at your option) any later version. * - * for detail see the LICENCE text file. * - * Jürgen Riegel 2002 * + * Copyright (c) 2002 Jürgen Riegel * * Copyright (c) 2014 Luke Parry * * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of the GNU Library General Public * + * License as published by the Free Software Foundation; either * + * version 2 of the License, or (at your option) any later version. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU Library General Public License for more details. * + * * + * You should have received a copy of the GNU Library General Public * + * License along with this library; see the file COPYING.LIB. If not, * + * write to the Free Software Foundation, Inc., 59 Temple Place, * + * Suite 330, Boston, MA 02111-1307, USA * + * * ***************************************************************************/ + #include "PreCompiled.h" #ifndef _PreComp_ # include diff --git a/src/Mod/TechDraw/Gui/PreCompiled.cpp b/src/Mod/TechDraw/Gui/PreCompiled.cpp index 959870f85b..95d724aa47 100644 --- a/src/Mod/TechDraw/Gui/PreCompiled.cpp +++ b/src/Mod/TechDraw/Gui/PreCompiled.cpp @@ -21,4 +21,4 @@ ***************************************************************************/ -#include "PreCompiled.h" +#include "PreCompiled.h" diff --git a/src/Mod/TechDraw/Gui/QGCustomImage.cpp b/src/Mod/TechDraw/Gui/QGCustomImage.cpp index 81435098bf..fb3b451259 100644 --- a/src/Mod/TechDraw/Gui/QGCustomImage.cpp +++ b/src/Mod/TechDraw/Gui/QGCustomImage.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) 2016 WandererFan (wandererfan@gmail.com) * + * Copyright (c) 2016 WandererFan * * * * This file is part of the FreeCAD CAx development system. * * * @@ -36,7 +36,7 @@ using namespace TechDrawGui; -QGCustomImage::QGCustomImage() +QGCustomImage::QGCustomImage() { setCacheMode(QGraphicsItem::NoCache); setAcceptHoverEvents(false); diff --git a/src/Mod/TechDraw/Gui/QGCustomImage.h b/src/Mod/TechDraw/Gui/QGCustomImage.h index b17d5119fe..0a1f3dee4a 100644 --- a/src/Mod/TechDraw/Gui/QGCustomImage.h +++ b/src/Mod/TechDraw/Gui/QGCustomImage.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) 2016 WandererFan (wandererfan@gmail.com) * + * Copyright (c) 2016 WandererFan * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/TechDraw/Gui/QGEPath.cpp b/src/Mod/TechDraw/Gui/QGEPath.cpp index 39db74aaad..703915f258 100644 --- a/src/Mod/TechDraw/Gui/QGEPath.cpp +++ b/src/Mod/TechDraw/Gui/QGEPath.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) 2019 Wandererfan * + * Copyright (c) 2019 WandererFan * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/TechDraw/Gui/QGEPath.h b/src/Mod/TechDraw/Gui/QGEPath.h index bc5907cb4e..38fba56356 100644 --- a/src/Mod/TechDraw/Gui/QGEPath.h +++ b/src/Mod/TechDraw/Gui/QGEPath.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) 2019 Wandererfan * + * Copyright (c) 2019 WandererFan * * * * This file is part of the FreeCAD CAx development system. * * * @@ -88,7 +88,7 @@ public: virtual QRectF boundingRect() const override; virtual QPainterPath shape() const override; virtual void paint(QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget = 0 ) override; - + void inEdit(bool b) { m_inEdit = b; } bool inEdit(void) { return m_inEdit; } void startPathEdit(std::vector pathPoints); @@ -99,7 +99,7 @@ public: std::vector getDeltasFromLeader(void); void setScale(double s) { m_scale = s; } - double getScale(void) { return m_scale; } + double getScale(void) { return m_scale; } void setPoints(std::vector pts) { m_ghostPoints = pts; } @@ -137,7 +137,7 @@ protected: QGILeaderLine* m_parentLeader; QGIPrimPath* m_ghost; - + double m_startAdj; double m_endAdj; }; diff --git a/src/Mod/TechDraw/Gui/QGISVGTemplate.h b/src/Mod/TechDraw/Gui/QGISVGTemplate.h index aa5b5dc1a6..e1ad90f127 100644 --- a/src/Mod/TechDraw/Gui/QGISVGTemplate.h +++ b/src/Mod/TechDraw/Gui/QGISVGTemplate.h @@ -1,7 +1,7 @@ /*************************************************************************** * Copyright (c) 2012-2014 Luke Parry * * * - * This file is part of the FreeCAD CAx development system. * + * This file is part of the FreeCAD CAx development system. * * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Library General Public * @@ -10,7 +10,7 @@ * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU Library General Public License for more details. * * * * You should have received a copy of the GNU Library General Public * diff --git a/src/Mod/TechDraw/Gui/QGIViewAnnotation.cpp b/src/Mod/TechDraw/Gui/QGIViewAnnotation.cpp index 64ff8f49a7..5af8a8768f 100644 --- a/src/Mod/TechDraw/Gui/QGIViewAnnotation.cpp +++ b/src/Mod/TechDraw/Gui/QGIViewAnnotation.cpp @@ -1,6 +1,6 @@ /*************************************************************************** * Copyright (c) 2013 Luke Parry * - * 2014 wandererfan * + * Copyright (c) 2014 WandererFan * * * * This file is part of the FreeCAD CAx development system. * * * @@ -161,14 +161,14 @@ void QGIViewAnnotation::drawAnnotation() //TODO: there is still a bug here. entering "'" works, save and restore works, but edit after // save and restore brings "\'" back into text. manually deleting the "\" fixes it until the next // save/restore/edit cycle. - // a guess is that the editor for propertyStringList is too enthusiastic about substituting. + // a guess is that the editor for propertyStringList is too enthusiastic about substituting. // the substituting might be necessary for using the strings in Python. - // ' doesn't seem to help in this case. + // ' doesn't seem to help in this case. std::string u8String = Base::Tools::escapedUnicodeToUtf8(*it); //from \x??\x?? to real utf8 std::string apos = std::regex_replace((u8String), std::regex("\\\\"), ""); //remove doubles. apos = std::regex_replace((apos), std::regex("\\'"), "'"); //replace escaped apos - //"less than" symbol chops off line. need to use html sub. + //"less than" symbol chops off line. need to use html sub. std::string lt = std::regex_replace((apos), std::regex("<"), "<"); ss << lt; } diff --git a/src/Mod/TechDraw/Gui/QGIViewAnnotation.h b/src/Mod/TechDraw/Gui/QGIViewAnnotation.h index 99891c8e32..d45846f017 100644 --- a/src/Mod/TechDraw/Gui/QGIViewAnnotation.h +++ b/src/Mod/TechDraw/Gui/QGIViewAnnotation.h @@ -1,6 +1,6 @@ /*************************************************************************** * Copyright (c) 2013 Luke Parry * - * 2014 wandererfan * + * Copyright (c) 2014 WandererFan * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/TechDraw/Gui/QGIViewClip.cpp b/src/Mod/TechDraw/Gui/QGIViewClip.cpp index 585a9ed990..e5b118b4b6 100644 --- a/src/Mod/TechDraw/Gui/QGIViewClip.cpp +++ b/src/Mod/TechDraw/Gui/QGIViewClip.cpp @@ -1,6 +1,6 @@ /*************************************************************************** * Copyright (c) 2013 Luke Parry * - * 2014 wandererfan * + * Copyright (c) 2014 WandererFan * * * * This file is part of the FreeCAD CAx development system. * * * @@ -125,7 +125,7 @@ void QGIViewClip::drawClip() QPointF clipOrigin = mapToItem(m_cliparea,midMapped); m_cliparea->setRect(r.adjusted(-1,-1,1,1)); - + std::vector childNames = viewClip->getChildViewNames(); //for all child Views in Clip, add the graphics representation of the View to the Clip group for(std::vector::iterator it = childNames.begin(); it != childNames.end(); it++) { diff --git a/src/Mod/TechDraw/Gui/QGIViewImage.cpp b/src/Mod/TechDraw/Gui/QGIViewImage.cpp index e6877280c4..a021b4024e 100644 --- a/src/Mod/TechDraw/Gui/QGIViewImage.cpp +++ b/src/Mod/TechDraw/Gui/QGIViewImage.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) 2016 WandererFan (wandererfan@gmail.com) * + * Copyright (c) 2016 WandererFan * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/TechDraw/Gui/QGIViewImage.h b/src/Mod/TechDraw/Gui/QGIViewImage.h index e6ded6d010..4060c1087a 100644 --- a/src/Mod/TechDraw/Gui/QGIViewImage.h +++ b/src/Mod/TechDraw/Gui/QGIViewImage.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) 2016 WandererFan (wandererfan@gmail.com) * + * Copyright (c) 2016 WandererFan * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/TechDraw/Gui/QGIViewSpreadsheet.cpp b/src/Mod/TechDraw/Gui/QGIViewSpreadsheet.cpp index 8e41105528..d7667be4d8 100644 --- a/src/Mod/TechDraw/Gui/QGIViewSpreadsheet.cpp +++ b/src/Mod/TechDraw/Gui/QGIViewSpreadsheet.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) 2016 wandererfan * + * Copyright (c) 2016 WandererFan * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/TechDraw/Gui/QGIViewSpreadsheet.h b/src/Mod/TechDraw/Gui/QGIViewSpreadsheet.h index d56bd97dfe..8d5cb1a624 100644 --- a/src/Mod/TechDraw/Gui/QGIViewSpreadsheet.h +++ b/src/Mod/TechDraw/Gui/QGIViewSpreadsheet.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) 2016 wandererfan * + * Copyright (c) 2016 WandererFan * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/TechDraw/Gui/QGIViewSymbol.cpp b/src/Mod/TechDraw/Gui/QGIViewSymbol.cpp index 45b89139c9..e752bc9052 100644 --- a/src/Mod/TechDraw/Gui/QGIViewSymbol.cpp +++ b/src/Mod/TechDraw/Gui/QGIViewSymbol.cpp @@ -1,6 +1,6 @@ /*************************************************************************** * Copyright (c) 2013 Luke Parry * - * 2014 wandererfan * + * Copyright (c) 2014 WandererFan * * * * This file is part of the FreeCAD CAx development system. * * * @@ -134,7 +134,7 @@ void QGIViewSymbol::drawSvg() if (viewSymbol->isDerivedFrom(TechDraw::DrawViewArch::getClassTypeId()) || viewSymbol->isDerivedFrom(TechDraw::DrawViewDraft::getClassTypeId()) ) { scaling = scaling * rezfactor; - } else { + } else { scaling = scaling * rezfactor / pxMm; } m_svgItem->setScale(scaling); diff --git a/src/Mod/TechDraw/Gui/QGIViewSymbol.h b/src/Mod/TechDraw/Gui/QGIViewSymbol.h index 055085a7e1..ebb1da80ee 100644 --- a/src/Mod/TechDraw/Gui/QGIViewSymbol.h +++ b/src/Mod/TechDraw/Gui/QGIViewSymbol.h @@ -1,6 +1,6 @@ /*************************************************************************** * Copyright (c) 2013 Luke Parry * - * 2014 wandererfan * + * Copyright (c) 2014 WandererFan * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/TechDraw/Gui/QGMText.cpp b/src/Mod/TechDraw/Gui/QGMText.cpp index 57a3a19a47..7ae83b0ab9 100644 --- a/src/Mod/TechDraw/Gui/QGMText.cpp +++ b/src/Mod/TechDraw/Gui/QGMText.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) 2019 Wandererfan * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/TechDraw/Gui/Rez.h b/src/Mod/TechDraw/Gui/Rez.h index 5a03e8551f..ec91c3fb4d 100644 --- a/src/Mod/TechDraw/Gui/Rez.h +++ b/src/Mod/TechDraw/Gui/Rez.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) 2016 WandererFan * + * Copyright (c) 2016 WandererFan * * * * This file is part of the FreeCAD CAx development system. * * * @@ -56,7 +56,7 @@ public: static QRectF guiRect(QRectF r); static QSize guiSize(QSize s); static QSize appSize(QSize s); - + private: static double m_rezFactor; }; diff --git a/src/Mod/TechDraw/Gui/SymbolChooser.cpp b/src/Mod/TechDraw/Gui/SymbolChooser.cpp index 6cc636663b..4a2371b214 100644 --- a/src/Mod/TechDraw/Gui/SymbolChooser.cpp +++ b/src/Mod/TechDraw/Gui/SymbolChooser.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) 2019 Wandererfan * * * * This file is part of the FreeCAD CAx development system. * * * @@ -66,7 +66,7 @@ void SymbolChooser::setUiPrimary() } else { std::string resourceDir = App::Application::getResourceDir(); std::string defPath = "Mod/TechDraw/Symbols/Welding/AWS/"; - resourceDir = resourceDir + defPath; + resourceDir = resourceDir + defPath; QString defDir = QString::fromUtf8(resourceDir.c_str()); ui->fcSymbolDir->setFileName(defDir); loadSymbolNames(defDir); @@ -83,12 +83,12 @@ void SymbolChooser::setUiPrimary() void SymbolChooser::onOKClicked() { - QDialog::accept(); + QDialog::accept(); QListWidgetItem* sourceItem = ui->lwSymbols->currentItem(); if (!sourceItem) return; QString targetText = sourceItem->text(); - m_symbolPath = m_symbolDir + + m_symbolPath = m_symbolDir + targetText + QString::fromUtf8(".svg"); @@ -107,7 +107,7 @@ void SymbolChooser::onItemClicked(QListWidgetItem* item) //are item and currentItem() the same? should use item? QListWidgetItem* sourceItem = ui->lwSymbols->currentItem(); QString targetText = sourceItem->text(); - m_symbolPath = m_symbolDir + + m_symbolPath = m_symbolDir + targetText + QString::fromUtf8(".svg"); Q_EMIT symbolSelected(m_symbolPath, m_source); @@ -135,7 +135,7 @@ void SymbolChooser::loadSymbolNames(QString pathToSymbols) QFileInfo fi(fn); item->setText(fi.baseName()); QIcon symbolIcon(pathToSymbols + fn); - item->setIcon(symbolIcon); + item->setIcon(symbolIcon); ui->lwSymbols->addItem(item); } ui->lwSymbols->setCurrentRow(0); diff --git a/src/Mod/TechDraw/Gui/SymbolChooser.h b/src/Mod/TechDraw/Gui/SymbolChooser.h index dbd9fe7556..3f4bdec4b6 100644 --- a/src/Mod/TechDraw/Gui/SymbolChooser.h +++ b/src/Mod/TechDraw/Gui/SymbolChooser.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) 2019 Wandererfan * * * * This file is part of the FreeCAD CAx development system. * * * @@ -35,7 +35,7 @@ class TechDrawGuiExport SymbolChooser : public QDialog Q_OBJECT public: - SymbolChooser(QWidget *parent = 0, + SymbolChooser(QWidget *parent = 0, QString startDir = QString(), QString source = QString()); diff --git a/src/Mod/TechDraw/Gui/TaskActiveView.cpp b/src/Mod/TechDraw/Gui/TaskActiveView.cpp index 86b426d1cb..f3adae80bb 100644 --- a/src/Mod/TechDraw/Gui/TaskActiveView.cpp +++ b/src/Mod/TechDraw/Gui/TaskActiveView.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) 2019 Wandererfan * * * * This file is part of the FreeCAD CAx development system. * * * @@ -143,7 +143,7 @@ TechDraw::DrawViewSymbol* TaskActiveView::createActiveView(void) std::string fileSpec = Base::Tools::toStdString(tempFile.fileName()); fileSpec = Base::Tools::escapeEncodeFilename(fileSpec); - //double estScale = + //double estScale = Grabber3d::copyActiveViewToSvgFile(appDoc, fileSpec, ui->qsbWidth->rawValue(), ui->qsbHeight->rawValue(), @@ -159,7 +159,7 @@ TechDraw::DrawViewSymbol* TaskActiveView::createActiveView(void) #endif Command::doCommand(Command::Doc,"svg = f.read()"); // Command::doCommand(Command::Doc,"print('length of svg: {}'.format(len(svg)))"); - + Command::doCommand(Command::Doc,"f.close()"); Command::doCommand(Command::Doc,"App.activeDocument().%s.Symbol = svg",symbolName.c_str()); @@ -208,7 +208,7 @@ bool TaskActiveView::accept() bool TaskActiveView::reject() { // Base::Console().Message("TAV::reject()\n"); - //nothing to remove. + //nothing to remove. Gui::Command::doCommand(Gui::Command::Gui,"App.activeDocument().recompute()"); Gui::Command::doCommand(Gui::Command::Gui,"Gui.ActiveDocument.resetEdit()"); diff --git a/src/Mod/TechDraw/Gui/TaskCenterLine.cpp b/src/Mod/TechDraw/Gui/TaskCenterLine.cpp index 0ea4b05191..d09bf5f3ab 100644 --- a/src/Mod/TechDraw/Gui/TaskCenterLine.cpp +++ b/src/Mod/TechDraw/Gui/TaskCenterLine.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) 2019 Wandererfan rbAligned->setEnabled(false); else ui->rbAligned->setEnabled(true); - + Base::Quantity qVal; qVal.setUnit(Base::Unit::Length); qVal.setValue(m_cl->m_vShift); @@ -435,7 +435,7 @@ double TaskCenterLine::getCenterWidth() auto lg = TechDraw::LineGroup::lineGroupFactory(lgName); double width = lg->getWeight("Graphic"); - delete lg; + delete lg; Gui::ViewProvider* vp = QGIView::getViewProvider(m_partFeat); auto partVP = dynamic_cast(vp); if ( partVP != nullptr ) { @@ -491,7 +491,7 @@ bool TaskCenterLine::reject() if (getCreateMode() && (m_partFeat != nullptr) ) { // Base::Console().Message("TCL::reject - create Mode!!\n"); - //nothing to remove. + //nothing to remove. } if (!getCreateMode() && @@ -500,7 +500,7 @@ bool TaskCenterLine::reject() //nothing to un-update } - //make sure any dangling objects are cleaned up + //make sure any dangling objects are cleaned up Gui::Command::doCommand(Gui::Command::Gui,"App.activeDocument().recompute()"); Gui::Command::doCommand(Gui::Command::Gui,"Gui.ActiveDocument.resetEdit()"); diff --git a/src/Mod/TechDraw/Gui/TaskCosVertex.cpp b/src/Mod/TechDraw/Gui/TaskCosVertex.cpp index 89d33f0305..ad40355311 100644 --- a/src/Mod/TechDraw/Gui/TaskCosVertex.cpp +++ b/src/Mod/TechDraw/Gui/TaskCosVertex.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) 2019 Wandererfan * * * * This file is part of the FreeCAD CAx development system. * * * @@ -106,7 +106,7 @@ TaskCosVertex::TaskCosVertex(TechDraw::DrawViewPart* baseFeat, m_view = m_mdi->getQGVPage(); setUiPrimary(); - + connect(ui->pbTracker, SIGNAL(clicked(bool)), this, SLOT(onTrackerClicked(bool))); @@ -164,7 +164,7 @@ void TaskCosVertex::addCosVertex(QPointF qPos) { // Base::Console().Message("TCV::addCosVertex(%s)\n", TechDraw::DrawUtil::formatVector(qPos).c_str()); Base::Vector3d pos(qPos.x(), -qPos.y()); -// int idx = +// int idx = (void) m_baseFeat->addCosmeticVertex(pos); m_baseFeat->requestPaint(); } @@ -350,7 +350,7 @@ bool TaskCosVertex::reject() m_mdi->setContextMenuPolicy(m_saveContextPolicy); } - //make sure any dangling objects are cleaned up + //make sure any dangling objects are cleaned up Gui::Command::doCommand(Gui::Command::Gui,"App.activeDocument().recompute()"); Gui::Command::doCommand(Gui::Command::Gui,"Gui.ActiveDocument.resetEdit()"); diff --git a/src/Mod/TechDraw/Gui/TaskCosmeticLine.cpp b/src/Mod/TechDraw/Gui/TaskCosmeticLine.cpp index 18b6e59d3d..acbbe77d09 100644 --- a/src/Mod/TechDraw/Gui/TaskCosmeticLine.cpp +++ b/src/Mod/TechDraw/Gui/TaskCosmeticLine.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) 2020 Wandererfan qsby2->value().getValue(); z = ui->qsbz2->value().getValue(); Base::Vector3d p1(x, y, z); - + Base::Vector3d centroid = m_partFeat->getOriginalCentroid(); if (ui->rb3d1->isChecked()) { p0 = p0 - centroid; p0 = DrawUtil::invertY(m_partFeat->projectPoint(p0)); - } - + } + if (ui->rb3d2->isChecked()) { p1 = p1 - centroid; p1 = DrawUtil::invertY(m_partFeat->projectPoint(p1)); @@ -284,7 +284,7 @@ bool TaskCosmeticLine::accept() bool TaskCosmeticLine::reject() { - //there's nothing to do. + //there's nothing to do. Gui::Command::doCommand(Gui::Command::Gui,"Gui.ActiveDocument.resetEdit()"); return false; } diff --git a/src/Mod/TechDraw/Gui/TaskDetail.cpp b/src/Mod/TechDraw/Gui/TaskDetail.cpp index 4cae566077..34444a00ee 100644 --- a/src/Mod/TechDraw/Gui/TaskDetail.cpp +++ b/src/Mod/TechDraw/Gui/TaskDetail.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) 2020 Wandererfan * * * * This file is part of the FreeCAD CAx development system. * * * @@ -192,7 +192,7 @@ TaskDetail::TaskDetail(TechDraw::DrawViewDetail* detailFeat): m_baseFeat = dynamic_cast(baseObj); if (m_baseFeat != nullptr) { m_baseName = m_baseFeat->getNameInDocument(); - } else { + } else { Base::Console().Error("TaskDetail - no BaseView. Can not proceed.\n"); return; } @@ -286,8 +286,8 @@ void TaskDetail::setUiFromFeat() Base::Vector3d anchor; TechDraw::DrawViewDetail* detailFeat = getDetailFeat(); - QString detailDisplay = QString::fromUtf8(detailFeat->getNameInDocument()) + - QString::fromUtf8(" / ") + + QString detailDisplay = QString::fromUtf8(detailFeat->getNameInDocument()) + + QString::fromUtf8(" / ") + QString::fromUtf8(detailFeat->Label.getValue()); ui->leDetailView->setText(detailDisplay); anchor = detailFeat->AnchorPoint.getValue(); @@ -419,7 +419,7 @@ void TaskDetail::editByHighlight() } //dragEnd is in scene coords. -void TaskDetail::onHighlightMoved(QPointF dragEnd) +void TaskDetail::onHighlightMoved(QPointF dragEnd) { // Base::Console().Message("TD::onHighlightMoved(%s) - highlight: %X\n", // DrawUtil::formatVector(dragEnd).c_str(), m_ghost); @@ -551,7 +551,7 @@ QPointF TaskDetail::getAnchorScene() basePos = Base::Vector3d (x, -y, 0.0); scale = dvp->getScale(); } else { //part of projection group - + DrawProjGroup* dpg = dpgi->getPGroup(); if (dpg == nullptr) { Base::Console().Message("TD::getAnchorScene - projection group is confused\n"); @@ -568,7 +568,7 @@ QPointF TaskDetail::getAnchorScene() Base::Vector3d xyScene = Rez::guiX(basePos); Base::Vector3d anchorOffsetScene = Rez::guiX(anchorPos) * scale; - Base::Vector3d netPos = xyScene + anchorOffsetScene; + Base::Vector3d netPos = xyScene + anchorOffsetScene; QPointF qAnchor(netPos.x, netPos.y); return qAnchor; } diff --git a/src/Mod/TechDraw/Gui/TaskLeaderLine.cpp b/src/Mod/TechDraw/Gui/TaskLeaderLine.cpp index a3f56ac17a..f9023f4e14 100644 --- a/src/Mod/TechDraw/Gui/TaskLeaderLine.cpp +++ b/src/Mod/TechDraw/Gui/TaskLeaderLine.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) 2019 Wandererfan * * * * This file is part of the FreeCAD CAx development system. * * * @@ -204,7 +204,7 @@ TaskLeaderLine::TaskLeaderLine(TechDraw::DrawView* baseFeat, m_qgParent = nullptr; m_haveMdi = true; m_mdi = vpp->getMDIViewPage(); - if (m_mdi != nullptr) { + if (m_mdi != nullptr) { m_scene = m_mdi->m_scene; m_view = m_mdi->getQGVPage(); if (baseFeat != nullptr) { @@ -217,7 +217,7 @@ TaskLeaderLine::TaskLeaderLine(TechDraw::DrawView* baseFeat, ui->setupUi(this); setUiPrimary(); - + connect(ui->pbTracker, SIGNAL(clicked(bool)), this, SLOT(onTrackerClicked(bool))); connect(ui->pbCancelEdit, SIGNAL(clicked(bool)), @@ -515,7 +515,7 @@ void TaskLeaderLine::onTrackerClicked(bool b) Base::Console().Message("TLL::onTrackerClicked - no Mdi, no Tracker!\n"); return; } - + if ( (m_pbTrackerState == TRACKERSAVE) && (getCreateMode()) ){ if (m_tracker != nullptr) { @@ -568,7 +568,7 @@ void TaskLeaderLine::onTrackerClicked(bool b) QGVPage* qgvp = m_mdi->getQGVPage(); QGIView* qgiv = qgvp->findQViewForDocObj(m_lineFeat); QGILeaderLine* qgLead = dynamic_cast(qgiv); - + if (qgLead == nullptr) { //tarfu Base::Console().Error("TaskLeaderLine - can't find leader graphic\n"); @@ -635,7 +635,7 @@ void TaskLeaderLine::startTracker(void) void TaskLeaderLine::onTrackerFinished(std::vector pts, QGIView* qgParent) { - //in this case, we already know who the parent is. We don't need QGTracker to tell us. + //in this case, we already know who the parent is. We don't need QGTracker to tell us. (void) qgParent; // Base::Console().Message("TTL::onTrackerFinished() - parent: %X\n",qgParent); if (pts.empty()) { @@ -742,7 +742,7 @@ void TaskLeaderLine::onPointEditComplete(void) { // Base::Console().Message("TTL::onPointEditComplete()\n"); m_inProgressLock = false; - + m_pbTrackerState = TRACKEREDIT; ui->pbTracker->setText(QString::fromUtf8("Edit points")); ui->pbTracker->setEnabled(true); @@ -843,7 +843,7 @@ bool TaskLeaderLine::reject() removeTracker(); return false; } - + Gui::Document* doc = Gui::Application::Instance->getDocument(m_basePage->getDocument()); if (!doc) return false; @@ -860,7 +860,7 @@ bool TaskLeaderLine::reject() m_trackerMode = QGTracker::TrackerMode::None; removeTracker(); - //make sure any dangling objects are cleaned up + //make sure any dangling objects are cleaned up Gui::Command::doCommand(Gui::Command::Gui,"App.activeDocument().recompute()"); Gui::Command::doCommand(Gui::Command::Gui,"Gui.ActiveDocument.resetEdit()"); diff --git a/src/Mod/TechDraw/Gui/TaskProjGroup.cpp b/src/Mod/TechDraw/Gui/TaskProjGroup.cpp index a23d30fa62..cdfe743492 100644 --- a/src/Mod/TechDraw/Gui/TaskProjGroup.cpp +++ b/src/Mod/TechDraw/Gui/TaskProjGroup.cpp @@ -1,6 +1,6 @@ /*************************************************************************** * Copyright (c) 2014 Joe Dowsett * - * Copyright (c) 2014 Luke Parry * + * Copyright (c) 2014 Luke Parry * * * * This file is part of the FreeCAD CAx development system. * * * @@ -75,8 +75,8 @@ TaskProjGroup::TaskProjGroup(TechDraw::DrawProjGroup* featView, bool mode) : setFractionalScale(multiView->getScale()); ui->cmbScaleType->setCurrentIndex(multiView->ScaleType.getValue()); - - //Allow or prevent scale changing initially + + //Allow or prevent scale changing initially if (multiView->ScaleType.isValue("Custom")) { ui->sbScaleNum->setEnabled(true); ui->sbScaleDen->setEnabled(true); @@ -170,7 +170,7 @@ void TaskProjGroup::restoreGroupState() Base::Console().Message("TPG::restoreGroupState()\n"); if (multiView != nullptr) { multiView->ProjectionType.setValue(m_saveProjType.c_str()); - multiView->ScaleType.setValue(m_saveScaleType.c_str()); + multiView->ScaleType.setValue(m_saveScaleType.c_str()); multiView->Scale.setValue(m_saveScale); multiView->AutoDistribute.setValue(m_saveAutoDistribute); multiView->spacingX.setValue(m_saveSpacingX); @@ -224,7 +224,7 @@ void TaskProjGroup::rotateButtonClicked(void) multiView->rotateRight(); } else if ( clicked == ui->butLeftRotate) { multiView->rotateLeft(); - } else if ( clicked == ui->butCWRotate ) { + } else if ( clicked == ui->butCWRotate ) { multiView->spinCW(); } else if ( clicked == ui->butCCWRotate) { multiView->spinCCW(); @@ -257,7 +257,7 @@ void TaskProjGroup::scaleTypeChanged(int index) if (blockUpdate) return; - //defaults to prevent scale changing + //defaults to prevent scale changing ui->sbScaleNum->setEnabled(false); ui->sbScaleDen->setEnabled(false); diff --git a/src/Mod/TechDraw/Gui/TaskProjGroup.h b/src/Mod/TechDraw/Gui/TaskProjGroup.h index 0f50bfdd74..f38103b185 100644 --- a/src/Mod/TechDraw/Gui/TaskProjGroup.h +++ b/src/Mod/TechDraw/Gui/TaskProjGroup.h @@ -1,6 +1,6 @@ /*************************************************************************** * Copyright (c) 2011 Joe Dowsett * - * Copyright (c) 2014 Luke Parry * + * Copyright (c) 2014 Luke Parry * * * * This file is part of the FreeCAD CAx development system. * * * @@ -143,7 +143,7 @@ public: const ViewProviderProjGroup * getViewProvider() const { return viewProvider; } TechDraw::DrawProjGroup * getMultiView() const { return multiView; } - + virtual QDialogButtonBox::StandardButtons getStandardButtons() const { return QDialogButtonBox::Ok | QDialogButtonBox::Apply | QDialogButtonBox::Cancel; } virtual void modifyStandardButtons(QDialogButtonBox* box); diff --git a/src/Mod/TechDraw/Gui/TaskRichAnno.cpp b/src/Mod/TechDraw/Gui/TaskRichAnno.cpp index 88c3fd8f5e..41ee00ac22 100644 --- a/src/Mod/TechDraw/Gui/TaskRichAnno.cpp +++ b/src/Mod/TechDraw/Gui/TaskRichAnno.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) 2019 Wandererfan * * * * This file is part of the FreeCAD CAx development system. * * * @@ -108,7 +108,7 @@ TaskRichAnno::TaskRichAnno(TechDrawGui::ViewProviderRichAnno* annoVP) : return; } - //m_baseFeat can be null + //m_baseFeat can be null App::DocumentObject* obj = m_annoFeat->AnnoParent.getValue(); if (obj != nullptr) { if ( obj->isDerivedFrom(TechDraw::DrawView::getClassTypeId()) ) { @@ -123,7 +123,7 @@ TaskRichAnno::TaskRichAnno(TechDrawGui::ViewProviderRichAnno* annoVP) : m_mdi = dvp->getMDIViewPage(); m_qgParent = nullptr; m_haveMdi = true; - if (m_mdi != nullptr) { + if (m_mdi != nullptr) { m_view = m_mdi->getQGVPage(); if (m_baseFeat != nullptr) { m_qgParent = m_view->findQViewForDocObj(m_baseFeat); @@ -183,7 +183,7 @@ TaskRichAnno::TaskRichAnno(TechDraw::DrawView* baseFeat, m_qgParent = nullptr; m_haveMdi = true; m_mdi = dvp->getMDIViewPage(); - if (m_mdi != nullptr) { + if (m_mdi != nullptr) { m_view = m_mdi->getQGVPage(); if (baseFeat != nullptr) { m_qgParent = m_view->findQViewForDocObj(baseFeat); @@ -244,7 +244,7 @@ void TaskRichAnno::setUiPrimary() #endif } -void TaskRichAnno::enableTextUi(bool b) +void TaskRichAnno::enableTextUi(bool b) { ui->pbEditor->setEnabled(b); ui->teAnnoText->setEnabled(b); @@ -266,7 +266,7 @@ void TaskRichAnno::setUiEdit() enableVPUi(true); setWindowTitle(m_title); enableTextUi(true); - + if (m_annoFeat != nullptr) { std::string baseName("None"); App::DocumentObject* docObj = m_annoFeat->AnnoParent.getValue(); @@ -430,7 +430,7 @@ void TaskRichAnno::commonFeatureUpdate(void) { // Base::Console().Message("TRA::commonFeatureUpdate()\n"); m_annoFeat->setPosition(Rez::appX(m_attachPoint.x),Rez::appX(- m_attachPoint.y), true); - m_annoFeat->AnnoText.setValue(ui->teAnnoText->toHtml().toUtf8()); + m_annoFeat->AnnoText.setValue(ui->teAnnoText->toHtml().toUtf8()); m_annoFeat->MaxWidth.setValue(ui->dsbMaxWidth->value().getValue()); m_annoFeat->ShowFrame.setValue(ui->cbShowFrame->isChecked()); } @@ -565,7 +565,7 @@ bool TaskRichAnno::reject() // Base::Console().Message("TRA::reject - edit in progress!!\n"); return false; } - + if (m_basePage != nullptr) { Gui::Document* doc = Gui::Application::Instance->getDocument(m_basePage->getDocument()); if (!doc) { @@ -577,7 +577,7 @@ bool TaskRichAnno::reject() } } - //make sure any dangling objects are cleaned up + //make sure any dangling objects are cleaned up Gui::Command::doCommand(Gui::Command::Gui,"App.activeDocument().recompute()"); Gui::Command::doCommand(Gui::Command::Gui,"Gui.ActiveDocument.resetEdit()"); diff --git a/src/Mod/TechDraw/Gui/TaskWeldingSymbol.cpp b/src/Mod/TechDraw/Gui/TaskWeldingSymbol.cpp index af3b2f06b9..1531c8e860 100644 --- a/src/Mod/TechDraw/Gui/TaskWeldingSymbol.cpp +++ b/src/Mod/TechDraw/Gui/TaskWeldingSymbol.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) 2019 Wandererfan * * * * This file is part of the FreeCAD CAx development system. * * * @@ -132,7 +132,7 @@ TaskWeldingSymbol::TaskWeldingSymbol(TechDraw::DrawWeldSymbol* weld) : Base::Console().Error("TaskWeldingSymbol - bad parameters. Can not proceed.\n"); return; } - + App::DocumentObject* obj = m_weldFeat->Leader.getValue(); if ( (obj != nullptr) && (obj->isDerivedFrom(TechDraw::DrawLeaderLine::getClassTypeId())) ) { @@ -429,7 +429,7 @@ void TaskWeldingSymbol::onDirectorySelected(const QString& newDir) void TaskWeldingSymbol::onSymbolSelected(QString symbolPath, QString source) { -// Base::Console().Message("TWS::onSymbolSelected(%s) - source: %s\n", +// Base::Console().Message("TWS::onSymbolSelected(%s) - source: %s\n", // qPrintable(symbolPath), qPrintable(source)); QIcon targetIcon(symbolPath); QSize iconSize(32,32); @@ -483,12 +483,12 @@ void TaskWeldingSymbol::getTileFeats(void) std::vector tiles = m_weldFeat->getTiles(); m_arrowFeat = nullptr; m_otherFeat = nullptr; - + if (!tiles.empty()) { TechDraw::DrawTileWeld* tempTile = tiles.at(0); if (tempTile->TileRow.getValue() == 0) { m_arrowFeat = tempTile; - } else { + } else { m_otherFeat = tempTile; } } @@ -496,7 +496,7 @@ void TaskWeldingSymbol::getTileFeats(void) TechDraw::DrawTileWeld* tempTile = tiles.at(1); if (tempTile->TileRow.getValue() == 0) { m_arrowFeat = tempTile; - } else { + } else { m_otherFeat = tempTile; } } @@ -506,7 +506,7 @@ void TaskWeldingSymbol::getTileFeats(void) TechDraw::DrawWeldSymbol* TaskWeldingSymbol::createWeldingSymbol(void) { // Base::Console().Message("TWS::createWeldingSymbol()\n"); - + std::string symbolName = m_leadFeat->getDocument()->getUniqueObjectName("WeldSymbol"); std::string symbolType = "TechDraw::DrawWeldSymbol"; @@ -680,7 +680,7 @@ bool TaskWeldingSymbol::accept() bool TaskWeldingSymbol::reject() { // Base::Console().Message("TWS::reject()\n"); - //nothing to remove. + //nothing to remove. Gui::Command::doCommand(Gui::Command::Gui,"App.activeDocument().recompute()"); Gui::Command::doCommand(Gui::Command::Gui,"Gui.ActiveDocument.resetEdit()"); diff --git a/src/Mod/TechDraw/Gui/TemplateTextField.cpp b/src/Mod/TechDraw/Gui/TemplateTextField.cpp index 4f0d751815..a141935e2f 100644 --- a/src/Mod/TechDraw/Gui/TemplateTextField.cpp +++ b/src/Mod/TechDraw/Gui/TemplateTextField.cpp @@ -66,7 +66,7 @@ void TemplateTextField::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) ui.setFieldContent(tmplte->EditableTexts[fieldNameStr]); if (ui.exec() == QDialog::Accepted) { - //WF: why is this escaped? + //WF: why is this escaped? // "<" is converted elsewhere and no other characters cause problems. // escaping causes "&" to appear as "&" etc //#if QT_VERSION >= 0x050000 diff --git a/src/Mod/TechDraw/Gui/ViewProviderGeomHatch.cpp b/src/Mod/TechDraw/Gui/ViewProviderGeomHatch.cpp index 53bee35a91..72ee6209a9 100644 --- a/src/Mod/TechDraw/Gui/ViewProviderGeomHatch.cpp +++ b/src/Mod/TechDraw/Gui/ViewProviderGeomHatch.cpp @@ -1,6 +1,6 @@ /*************************************************************************** * Copyright (c) 2004 Jürgen Riegel * - * Copyright (c) 2017 Wandererfan * + * Copyright (c) 2017 WandererFan * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/TechDraw/Gui/ViewProviderGeomHatch.h b/src/Mod/TechDraw/Gui/ViewProviderGeomHatch.h index 929d73b734..1b5ae16a0a 100644 --- a/src/Mod/TechDraw/Gui/ViewProviderGeomHatch.h +++ b/src/Mod/TechDraw/Gui/ViewProviderGeomHatch.h @@ -1,6 +1,6 @@ /*************************************************************************** * Copyright (c) 2004 Jürgen Riegel * - * Copyright (c) 2017 Wandererfan * + * Copyright (c) 2017 WandererFan * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/TechDraw/Gui/ViewProviderHatch.cpp b/src/Mod/TechDraw/Gui/ViewProviderHatch.cpp index 09aeba1fd8..b1a0266623 100644 --- a/src/Mod/TechDraw/Gui/ViewProviderHatch.cpp +++ b/src/Mod/TechDraw/Gui/ViewProviderHatch.cpp @@ -1,6 +1,6 @@ /*************************************************************************** * Copyright (c) 2004 Jürgen Riegel * - * Copyright (c) 2015 Wandererfan * + * Copyright (c) 2015 WandererFan * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/TechDraw/Gui/ViewProviderHatch.h b/src/Mod/TechDraw/Gui/ViewProviderHatch.h index 07062c0107..cbe9947d3f 100644 --- a/src/Mod/TechDraw/Gui/ViewProviderHatch.h +++ b/src/Mod/TechDraw/Gui/ViewProviderHatch.h @@ -1,6 +1,6 @@ /*************************************************************************** * Copyright (c) 2004 Jürgen Riegel * - * Copyright (c) 2015 Wandererfan * + * Copyright (c) 2015 WandererFan * * * * This file is part of the FreeCAD CAx development system. * * * @@ -62,7 +62,7 @@ public: TechDraw::DrawHatch* getViewObject() const; virtual Gui::MDIView *getMDIView() const override; - + private: static App::PropertyFloatConstraint::Constraints scaleRange; diff --git a/src/Mod/TechDraw/Gui/ViewProviderImage.cpp b/src/Mod/TechDraw/Gui/ViewProviderImage.cpp index d482790773..7f24b81bad 100644 --- a/src/Mod/TechDraw/Gui/ViewProviderImage.cpp +++ b/src/Mod/TechDraw/Gui/ViewProviderImage.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) 2016 WandererFan (wandererfan@gmail.com) * + * Copyright (c) 2016 WandererFan * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/TechDraw/Gui/ViewProviderImage.h b/src/Mod/TechDraw/Gui/ViewProviderImage.h index ea40cbb0d8..9a60c7d2f4 100644 --- a/src/Mod/TechDraw/Gui/ViewProviderImage.h +++ b/src/Mod/TechDraw/Gui/ViewProviderImage.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) 2016 WandererFan (wandererfan@gmail.com) * + * Copyright (c) 2016 WandererFan * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/TechDraw/Gui/ViewProviderPage.cpp b/src/Mod/TechDraw/Gui/ViewProviderPage.cpp index 2fe978b40e..524df6912a 100644 --- a/src/Mod/TechDraw/Gui/ViewProviderPage.cpp +++ b/src/Mod/TechDraw/Gui/ViewProviderPage.cpp @@ -1,6 +1,6 @@ /*************************************************************************** * Copyright (c) 2004 Jürgen Riegel * - * Copyright (c) 2012 Luke Parry * + * Copyright (c) 2012 Luke Parry * * * * This file is part of the FreeCAD CAx development system. * * * @@ -179,18 +179,18 @@ void ViewProviderPage::updateData(const App::Property* prop) signalChangeIcon(); //if the template is changed, rebuild the visual } else if (prop == &(page->Template)) { - if (m_mdiView && + if (m_mdiView && !page->isUnsetting()) { m_mdiView->matchSceneRectToTemplate(); m_mdiView->updateTemplate(); } } else if (prop == &(page->Label)) { - if (m_mdiView && + if (m_mdiView && !page->isUnsetting()) { m_mdiView->setTabText(page->Label.getValue()); } } else if (prop == &page->Views) { - if (m_mdiView && !page->isUnsetting()) + if (m_mdiView && !page->isUnsetting()) m_mdiView->fixOrphans(); } @@ -232,7 +232,7 @@ bool ViewProviderPage::onDelete(const std::vector &) qApp->translate("Std_Delete", "Object dependencies"), bodyMessage, QMessageBox::Yes, QMessageBox::No); if (DialogResult == QMessageBox::Yes) { - removeMDIView(); + removeMDIView(); return true; } else return false; @@ -328,7 +328,7 @@ std::vector ViewProviderPage::claimChildren(void) const // DrawViewDimension // DrawViewBalloon // DrawLeaderLine - // DrawRichAnno + // DrawRichAnno // any FeatuerView in a DrawViewClip // DrawHatch // DrawWeldSymbol @@ -476,7 +476,7 @@ bool ViewProviderPage::canDelete(App::DocumentObject *obj) const } //! Redo the whole visual page -void ViewProviderPage::onGuiRepaint(const TechDraw::DrawPage* dp) +void ViewProviderPage::onGuiRepaint(const TechDraw::DrawPage* dp) { if (dp == getDrawPage()) { if (!m_mdiView.isNull() && diff --git a/src/Mod/TechDraw/Gui/ViewProviderProjGroup.cpp b/src/Mod/TechDraw/Gui/ViewProviderProjGroup.cpp index 6581226794..c857da2fd0 100644 --- a/src/Mod/TechDraw/Gui/ViewProviderProjGroup.cpp +++ b/src/Mod/TechDraw/Gui/ViewProviderProjGroup.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) 2013 Luke Parry * + * Copyright (c) 2013 Luke Parry * * * * This file is part of the FreeCAD CAx development system. * * * @@ -161,7 +161,7 @@ bool ViewProviderProjGroup::onDelete(const std::vector &) // get the items in the group auto objs = claimChildren(); - + // iterate over all item to check which ones have a section or detail view for (auto ObjectIterator : objs) { // get item diff --git a/src/Mod/TechDraw/Gui/ViewProviderProjGroupItem.cpp b/src/Mod/TechDraw/Gui/ViewProviderProjGroupItem.cpp index 49a4329dd7..e7f2de4421 100644 --- a/src/Mod/TechDraw/Gui/ViewProviderProjGroupItem.cpp +++ b/src/Mod/TechDraw/Gui/ViewProviderProjGroupItem.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) 2014 Luke Parry * + * Copyright (c) 2014 Luke Parry * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/TechDraw/Gui/ViewProviderSpreadsheet.cpp b/src/Mod/TechDraw/Gui/ViewProviderSpreadsheet.cpp index f14d20c860..a8f2b1beab 100644 --- a/src/Mod/TechDraw/Gui/ViewProviderSpreadsheet.cpp +++ b/src/Mod/TechDraw/Gui/ViewProviderSpreadsheet.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) 2016 wandererfan * + * Copyright (c) 2016 WandererFan * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/TechDraw/Gui/ViewProviderSpreadsheet.h b/src/Mod/TechDraw/Gui/ViewProviderSpreadsheet.h index 885abb0e86..0ee43c0ac0 100644 --- a/src/Mod/TechDraw/Gui/ViewProviderSpreadsheet.h +++ b/src/Mod/TechDraw/Gui/ViewProviderSpreadsheet.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) 2016 wandererfan * + * Copyright (c) 2016 WandererFan * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/TechDraw/Init.py b/src/Mod/TechDraw/Init.py index 4a21cb375e..041dbd7820 100644 --- a/src/Mod/TechDraw/Init.py +++ b/src/Mod/TechDraw/Init.py @@ -1,8 +1,5 @@ -# FreeCAD init script of the TechDraw module -# (c) 2001 Juergen Riegel - #*************************************************************************** -#* (c) Juergen Riegel (juergen.riegel@web.de) 2002 * +#* Copyright (c) 2002 Juergen Riegel * #* * #* This file is part of the FreeCAD CAx development system. * #* * @@ -22,7 +19,8 @@ #* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * #* USA * #* * -#* Juergen Riegel 2002 * #***************************************************************************/ +# FreeCAD init script of the TechDraw module + FreeCAD.__unit_test__ += [ "TestTechDrawApp" ] diff --git a/src/Mod/TechDraw/InitGui.py b/src/Mod/TechDraw/InitGui.py index 072eee4000..a57eb1b2fc 100644 --- a/src/Mod/TechDraw/InitGui.py +++ b/src/Mod/TechDraw/InitGui.py @@ -1,12 +1,5 @@ -# TechDraw gui init module -# (c) 2003 Juergen Riegel -# -# Gathering all the information to start FreeCAD -# This is the second one of three init scripts, the third one -# runs when the gui is up - #*************************************************************************** -#* (c) 2002 Juergen Riegel * +#* Copyright (c) 2002,2003 Juergen Riegel * #* * #* This file is part of the FreeCAD CAx development system. * #* * @@ -26,9 +19,14 @@ #* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * #* USA * #* * -#* Juergen Riegel 2002 * #***************************************************************************/ +# TechDraw gui init module +# +# Gathering all the information to start FreeCAD +# This is the second one of three init scripts, the third one +# runs when the gui is up + class TechDrawWorkbench (Workbench): "Technical Drawing workbench object" diff --git a/src/Mod/TechDraw/TestTechDrawApp.py b/src/Mod/TechDraw/TestTechDrawApp.py index 743b0e6fd8..0fef944903 100644 --- a/src/Mod/TechDraw/TestTechDrawApp.py +++ b/src/Mod/TechDraw/TestTechDrawApp.py @@ -1,3 +1,4 @@ +#************************************************************************** # Copyright (c) 2015 WandererFan * # * # This file is part of the FreeCAD CAx development system. * diff --git a/src/Mod/TechDraw/moveViews.py b/src/Mod/TechDraw/moveViews.py index 08cd01c37a..443cf3f5bf 100644 --- a/src/Mod/TechDraw/moveViews.py +++ b/src/Mod/TechDraw/moveViews.py @@ -1,10 +1,32 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- +#************************************************************************** +# Copyright (c) 2018 WandererFan * +# * +# This file is part of the FreeCAD CAx development system. * +# * +# This program is free software; you can redistribute it and/or modify * +# it under the terms of the GNU Lesser General Public License (LGPL) * +# as published by the Free Software Foundation; either version 2 of * +# the License, or (at your option) any later version. * +# for detail see the LICENCE text file. * +# * +# FreeCAD is distributed in the hope that it will be useful, * +# but WITHOUT ANY WARRANTY; without even the implied warranty of * +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +# GNU Library General Public License for more details. * +# * +# You should have received a copy of the GNU Library General Public * +# License along with FreeCAD; if not, write to the Free Software * +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * +# USA * +#************************************************************************** -# move Views from Drawing Page to TechDraw Page in the current document -# usage: select 1 Drawing Page and 1 TechDraw Page, run moveViews macro -# outcome: Content of Drawing Page will be inserted into TechDraw Page as DrawViewSymbol -# (ie an SVG symbol) +# Name: moveView macro +# About: move Views from Drawing Page to TechDraw Page in the current doc +# Usage: select 1 Drawing Page and 1 TechDraw Page, run moveViews macro +# Outcome: Content of Drawing Page will be inserted into TechDraw Page as +# DrawViewSymbol (ie an SVG symbol) import FreeCAD import FreeCADGui