From 59fcb80a801e94248ae3184a0d8ca67745c96954 Mon Sep 17 00:00:00 2001 From: luz paz Date: Mon, 16 Nov 2020 14:09:01 -0500 Subject: [PATCH] Web: Fix header uniformity, whitespace, doxygen headers --- src/Mod/Web/App/PreCompiled.cpp | 2 +- src/Mod/Web/App/Server.cpp | 2 +- src/Mod/Web/App/Server.h | 2 +- src/Mod/Web/Gui/AppWebGui.cpp | 2 +- src/Mod/Web/Gui/Command.cpp | 2 +- src/Mod/Web/Gui/CookieJar.h | 10 +-- src/Mod/Web/Gui/PreCompiled.cpp | 4 +- src/Mod/Web/Gui/PreCompiled.h | 2 +- src/Mod/Web/Gui/Workbench.cpp | 136 ++++++++++++++++---------------- src/Mod/Web/Gui/Workbench.h | 2 +- src/Mod/Web/Init.py | 12 ++- src/Mod/Web/InitGui.py | 16 ++-- src/Mod/Web/TestWebGui.py | 1 + src/Mod/Web/web.dox | 3 + 14 files changed, 97 insertions(+), 99 deletions(-) diff --git a/src/Mod/Web/App/PreCompiled.cpp b/src/Mod/Web/App/PreCompiled.cpp index d771f2b925..2e77e4de18 100644 --- a/src/Mod/Web/App/PreCompiled.cpp +++ b/src/Mod/Web/App/PreCompiled.cpp @@ -21,4 +21,4 @@ ***************************************************************************/ -#include "PreCompiled.h" +#include "PreCompiled.h" diff --git a/src/Mod/Web/App/Server.cpp b/src/Mod/Web/App/Server.cpp index 19610bb896..01624a8b6c 100644 --- a/src/Mod/Web/App/Server.cpp +++ b/src/Mod/Web/App/Server.cpp @@ -21,7 +21,7 @@ ***************************************************************************/ -#include "PreCompiled.h" +#include "PreCompiled.h" #include #include diff --git a/src/Mod/Web/App/Server.h b/src/Mod/Web/App/Server.h index fb196a047a..674d402279 100644 --- a/src/Mod/Web/App/Server.h +++ b/src/Mod/Web/App/Server.h @@ -74,7 +74,7 @@ private: QByteArray text; }; -/** +/** * The Server class implements a simple TCP server. */ class AppServer : public QTcpServer diff --git a/src/Mod/Web/Gui/AppWebGui.cpp b/src/Mod/Web/Gui/AppWebGui.cpp index 016abf531e..c665318dff 100644 --- a/src/Mod/Web/Gui/AppWebGui.cpp +++ b/src/Mod/Web/Gui/AppWebGui.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) 2008 Jürgen Riegel (juergen.riegel@web.de) * + * Copyright (c) 2008 Jürgen Riegel * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/Web/Gui/Command.cpp b/src/Mod/Web/Gui/Command.cpp index e97429fe82..9052830378 100644 --- a/src/Mod/Web/Gui/Command.cpp +++ b/src/Mod/Web/Gui/Command.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) 2008 Jürgen Riegel (juergen.riegel@web.de) * + * Copyright (c) 2008 Jürgen Riegel * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/Web/Gui/CookieJar.h b/src/Mod/Web/Gui/CookieJar.h index daba283097..d6c45ddbbe 100644 --- a/src/Mod/Web/Gui/CookieJar.h +++ b/src/Mod/Web/Gui/CookieJar.h @@ -31,22 +31,22 @@ class QNetworkCookieJar; namespace WebGui { class WebGuiExport FcCookieJar : public QNetworkCookieJar { - + Q_OBJECT - + public: FcCookieJar(QObject* parent = 0); virtual ~FcCookieJar(); virtual bool setCookiesFromUrl(const QList&, const QUrl&); - + public Q_SLOTS: void scheduleSaveToDisk(); void loadFromDisk(); void reset(); - + private Q_SLOTS: void saveToDisk(); - + private: void extractRawCookies(); QList m_rawCookies; diff --git a/src/Mod/Web/Gui/PreCompiled.cpp b/src/Mod/Web/Gui/PreCompiled.cpp index 46269e9671..7cd1cae80f 100644 --- a/src/Mod/Web/Gui/PreCompiled.cpp +++ b/src/Mod/Web/Gui/PreCompiled.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) 2008 Jürgen Riegel (juergen.riegel@web.de) * + * Copyright (c) 2008 Jürgen Riegel * * * * This file is part of the FreeCAD CAx development system. * * * @@ -21,4 +21,4 @@ ***************************************************************************/ -#include "PreCompiled.h" +#include "PreCompiled.h" diff --git a/src/Mod/Web/Gui/PreCompiled.h b/src/Mod/Web/Gui/PreCompiled.h index 6d2a4ee6df..8d7b8b9c5c 100644 --- a/src/Mod/Web/Gui/PreCompiled.h +++ b/src/Mod/Web/Gui/PreCompiled.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) 2008 Jürgen Riegel (juergen.riegel@web.de) * + * Copyright (c) 2008 Jürgen Riegel * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/Web/Gui/Workbench.cpp b/src/Mod/Web/Gui/Workbench.cpp index 950549f897..e20a392040 100644 --- a/src/Mod/Web/Gui/Workbench.cpp +++ b/src/Mod/Web/Gui/Workbench.cpp @@ -73,13 +73,13 @@ void Workbench::setupContextMenu(const char* recipient,Gui::MenuItem* item) cons // << "Separator" << "Std_ViewDockUndockFullscreen"; // if ( Gui::Selection().countObjectsOfType(App::DocumentObject::getClassTypeId()) > 0 ) - // *item << "Separator" << "Std_SetAppearance" << "Std_ToggleVisibility" << "Std_TreeSelection" + // *item << "Separator" << "Std_SetAppearance" << "Std_ToggleVisibility" << "Std_TreeSelection" // << "Std_RandomColor" << "Separator" << "Std_Delete"; //} //else if (strcmp(recipient,"Tree") == 0) //{ // if ( Gui::Selection().countObjectsOfType(App::DocumentObject::getClassTypeId()) > 0 ) - // *item << "Std_SetAppearance" << "Std_ToggleVisibility" + // *item << "Std_SetAppearance" << "Std_ToggleVisibility" // << "Std_RandomColor" << "Separator" << "Std_Delete"; //} } @@ -96,7 +96,7 @@ Gui::MenuItem* Workbench::setupMenuBar() const // file->setCommand("&File"); // *file << "Std_New" << "Std_Open" << "Separator" << "Std_CloseActiveWindow" // << "Std_CloseAllWindows" << "Separator" << "Std_Save" << "Std_SaveAs" -// << "Separator" << "Std_Import" << "Std_Export" << "Std_ProjectInfo" +// << "Separator" << "Std_Import" << "Std_Export" << "Std_ProjectInfo" // //<< "Separator" << "Std_Print" << "Std_PrintPdf" // << "Separator" << "Std_RecentFiles" << "Separator" << "Std_Quit"; // @@ -113,14 +113,14 @@ Gui::MenuItem* Workbench::setupMenuBar() const // stdviews->setCommand("Standard views"); // *stdviews << "Std_ViewFitAll" << "Std_ViewFitSelection" << "Std_ViewAxo" // << "Separator" << "Std_ViewFront" << "Std_ViewRight" -// << "Std_ViewTop" << "Separator" << "Std_ViewRear" +// << "Std_ViewTop" << "Separator" << "Std_ViewRear" // << "Std_ViewLeft" << "Std_ViewBottom"; // // // stereo // Gui::MenuItem* view3d = new Gui::MenuItem; // view3d->setCommand("&Stereo"); -// *view3d << "Std_ViewIvStereoRedGreen" << "Std_ViewIvStereoQuadBuff" -// << "Std_ViewIvStereoInterleavedRows" << "Std_ViewIvStereoInterleavedColumns" +// *view3d << "Std_ViewIvStereoRedGreen" << "Std_ViewIvStereoQuadBuff" +// << "Std_ViewIvStereoInterleavedRows" << "Std_ViewIvStereoInterleavedColumns" // << "Std_ViewIvStereoOff" << "Separator" << "Std_ViewIvIssueCamPos"; // // // zoom @@ -137,19 +137,19 @@ Gui::MenuItem* Workbench::setupMenuBar() const // // View // Gui::MenuItem* view = new Gui::MenuItem( menuBar ); // view->setCommand("&View"); -// *view << "Std_ViewCreate" << "Std_OrthographicCamera" << "Std_PerspectiveCamera" << "Separator" +// *view << "Std_ViewCreate" << "Std_OrthographicCamera" << "Std_PerspectiveCamera" << "Separator" // << stdviews << "Std_FreezeViews" << "Separator" << view3d << zoom // << "Std_ViewDockUndockFullscreen" << "Std_ToggleClipPlane" << "Separator" << visu -// << "Std_SetAppearance" << "Std_ToggleVisibility" << "Std_RandomColor" << "Separator" -// //<< "Std_MeasureDistance" << "Separator" -// << "Std_Workbench" << "Std_ToolBarMenu" << "Std_DockViewMenu" << "Separator" +// << "Std_SetAppearance" << "Std_ToggleVisibility" << "Std_RandomColor" << "Separator" +// //<< "Std_MeasureDistance" << "Separator" +// << "Std_Workbench" << "Std_ToolBarMenu" << "Std_DockViewMenu" << "Separator" // << "Std_ViewStatusBar" << "Std_UserInterface"; // // // Tools // Gui::MenuItem* tool = new Gui::MenuItem( menuBar ); // tool->setCommand("&Tools"); // *tool << "Std_CommandLine" << "Std_DlgParameter" << "Separator" << "Std_DlgMacroRecord" -// << "Std_MacroStopRecord" << "Std_DlgMacroExecute" << "Std_DlgMacroExecuteDirect" +// << "Std_MacroStopRecord" << "Std_DlgMacroExecute" << "Std_DlgMacroExecuteDirect" // << "Separator" << "Std_ViewScreenShot" << "Separator" << "Std_DlgCustomize"; // // // Mesh **************************************************************************************************** @@ -158,40 +158,40 @@ Gui::MenuItem* Workbench::setupMenuBar() const // // submenu analyze // Gui::MenuItem* analyze = new Gui::MenuItem(); // analyze->setCommand("Analyze"); -// *analyze << "Mesh_Evaluation" -// << "Mesh_EvaluateFacet" -// << "Mesh_CurvatureInfo" -// << "Separator" -// << "Mesh_EvaluateSolid" +// *analyze << "Mesh_Evaluation" +// << "Mesh_EvaluateFacet" +// << "Mesh_CurvatureInfo" +// << "Separator" +// << "Mesh_EvaluateSolid" // << "Mesh_BoundingBox"; // // // submenu boolean // Gui::MenuItem* boolean = new Gui::MenuItem(); // boolean->setCommand("Boolean"); -// *boolean << "Mesh_Union" -// << "Mesh_Intersection" +// *boolean << "Mesh_Union" +// << "Mesh_Intersection" // << "Mesh_Difference"; // // mesh->setCommand("&Meshes"); -// *mesh << "Mesh_Import" -// << "Mesh_Export" -// << "Mesh_FromGeometry" +// *mesh << "Mesh_Import" +// << "Mesh_Export" +// << "Mesh_FromGeometry" // << "Separator" -// << analyze -// << "Mesh_HarmonizeNormals" -// << "Mesh_FlipNormals" -// << "Separator" -// << "Mesh_FillupHoles" -// << "Mesh_FillInteractiveHole" +// << analyze +// << "Mesh_HarmonizeNormals" +// << "Mesh_FlipNormals" +// << "Separator" +// << "Mesh_FillupHoles" +// << "Mesh_FillInteractiveHole" // << "Mesh_RemoveComponents" -// << "Mesh_RemoveCompByHand" -// << "Separator" -// << "Mesh_BuildRegularSolid" -// << boolean << "Separator" +// << "Mesh_RemoveCompByHand" +// << "Separator" +// << "Mesh_BuildRegularSolid" +// << boolean << "Separator" // << "Mesh_PolyCut" -// << "Mesh_PolySplit" -// << "Mesh_PolySegm" -// << "Mesh_ToolMesh" +// << "Mesh_PolySplit" +// << "Mesh_PolySegm" +// << "Mesh_ToolMesh" // << "Mesh_VertexCurvature"; // // // Part **************************************************************************************************** @@ -218,10 +218,10 @@ Gui::MenuItem* Workbench::setupMenuBar() const // if (mgr.getCommandByName("Sketcher_NewSketch")) { // Gui::MenuItem* sketch = new Gui::MenuItem(menuBar); // sketch->setCommand("Ske&tch"); -// *sketch +// *sketch // << "Sketcher_NewSketch" -// << "Separator" -// << "PartDesign_Pad" +// << "Separator" +// << "PartDesign_Pad" // << "PartDesign_Fillet" // ; // } @@ -233,10 +233,10 @@ Gui::MenuItem* Workbench::setupMenuBar() const // // drawing->setCommand("&Drawing"); // *drawing -// << "Drawing_Open" -// << "Separator" -// << "Drawing_NewA3Landscape" -// << "Drawing_NewView" +// << "Drawing_Open" +// << "Separator" +// << "Drawing_NewA3Landscape" +// << "Drawing_NewView" // << "Drawing_ExportPage" // ; // @@ -245,10 +245,10 @@ Gui::MenuItem* Workbench::setupMenuBar() const // Gui::MenuItem* raytracing = new Gui::MenuItem(menuBar); // // raytracing->setCommand("&Raytracing"); -// *raytracing -// << "Raytracing_WriteView" -// << "Raytracing_WriteCamera" -// << "Raytracing_WritePart"; +// *raytracing +// << "Raytracing_WriteView" +// << "Raytracing_WriteCamera" +// << "Raytracing_WritePart"; // ; // // // Drafting **************************************************************************************************** @@ -257,7 +257,7 @@ Gui::MenuItem* Workbench::setupMenuBar() const // Gui::MenuItem* Drafting = new Gui::MenuItem(menuBar); // // Drafting->setCommand("&Drafting"); -// *Drafting +// *Drafting // << "Draft_SelectPlane" // << "Draft_Line" // << "Draft_Polyline" @@ -266,15 +266,15 @@ Gui::MenuItem* Workbench::setupMenuBar() const // << "Draft_Rectangle" // << "Draft_Text" // << "Draft_Dimension" -// << "Separator" -// << "Draft_Move" -// << "Draft_Rotate" -// << "Draft_Offset" -// << "Draft_Trimex" -// << "Draft_Upgrade" -// << "Draft_Downgrade" -// << "Draft_Scale" -// << "Separator" +// << "Separator" +// << "Draft_Move" +// << "Draft_Rotate" +// << "Draft_Offset" +// << "Draft_Trimex" +// << "Draft_Upgrade" +// << "Draft_Downgrade" +// << "Draft_Scale" +// << "Separator" // << "Draft_ApplyStyle" // ; // } @@ -289,7 +289,7 @@ Gui::MenuItem* Workbench::setupMenuBar() const // *wnd << "Std_ActivateNextWindow" << "Std_ActivatePrevWindow" << "Separator" // << "Std_TileWindows" << "Std_CascadeWindows" // << "Std_ArrangeIcons" << "Separator" << "Std_WindowsMenu" << "Std_Windows"; -// +// // // help **************************************************************************************************** // // Separator // Gui::MenuItem* sep = new Gui::MenuItem( menuBar ); @@ -298,21 +298,21 @@ Gui::MenuItem* Workbench::setupMenuBar() const // // Help // Gui::MenuItem* helpWebsites = new Gui::MenuItem; // helpWebsites->setCommand("&Online-help"); -// *helpWebsites << "Std_OnlineHelpWebsite" -// << "Std_FreeCADWebsite" +// *helpWebsites << "Std_OnlineHelpWebsite" +// << "Std_FreeCADWebsite" // << "Std_PythonWebsite"; // // Gui::MenuItem* help = new Gui::MenuItem( menuBar ); // help->setCommand("&Help"); -// *help << "Std_OnlineHelp" +// *help << "Std_OnlineHelp" // << "Std_PythonHelp" -// << helpWebsites -// << "Separator" -// << "Test_Test" -// << "Separator" +// << helpWebsites +// << "Separator" +// << "Test_Test" +// << "Separator" // << "Std_About" -// << "Std_AboutQt" -// << "Separator" +// << "Std_AboutQt" +// << "Separator" // << "Std_WhatsThis" ; // // return menuBar; @@ -328,9 +328,9 @@ Gui::ToolBarItem* Workbench::setupToolBars() const *navigation << "Web_BrowserSetURL" << "Separator" << "Web_OpenWebsite" - << "Separator" - << "Web_BrowserBack" - << "Web_BrowserNext" + << "Separator" + << "Web_BrowserBack" + << "Web_BrowserNext" << "Web_BrowserRefresh" << "Web_BrowserStop" << "Separator" diff --git a/src/Mod/Web/Gui/Workbench.h b/src/Mod/Web/Gui/Workbench.h index cec3e02e8f..9cf19651b5 100644 --- a/src/Mod/Web/Gui/Workbench.h +++ b/src/Mod/Web/Gui/Workbench.h @@ -56,4 +56,4 @@ protected: }; // namespace WebGui } -#endif // WEB_WORKBENCH_H +#endif // WEB_WORKBENCH_H diff --git a/src/Mod/Web/Init.py b/src/Mod/Web/Init.py index 467462446c..45cc57a7fd 100644 --- a/src/Mod/Web/Init.py +++ b/src/Mod/Web/Init.py @@ -1,8 +1,5 @@ -# FreeCAD init script of the Web module -# (c) 2001 Juergen Riegel - #*************************************************************************** -#* (c) Juergen Riegel (juergen.riegel@web.de) 2002 * +#* Copyright (c) 2001,2002 Jürgen Riegel * #* * #* This file is part of the FreeCAD CAx development system. * #* * @@ -13,14 +10,15 @@ #* 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 * +#* but WITHOUT ANY WARRANTY; without even the implied warranty of * #* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * #* GNU Lesser 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 * +#* License along with FreeCAD; if not, write to the Free Software * #* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * #* USA * #* * -#* Juergen Riegel 2002 * #***************************************************************************/ + +# FreeCAD init script of the Web module diff --git a/src/Mod/Web/InitGui.py b/src/Mod/Web/InitGui.py index a3daa1455f..5c708f32af 100644 --- a/src/Mod/Web/InitGui.py +++ b/src/Mod/Web/InitGui.py @@ -1,12 +1,5 @@ -# Web 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) Juergen Riegel (juergen.riegel@web.de) 2002 * +#* Copyright (c) 2002,2003 Jürgen Riegel * #* * #* This file is part of the FreeCAD CAx development system. * #* * @@ -25,10 +18,13 @@ #* License along with FreeCAD; if not, write to the Free Software * #* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * #* USA * -#* * -#* Juergen Riegel 2002 * #***************************************************************************/ +# Web 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 WebWorkbench ( Workbench ): diff --git a/src/Mod/Web/TestWebGui.py b/src/Mod/Web/TestWebGui.py index a8da0f46b4..616bfe55fd 100644 --- a/src/Mod/Web/TestWebGui.py +++ b/src/Mod/Web/TestWebGui.py @@ -1,3 +1,4 @@ +#************************************************************************** # Copyright (c) 2018 Werner Mayer * # * # This file is part of the FreeCAD CAx development system. * diff --git a/src/Mod/Web/web.dox b/src/Mod/Web/web.dox index bc50f1606b..778cb5edcd 100644 --- a/src/Mod/Web/web.dox +++ b/src/Mod/Web/web.dox @@ -1,5 +1,8 @@ /** \defgroup WEB Web * \ingroup CWORKBENCHES * \brief The webkit-based web browser of FreeCAD + +See \ref src/Mod/Draft/draft.dox as an example of how to populate this page + */