diff --git a/cMake/FreeCAD_Helpers/CheckInterModuleDependencies.cmake b/cMake/FreeCAD_Helpers/CheckInterModuleDependencies.cmake
index 334d3b2325..80c627e516 100644
--- a/cMake/FreeCAD_Helpers/CheckInterModuleDependencies.cmake
+++ b/cMake/FreeCAD_Helpers/CheckInterModuleDependencies.cmake
@@ -36,6 +36,5 @@ macro(CheckInterModuleDependencies)
REQUIRES_MODS(BUILD_SANDBOX BUILD_PART BUILD_MESH)
REQUIRES_MODS(BUILD_SKETCHER BUILD_PART)
REQUIRES_MODS(BUILD_SPREADSHEET BUILD_DRAFT)
- REQUIRES_MODS(BUILD_START BUILD_WEB)
REQUIRES_MODS(BUILD_TECHDRAW BUILD_PART BUILD_SPREADSHEET)
endmacro(CheckInterModuleDependencies)
diff --git a/cMake/FreeCAD_Helpers/InitializeFreeCADBuildOptions.cmake b/cMake/FreeCAD_Helpers/InitializeFreeCADBuildOptions.cmake
index 297492fc6c..a08f96438d 100644
--- a/cMake/FreeCAD_Helpers/InitializeFreeCADBuildOptions.cmake
+++ b/cMake/FreeCAD_Helpers/InitializeFreeCADBuildOptions.cmake
@@ -132,7 +132,7 @@ macro(InitializeFreeCADBuildOptions)
option(BUILD_TEST "Build the FreeCAD test module" ON)
option(BUILD_TECHDRAW "Build the FreeCAD Technical Drawing module" ON)
option(BUILD_TUX "Build the FreeCAD Tux module" ON)
- option(BUILD_WEB "Build the FreeCAD web module" ON)
+ option(BUILD_WEB "Build the FreeCAD Web module" ON)
option(BUILD_SURFACE "Build the FreeCAD surface module" ON)
option(BUILD_VR "Build the FreeCAD Oculus Rift support (need Oculus SDK 4.x or higher)" OFF)
option(BUILD_CLOUD "Build the FreeCAD cloud module" OFF)
diff --git a/cMake/FreeCAD_Helpers/PrintFinalReport.cmake b/cMake/FreeCAD_Helpers/PrintFinalReport.cmake
index adb4c97a13..eba9667db2 100644
--- a/cMake/FreeCAD_Helpers/PrintFinalReport.cmake
+++ b/cMake/FreeCAD_Helpers/PrintFinalReport.cmake
@@ -95,6 +95,7 @@ macro(PrintFinalReport)
value(BUILD_DRAFT)
value(BUILD_DRAWING)
value(BUILD_FEM)
+ value(BUILD_WEB)
value(BUILD_HELP)
value(BUILD_IDF)
value(BUILD_IMPORT)
@@ -174,8 +175,6 @@ macro(PrintFinalReport)
"not built (BUILD_DESIGNER_PLUGIN is OFF)"
"[${DESIGNER_PLUGIN_LOCATION}/${libFreeCAD_widgets}]"
)
- else()
- simple(QtWebKitWidgets "not needed")
endif()
conditional(Shiboken Shiboken${SHIBOKEN_MAJOR_VERSION}_FOUND "not found" "${Shiboken_VERSION} [${SHIBOKEN_INCLUDE_DIR}]")
conditional(PySide PySide${PYSIDE_MAJOR_VERSION}_FOUND "not found" "${PySide_VERSION} [${PYSIDE_INCLUDE_DIR}]")
diff --git a/src/Mod/CMakeLists.txt b/src/Mod/CMakeLists.txt
index 7873061e5c..c7101069f6 100644
--- a/src/Mod/CMakeLists.txt
+++ b/src/Mod/CMakeLists.txt
@@ -10,10 +10,6 @@ if(BUILD_ASSEMBLY)
add_subdirectory(Assembly)
endif(BUILD_ASSEMBLY)
-if(BUILD_CLEANSTART)
- add_subdirectory(CleanStart)
-endif(BUILD_CLEANSTART)
-
if(BUILD_CLOUD)
add_subdirectory(Cloud)
endif(BUILD_CLOUD)
@@ -119,7 +115,7 @@ if(BUILD_SPREADSHEET)
endif(BUILD_SPREADSHEET)
if(BUILD_START)
- add_subdirectory(Start)
+ add_subdirectory(Start)
endif(BUILD_START)
if(BUILD_SURFACE)
@@ -142,5 +138,5 @@ if(BUILD_TUX)
endif(BUILD_TUX)
if(BUILD_WEB)
- add_subdirectory(Web)
+ add_subdirectory(Web)
endif(BUILD_WEB)
diff --git a/src/Mod/CleanStart/App/AppCleanStart.cpp b/src/Mod/CleanStart/App/AppCleanStart.cpp
deleted file mode 100644
index f0d300cc67..0000000000
--- a/src/Mod/CleanStart/App/AppCleanStart.cpp
+++ /dev/null
@@ -1,60 +0,0 @@
-// SPDX-License-Identifier: LGPL-2.1-or-later
-/****************************************************************************
- * *
-# Copyright (c) 2024 The FreeCAD Project Association AISBL *
- * *
- * This file is part of FreeCAD. *
- * *
- * FreeCAD is free software: you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation, either version 2.1 of the *
- * License, or (at your option) any later version. *
- * *
- * 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 *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with FreeCAD. If not, see *
- * . *
- * *
- ***************************************************************************/
-
-#include "PreCompiled.h"
-
-#include
-#include
-#include
-
-#include
-
-#include <3rdParty/GSL/include/gsl/pointers>
-
-namespace CleanStart
-{
-class Module: public Py::ExtensionModule
-{
-public:
- Module()
- : Py::ExtensionModule("CleanStart")
- {
- initialize("This module is the CleanStart module."); // register with Python
- }
-};
-
-PyObject* initModule()
-{
- auto newModule = gsl::owner(new Module);
- return Base::Interpreter().addModule(newModule); // Transfer ownership
-}
-
-} // namespace CleanStart
-
-/* Python entry */
-PyMOD_INIT_FUNC(CleanStart)
-{
- PyObject* mod = CleanStart::initModule();
- Base::Console().Log("Loading CleanStart module... done\n");
- PyMOD_Return(mod);
-}
diff --git a/src/Mod/CleanStart/App/CMakeLists.txt b/src/Mod/CleanStart/App/CMakeLists.txt
deleted file mode 100644
index 40dd253fb8..0000000000
--- a/src/Mod/CleanStart/App/CMakeLists.txt
+++ /dev/null
@@ -1,50 +0,0 @@
-# SPDX-License-Identifier: LGPL-2.1-or-later
-# /****************************************************************************
-# * *
-# * Copyright (c) 2024 The FreeCAD Project Association AISBL *
-# * *
-# * This file is part of FreeCAD. *
-# * *
-# * FreeCAD is free software: you can redistribute it and/or modify it *
-# * under the terms of the GNU Lesser General Public License as *
-# * published by the Free Software Foundation, either version 2.1 of the *
-# * License, or (at your option) any later version. *
-# * *
-# * 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 *
-# * Lesser General Public License for more details. *
-# * *
-# * You should have received a copy of the GNU Lesser General Public *
-# * License along with FreeCAD. If not, see *
-# * . *
-# * *
-# ***************************************************************************/
-
-include_directories(
- ${PYTHON_INCLUDE_DIRS}
- ${QtCore_INCLUDE_DIRS}
-)
-
-set(CleanStart_LIBS
- FreeCADApp
- )
-
-SET(CleanStart_SRCS
- AppCleanStart.cpp
- DisplayedFilesModel.cpp
- DisplayedFilesModel.h
- ExamplesModel.cpp
- ExamplesModel.h
- PreCompiled.cpp
- PreCompiled.h
- RecentFilesModel.cpp
- RecentFilesModel.h)
-
-add_library(CleanStart SHARED ${CleanStart_SRCS})
-target_link_libraries(CleanStart ${CleanStart_LIBS})
-
-SET_BIN_DIR(CleanStart CleanStart /Mod/CleanStart)
-SET_PYTHON_PREFIX_SUFFIX(CleanStart)
-
-INSTALL(TARGETS CleanStart DESTINATION ${CMAKE_INSTALL_LIBDIR})
diff --git a/src/Mod/CleanStart/App/PreCompiled.cpp b/src/Mod/CleanStart/App/PreCompiled.cpp
deleted file mode 100644
index b17d7731bd..0000000000
--- a/src/Mod/CleanStart/App/PreCompiled.cpp
+++ /dev/null
@@ -1,25 +0,0 @@
-// SPDX-License-Identifier: LGPL-2.1-or-later
-/****************************************************************************
- * *
-# Copyright (c) 2024 The FreeCAD Project Association AISBL *
- * *
- * This file is part of FreeCAD. *
- * *
- * FreeCAD is free software: you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation, either version 2.1 of the *
- * License, or (at your option) any later version. *
- * *
- * 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 *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with FreeCAD. If not, see *
- * . *
- * *
- ***************************************************************************/
-
-
-#include "PreCompiled.h"
diff --git a/src/Mod/CleanStart/App/PreCompiled.h b/src/Mod/CleanStart/App/PreCompiled.h
deleted file mode 100644
index 711517255f..0000000000
--- a/src/Mod/CleanStart/App/PreCompiled.h
+++ /dev/null
@@ -1,51 +0,0 @@
-// SPDX-License-Identifier: LGPL-2.1-or-later
-/****************************************************************************
- * *
-# Copyright (c) 2024 The FreeCAD Project Association AISBL *
- * *
- * This file is part of FreeCAD. *
- * *
- * FreeCAD is free software: you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation, either version 2.1 of the *
- * License, or (at your option) any later version. *
- * *
- * 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 *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with FreeCAD. If not, see *
- * . *
- * *
- ***************************************************************************/
-
-#ifndef CLEANSTART_PRECOMPILED_H
-#define CLEANSTART_PRECOMPILED_H
-
-#include
-
-#ifdef _MSC_VER
-#pragma warning(disable : 5208)
-#endif
-
-#ifdef _PreComp_
-
-// standard
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-// Qt (should never include GUI files, only QtCore)
-#include
-#include
-#include
-
-#endif // _PreComp_
-#endif // CLEANSTART_PRECOMPILED_H
diff --git a/src/Mod/CleanStart/CMakeLists.txt b/src/Mod/CleanStart/CMakeLists.txt
deleted file mode 100644
index 7f6a38c845..0000000000
--- a/src/Mod/CleanStart/CMakeLists.txt
+++ /dev/null
@@ -1,49 +0,0 @@
-# SPDX-License-Identifier: LGPL-2.1-or-later
-# /****************************************************************************
-# * *
-# * Copyright (c) 2024 The FreeCAD Project Association AISBL *
-# * *
-# * This file is part of FreeCAD. *
-# * *
-# * FreeCAD is free software: you can redistribute it and/or modify it *
-# * under the terms of the GNU Lesser General Public License as *
-# * published by the Free Software Foundation, either version 2.1 of the *
-# * License, or (at your option) any later version. *
-# * *
-# * 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 *
-# * Lesser General Public License for more details. *
-# * *
-# * You should have received a copy of the GNU Lesser General Public *
-# * License along with FreeCAD. If not, see *
-# * . *
-# * *
-# ***************************************************************************/
-
-add_subdirectory(App)
-
-set(CleanStart_Scripts
- Init.py
- )
-
-if (BUILD_GUI)
- add_subdirectory(Gui)
- list(APPEND CleanStart_Scripts InitGui.py)
-endif (BUILD_GUI)
-
-add_custom_target(CleanStartScripts ALL
- SOURCES ${CleanStart_Scripts}
- )
-
-fc_target_copy_resource(CleanStartScripts
- ${CMAKE_CURRENT_SOURCE_DIR}
- ${CMAKE_BINARY_DIR}/Mod/CleanStart
- ${CleanStart_Scripts})
-
-INSTALL(
- FILES
- ${CleanStart_Scripts}
- DESTINATION
- Mod/CleanStart
-)
diff --git a/src/Mod/CleanStart/CleanStartGlobal.h b/src/Mod/CleanStart/CleanStartGlobal.h
deleted file mode 100644
index c4d367d858..0000000000
--- a/src/Mod/CleanStart/CleanStartGlobal.h
+++ /dev/null
@@ -1,48 +0,0 @@
-// SPDX-License-Identifier: LGPL-2.1-or-later
-/****************************************************************************
- * *
- * Copyright (c) 2024 The FreeCAD Project Association AISBL *
- * *
- * This file is part of FreeCAD. *
- * *
- * FreeCAD is free software: you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation, either version 2.1 of the *
- * License, or (at your option) any later version. *
- * *
- * 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 *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with FreeCAD. If not, see *
- * . *
- * *
- ***************************************************************************/
-
-#include
-
-#ifndef LAUNCHER_GLOBAL_H
-#define LAUNCHER_GLOBAL_H
-
-
-// CleanStart
-#ifndef CleanStartExport
-#ifdef CleanStart_EXPORTS
-#define CleanStartExport FREECAD_DECL_EXPORT
-#else
-#define CleanStartExport FREECAD_DECL_IMPORT
-#endif
-#endif
-
-// CleanStartGui
-#ifndef CleanStartGuiExport
-#ifdef CleanStartGui_EXPORTS
-#define CleanStartGuiExport FREECAD_DECL_EXPORT
-#else
-#define CleanStartGuiExport FREECAD_DECL_IMPORT
-#endif
-#endif
-
-#endif // LAUNCHER_GLOBAL_H
diff --git a/src/Mod/CleanStart/Gui/AppCleanStartGui.cpp b/src/Mod/CleanStart/Gui/AppCleanStartGui.cpp
deleted file mode 100644
index 47dbb42dd3..0000000000
--- a/src/Mod/CleanStart/Gui/AppCleanStartGui.cpp
+++ /dev/null
@@ -1,81 +0,0 @@
-// SPDX-License-Identifier: LGPL-2.1-or-later
-/****************************************************************************
- * *
- * Copyright (c) 2024 The FreeCAD Project Association AISBL *
- * *
- * This file is part of FreeCAD. *
- * *
- * FreeCAD is free software: you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation, either version 2.1 of the *
- * License, or (at your option) any later version. *
- * *
- * 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 *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with FreeCAD. If not, see *
- * . *
- * *
- ***************************************************************************/
-
-#include "PreCompiled.h"
-
-#include
-#include
-#include
-#include
-
-#include
-
-#include <3rdParty/GSL/include/gsl/pointers>
-
-#include "Workbench.h"
-
-void loadCleanStartResource()
-{
- // add resources and reloads the translators
- Q_INIT_RESOURCE(CleanStart);
- Q_INIT_RESOURCE(CleanStart_translation);
- Gui::Translator::instance()->refresh();
-}
-
-namespace CleanStartGui
-{
- extern PyObject* initModule();
-}
-
-
-namespace CleanStartGui
-{
-class Module: public Py::ExtensionModule
-{
-public:
- Module()
- : Py::ExtensionModule("CleanStartGui")
- {
- initialize("This module is the CleanStartGui module."); // register with Python
- }
-};
-
-PyObject* initModule()
-{
- auto newModule = gsl::owner(new Module);
- return Base::Interpreter().addModule(newModule); // Transfer ownership
-}
-
-} // namespace CleanStartGui
-
-/* Python entry */
-PyMOD_INIT_FUNC(CleanStartGui)
-{
- Base::Console().Log("Loading GUI of CleanStart module... ");
- PyObject* mod = CleanStartGui::initModule();
- CleanStartGui::Workbench::init();
- loadCleanStartResource();
- Base::Console().Log("done\n");
-
- PyMOD_Return(mod);
-}
diff --git a/src/Mod/CleanStart/Gui/CMakeLists.txt b/src/Mod/CleanStart/Gui/CMakeLists.txt
deleted file mode 100644
index 01a7b02b4f..0000000000
--- a/src/Mod/CleanStart/Gui/CMakeLists.txt
+++ /dev/null
@@ -1,89 +0,0 @@
-# SPDX-License-Identifier: LGPL-2.1-or-later
-# /****************************************************************************
-# * *
-# * Copyright (c) 2024 The FreeCAD Project Association AISBL *
-# * *
-# * This file is part of FreeCAD. *
-# * *
-# * FreeCAD is free software: you can redistribute it and/or modify it *
-# * under the terms of the GNU Lesser General Public License as *
-# * published by the Free Software Foundation, either version 2.1 of the *
-# * License, or (at your option) any later version. *
-# * *
-# * 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 *
-# * Lesser General Public License for more details. *
-# * *
-# * You should have received a copy of the GNU Lesser General Public *
-# * License along with FreeCAD. If not, see *
-# * . *
-# * *
-# ***************************************************************************/
-
-include_directories(
- ${CMAKE_CURRENT_BINARY_DIR}
- ${PYTHON_INCLUDE_DIRS}
- ${Boost_INCLUDE_DIRS}
- ${ZLIB_INCLUDE_DIR}
- ${XercesC_INCLUDE_DIRS}
- ${QtCore_INCLUDE_DIRS}
- ${QtWidgets_INCLUDE_DIRS}
- ${QtSvg_INCLUDE_DIRS}
- #${QtNetwork_INCLUDE_DIRS}
- ${QtUiTools_INCLUDE_DIRS}
- #${QtQuick_INCLUDE_DIRS}
- #${QtQuickWidgets_INCLUDE_DIRS}
-)
-
-set(CleanStartGui_LIBS
- CleanStart
- FreeCADGui
- )
-
-set(CleanStart_TR_QRC ${CMAKE_CURRENT_BINARY_DIR}/Resources/CleanStart_translation.qrc)
-qt_find_and_add_translation(QM_SRCS "Resources/translations/*_*.ts"
- ${CMAKE_CURRENT_BINARY_DIR}/Resources/translations)
-qt_create_resource_file(${CleanStart_TR_QRC} ${QM_SRCS})
-qt_add_resources(CleanStart_QRC_SRCS Resources/CleanStart.qrc ${CleanStart_TR_QRC})
-# qtquick_compiler_add_resources(CleanStart_QRC_SRCS Resources/CleanStart.qrc ${CleanStart_TR_QRC} qml.qrc)
-
-SET(CleanStartGui_SRCS
- ${CleanStart_QRC_SRCS}
- ${CleanStartGui_UIC_SRCS}
- AppCleanStartGui.cpp
- Command.cpp
- PreCompiled.cpp
- PreCompiled.h
- CleanStartView.cpp
- CleanStartView.h
- FileCardDelegate.cpp
- FileCardDelegate.h
- FileCardView.cpp
- FileCardView.h
- Workbench.cpp
- Workbench.h
- )
-
-SET(CleanStartGuiIcon_SVG
- Resources/icons/CleanStartWorkbench.svg
- )
-
-# TODO: Evaluate PCH use with Qt6/QtQuick/Qml
-if (FREECAD_USE_PCH)
- add_definitions(-D_PreComp_)
- GET_MSVC_PRECOMPILED_SOURCE("PreCompiled.cpp" PCH_SRCS ${CleanStartGui_SRCS})
- ADD_MSVC_PRECOMPILED_HEADER(CleanStartGui PreCompiled.h PreCompiled.cpp PCH_SRCS)
-endif (FREECAD_USE_PCH)
-
-add_library(CleanStartGui SHARED ${CleanStartGui_SRCS} ${CleanStartGuiIcon_SVG})
-# target_link_libraries(CleanStartGui ${CleanStartGui_LIBS} Qt::Quick Qt::Qml Qt::QuickWidgets)
-target_link_libraries(CleanStartGui ${CleanStartGui_LIBS})
-
-SET_BIN_DIR(CleanStartGui CleanStartGui /Mod/CleanStart)
-SET_PYTHON_PREFIX_SUFFIX(CleanStartGui)
-
-fc_copy_sources(CleanStartGui "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_DATADIR}/Mod/CleanStart" ${CleanStartGuiIcon_SVG})
-
-INSTALL(TARGETS CleanStartGui DESTINATION ${CMAKE_INSTALL_LIBDIR})
-INSTALL(FILES ${CleanStartGuiIcon_SVG} DESTINATION "${CMAKE_INSTALL_DATADIR}/Mod/CleanStart/Resources/icons")
diff --git a/src/Mod/CleanStart/Gui/Command.cpp b/src/Mod/CleanStart/Gui/Command.cpp
deleted file mode 100644
index 1098157e56..0000000000
--- a/src/Mod/CleanStart/Gui/Command.cpp
+++ /dev/null
@@ -1,62 +0,0 @@
-// SPDX-License-Identifier: LGPL-2.1-or-later
-/****************************************************************************
- * *
- * Copyright (c) 2024 The FreeCAD Project Association AISBL *
- * *
- * This file is part of FreeCAD. *
- * *
- * FreeCAD is free software: you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation, either version 2.1 of the *
- * License, or (at your option) any later version. *
- * *
- * 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 *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with FreeCAD. If not, see *
- * . *
- * *
- ***************************************************************************/
-
-#include "PreCompiled.h"
-
-#include
-#include
-
-#include <3rdParty/GSL/include/gsl/pointers>
-
-#include "Workbench.h"
-
-
-using namespace std;
-
-DEF_STD_CMD(CmdCleanStart)
-
-CmdCleanStart::CmdCleanStart()
- : Command("CleanStart_CleanStart")
-{
- sAppModule = "CleanStart";
- sGroup = QT_TR_NOOP("CleanStart");
- sMenuText = QT_TR_NOOP("CleanStart");
- sToolTipText = QT_TR_NOOP("Displays the CleanStart in an MDI view");
- sWhatsThis = "CleanStart_CleanStart";
- sStatusTip = sToolTipText;
- sPixmap = "CleanStartWorkbench";
-}
-
-void CmdCleanStart::activated(int iMsg)
-{
- Q_UNUSED(iMsg);
- CleanStartGui::Workbench::loadCleanStart();
-}
-
-
-void CreateCleanStartCommands()
-{
- Gui::CommandManager& rcCmdMgr = Gui::Application::Instance->commandManager();
- auto newCommand = gsl::owner(new CmdCleanStart);
- rcCmdMgr.addCommand(newCommand); // Transfer ownership
-}
diff --git a/src/Mod/CleanStart/Gui/PreCompiled.cpp b/src/Mod/CleanStart/Gui/PreCompiled.cpp
deleted file mode 100644
index b17d7731bd..0000000000
--- a/src/Mod/CleanStart/Gui/PreCompiled.cpp
+++ /dev/null
@@ -1,25 +0,0 @@
-// SPDX-License-Identifier: LGPL-2.1-or-later
-/****************************************************************************
- * *
-# Copyright (c) 2024 The FreeCAD Project Association AISBL *
- * *
- * This file is part of FreeCAD. *
- * *
- * FreeCAD is free software: you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation, either version 2.1 of the *
- * License, or (at your option) any later version. *
- * *
- * 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 *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with FreeCAD. If not, see *
- * . *
- * *
- ***************************************************************************/
-
-
-#include "PreCompiled.h"
diff --git a/src/Mod/CleanStart/Gui/PreCompiled.h b/src/Mod/CleanStart/Gui/PreCompiled.h
deleted file mode 100644
index 3e6fc4cc7a..0000000000
--- a/src/Mod/CleanStart/Gui/PreCompiled.h
+++ /dev/null
@@ -1,65 +0,0 @@
-// SPDX-License-Identifier: LGPL-2.1-or-later
-/****************************************************************************
- * *
-# Copyright (c) 2024 The FreeCAD Project Association AISBL *
- * *
- * This file is part of FreeCAD. *
- * *
- * FreeCAD is free software: you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation, either version 2.1 of the *
- * License, or (at your option) any later version. *
- * *
- * 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 *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with FreeCAD. If not, see *
- * . *
- * *
- ***************************************************************************/
-
-#ifndef CLEANSTARTGUI_PRECOMPILED_H
-#define CLEANSTARTGUI_PRECOMPILED_H
-
-#include
-
-#ifdef _MSC_VER
-#pragma warning(disable : 5208)
-#endif
-
-#ifdef _PreComp_
-
-// standard
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-// Qt
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-#endif // _PreComp_
-#endif // CLEANSTARTGUI_PRECOMPILED_H
diff --git a/src/Mod/CleanStart/Gui/Resources/CleanStart.qrc b/src/Mod/CleanStart/Gui/Resources/CleanStart.qrc
deleted file mode 100644
index a6f27c69a4..0000000000
--- a/src/Mod/CleanStart/Gui/Resources/CleanStart.qrc
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
- icons/CleanStartWorkbench.svg
-
-
diff --git a/src/Mod/CleanStart/Gui/Resources/icons/CleanStartWorkbench.svg b/src/Mod/CleanStart/Gui/Resources/icons/CleanStartWorkbench.svg
deleted file mode 100644
index 92e7992912..0000000000
--- a/src/Mod/CleanStart/Gui/Resources/icons/CleanStartWorkbench.svg
+++ /dev/null
@@ -1,35 +0,0 @@
-
-
-AAAsdWp1bWIAAAAeanVtZGMycGEAEQAQgAAAqgA4m3EDYzJwYQAAACxPanVtYgAAAEdqdW1kYzJtY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AA9lkBADaYjbNHBledrs8UvzcmIqg4q5h2I85dUCPn9QN1KzSHCFLAAEktdVGMxgi6L8yyKxQDXsxwIdEoCmi3IYtSe1SatqfzWegeTWgkpslSKyduJeUQbtePR6xJbavPMS1Li8dOlMInahvFdX8o/TSfg/exYQ/6aNF7/P/nscuzeu3ocpRXoNPlmaYfFxK1eLwOQL1Q2/KSuoQYOvq7mDGUA8LxdK0pN7IgRy70YUuXk5eXeVVb/aFXY7lwXeYuO+1inkxNNLY6Ndoe9iiu+XhXlhMNU2BiSYv40Ra8zOCuPfPKGTf3e/vLjW6HLo52X3G0DzD9uHaCZWYtZQ87IDR1+Kg=
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/Mod/CleanStart/Gui/Workbench.cpp b/src/Mod/CleanStart/Gui/Workbench.cpp
deleted file mode 100644
index 8623e6afd4..0000000000
--- a/src/Mod/CleanStart/Gui/Workbench.cpp
+++ /dev/null
@@ -1,87 +0,0 @@
-// SPDX-License-Identifier: LGPL-2.1-or-later
-/****************************************************************************
- * *
- * Copyright (c) 2024 The FreeCAD Project Association AISBL *
- * *
- * This file is part of FreeCAD. *
- * *
- * FreeCAD is free software: you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation, either version 2.1 of the *
- * License, or (at your option) any later version. *
- * *
- * 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 *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with FreeCAD. If not, see *
- * . *
- * *
- ***************************************************************************/
-
-#include "PreCompiled.h"
-#ifndef _PreComp_
-#include
-#include
-#endif
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-#include "Workbench.h"
-#include "CleanStartView.h"
-
-#include <3rdParty/GSL/include/gsl/pointers>
-
-using namespace CleanStartGui;
-
-TYPESYSTEM_SOURCE(CleanStartGui::Workbench, Gui::StdWorkbench) // NOLINT
-
-void CleanStartGui::Workbench::activated()
-{
- loadCleanStart();
-}
-
-void CleanStartGui::Workbench::loadCleanStart()
-{
- auto mw = Gui::getMainWindow();
- auto doc = Gui::Application::Instance->activeDocument();
- auto existingView = mw->findChild(QLatin1String("CleanStartView"));
- if (!existingView) {
- existingView = gsl::owner (new CleanStartView (doc, mw));
- mw->addWindow(existingView); // Transfers ownership
- }
- Gui::getMainWindow()->setActiveWindow(existingView);
- existingView->show();
-}
-
-Gui::MenuItem* CleanStartGui::Workbench::setupMenuBar() const
-{
- return Gui::StdWorkbench::setupMenuBar();
-}
-
-Gui::ToolBarItem* CleanStartGui::Workbench::setupToolBars() const
-{
- return Gui::StdWorkbench::setupToolBars();
-}
-
-Gui::ToolBarItem* CleanStartGui::Workbench::setupCommandBars() const
-{
- return Gui::StdWorkbench::setupCommandBars();
-}
-
-Gui::DockWindowItems* CleanStartGui::Workbench::setupDockWindows() const
-{
- Gui::DockWindowItems* root = Gui::StdWorkbench::setupDockWindows();
- root->setVisibility(false); // hide all dock windows by default
- root->setVisibility("Std_ComboView", true); // except of the combo view
- root->setVisibility("Std_TaskView", true); // and the task view
- return root;
-}
diff --git a/src/Mod/CleanStart/Gui/Workbench.h b/src/Mod/CleanStart/Gui/Workbench.h
deleted file mode 100644
index 0e89d1a602..0000000000
--- a/src/Mod/CleanStart/Gui/Workbench.h
+++ /dev/null
@@ -1,63 +0,0 @@
-// SPDX-License-Identifier: LGPL-2.1-or-later
-/****************************************************************************
- * *
- * Copyright (c) 2024 The FreeCAD Project Association AISBL *
- * *
- * This file is part of FreeCAD. *
- * *
- * FreeCAD is free software: you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation, either version 2.1 of the *
- * License, or (at your option) any later version. *
- * *
- * 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 *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with FreeCAD. If not, see *
- * . *
- * *
- ***************************************************************************/
-
-
-#ifndef LAUNCHERGUI_WORKBENCH_H
-#define LAUNCHERGUI_WORKBENCH_H
-
-#include
-#include
-
-namespace Gui {
-class MDIView;
-}
-
-namespace CleanStartGui
-{
-
-class Workbench: public Gui::StdWorkbench
-{
- TYPESYSTEM_HEADER_WITH_OVERRIDE(); // NOLINT
-
-public:
- Workbench() = default;
-
- /** Run some actions when the workbench gets activated. */
- void activated() override;
-
- static void loadCleanStart();
-
-protected:
- /** Defines the standard menus. */
- Gui::MenuItem* setupMenuBar() const override;
- /** Defines the standard toolbars. */
- Gui::ToolBarItem* setupToolBars() const override;
- /** Defines the standard command bars. */
- Gui::ToolBarItem* setupCommandBars() const override;
- /** Returns a DockWindowItems structure of dock windows this workbench. */
- Gui::DockWindowItems* setupDockWindows() const override;
-
-}; // class Workbench
-
-} // namespace CleanStartGui
-#endif // LAUNCHERGUI_WORKBENCH_H
diff --git a/src/Mod/CleanStart/Init.py b/src/Mod/CleanStart/Init.py
deleted file mode 100644
index c41703a22a..0000000000
--- a/src/Mod/CleanStart/Init.py
+++ /dev/null
@@ -1,29 +0,0 @@
-# SPDX-License-Identifier: LGPL-2.1-or-later
-# /**************************************************************************
-# *
-# Copyright (c) 2024 The FreeCAD Project Association AISBL *
-# *
-# This file is part of FreeCAD. *
-# *
-# FreeCAD is free software: you can redistribute it and/or modify it *
-# under the terms of the GNU Lesser General Public License as *
-# published by the Free Software Foundation, either version 2.1 of the *
-# License, or (at your option) any later version. *
-# *
-# 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 *
-# Lesser General Public License for more details. *
-# *
-# You should have received a copy of the GNU Lesser General Public *
-# License along with FreeCAD. If not, see *
-# . *
-# *
-# **************************************************************************/
-
-# Get the Parameter Group of this module
-ParGrp = App.ParamGet("System parameter:Modules").GetGroup("CleanStart")
-
-# Set the needed information
-ParGrp.SetString("WorkBenchName", "CleanStart")
-ParGrp.SetString("WorkBenchModule", "CleanStart.py")
diff --git a/src/Mod/CleanStart/InitGui.py b/src/Mod/CleanStart/InitGui.py
deleted file mode 100644
index cf1e585af2..0000000000
--- a/src/Mod/CleanStart/InitGui.py
+++ /dev/null
@@ -1,51 +0,0 @@
-# SPDX-License-Identifier: LGPL-2.1-or-later
-# /**************************************************************************
-# *
-# Copyright (c) 2024 The FreeCAD Project Association AISBL *
-# *
-# This file is part of FreeCAD. *
-# *
-# FreeCAD is free software: you can redistribute it and/or modify it *
-# under the terms of the GNU Lesser General Public License as *
-# published by the Free Software Foundation, either version 2.1 of the *
-# License, or (at your option) any later version. *
-# *
-# 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 *
-# Lesser General Public License for more details. *
-# *
-# You should have received a copy of the GNU Lesser General Public *
-# License along with FreeCAD. If not, see *
-# . *
-# *
-# **************************************************************************/
-
-
-class CleanStartWorkbench(Workbench):
- "CleanStartWorkbench workbench"
-
- def __init__(self):
- self.__class__.Icon = (
- FreeCAD.getResourceDir() + "Mod/Start/Resources/icons/StartWorkbench.svg"
- )
- self.__class__.MenuText = "Start (new!)"
- self.__class__.ToolTip = "Start workbench"
-
- def Initialize(self):
- import CleanStartGui
-
- def Activated(self):
- pass
-
- def Deactivated(self):
- pass
-
- def ContextMenu(self, recipient):
- pass
-
- def GetClassName(self):
- return "CleanStartGui::Workbench"
-
-
-Gui.addWorkbench(CleanStartWorkbench())
diff --git a/src/Mod/Start/App/AppStart.cpp b/src/Mod/Start/App/AppStart.cpp
index 0e603173fc..d13057d2ee 100644
--- a/src/Mod/Start/App/AppStart.cpp
+++ b/src/Mod/Start/App/AppStart.cpp
@@ -1,31 +1,35 @@
-/***************************************************************************
- * Copyright (c) 2010 Jürgen Riegel *
- * *
- * 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 *
- * *
+// SPDX-License-Identifier: LGPL-2.1-or-later
+/****************************************************************************
+ * *
+# Copyright (c) 2024 The FreeCAD Project Association AISBL *
+ * *
+ * This file is part of FreeCAD. *
+ * *
+ * FreeCAD is free software: you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation, either version 2.1 of the *
+ * License, or (at your option) any later version. *
+ * *
+ * 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 *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with FreeCAD. If not, see *
+ * . *
+ * *
***************************************************************************/
#include "PreCompiled.h"
-#include
#include
+#include
+#include
+
#include
+#include <3rdParty/GSL/include/gsl/pointers>
namespace Start
{
@@ -37,13 +41,12 @@ public:
{
initialize("This module is the Start module."); // register with Python
}
-
-private:
};
PyObject* initModule()
{
- return Base::Interpreter().addModule(new Module);
+ auto newModule = gsl::owner(new Module);
+ return Base::Interpreter().addModule(newModule); // Transfer ownership
}
} // namespace Start
diff --git a/src/Mod/Start/App/CMakeLists.txt b/src/Mod/Start/App/CMakeLists.txt
index adab263390..b0595719bd 100644
--- a/src/Mod/Start/App/CMakeLists.txt
+++ b/src/Mod/Start/App/CMakeLists.txt
@@ -1,20 +1,45 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+# /****************************************************************************
+# * *
+# * Copyright (c) 2024 The FreeCAD Project Association AISBL *
+# * *
+# * This file is part of FreeCAD. *
+# * *
+# * FreeCAD is free software: you can redistribute it and/or modify it *
+# * under the terms of the GNU Lesser General Public License as *
+# * published by the Free Software Foundation, either version 2.1 of the *
+# * License, or (at your option) any later version. *
+# * *
+# * 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 *
+# * Lesser General Public License for more details. *
+# * *
+# * You should have received a copy of the GNU Lesser General Public *
+# * License along with FreeCAD. If not, see *
+# * . *
+# * *
+# ***************************************************************************/
+
include_directories(
- ${Boost_INCLUDE_DIRS}
- ${OCC_INCLUDE_DIR}
- ${ZLIB_INCLUDE_DIR}
- ${PYTHON_INCLUDE_DIRS}
+ ${PYTHON_INCLUDE_DIRS}
+ ${QtCore_INCLUDE_DIRS}
)
set(Start_LIBS
- FreeCADApp
-)
+ FreeCADApp
+ )
SET(Start_SRCS
- AppStart.cpp
- PreCompiled.cpp
- PreCompiled.h
- StartConfiguration.h
-)
+ AppStart.cpp
+ DisplayedFilesModel.cpp
+ DisplayedFilesModel.h
+ ExamplesModel.cpp
+ ExamplesModel.h
+ PreCompiled.cpp
+ PreCompiled.h
+ RecentFilesModel.cpp
+ RecentFilesModel.h)
add_library(Start SHARED ${Start_SRCS})
target_link_libraries(Start ${Start_LIBS})
diff --git a/src/Mod/CleanStart/App/DisplayedFilesModel.cpp b/src/Mod/Start/App/DisplayedFilesModel.cpp
similarity index 91%
rename from src/Mod/CleanStart/App/DisplayedFilesModel.cpp
rename to src/Mod/Start/App/DisplayedFilesModel.cpp
index 1a91db8819..a791fb8868 100644
--- a/src/Mod/CleanStart/App/DisplayedFilesModel.cpp
+++ b/src/Mod/Start/App/DisplayedFilesModel.cpp
@@ -1,221 +1,223 @@
-// SPDX-License-Identifier: LGPL-2.1-or-later
-/****************************************************************************
- * *
- * Copyright (c) 2024 The FreeCAD Project Association AISBL *
- * *
- * This file is part of FreeCAD. *
- * *
- * FreeCAD is free software: you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation, either version 2.1 of the *
- * License, or (at your option) any later version. *
- * *
- * 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 *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with FreeCAD. If not, see *
- * . *
- * *
- ***************************************************************************/
-
-#include "PreCompiled.h"
-#ifndef _PreComp_
-#include
-#include
-#include
-#endif
-
-#include "DisplayedFilesModel.h"
-#include
-#include
-
-using namespace CleanStart;
-
-
-namespace
-{
-
-std::string humanReadableSize(unsigned int bytes)
-{
- static const std::vector siPrefix {
- "b",
- "kb",
- "Mb",
- "Gb",
- "Tb",
- "Pb",
- "Eb" // I think it's safe to stop here (for the time being)...
- };
- size_t base = 0;
- double inUnits = bytes;
- constexpr double siFactor {1000.0};
- while (inUnits > siFactor && base < siPrefix.size() - 1) {
- ++base;
- inUnits /= siFactor;
- }
- if (base == 0) {
- // Don't include a decimal point for bytes
- return fmt::format("{:.0f} {}", inUnits, siPrefix[base]);
- }
- // For all others, include one digit after the decimal place
- return fmt::format("{:.1f} {}", inUnits, siPrefix[base]);
-}
-
-FileStats fileInfoFromFreeCADFile(const std::string& path)
-{
- App::ProjectFile proj(path);
- proj.loadDocument();
- auto metadata = proj.getMetadata();
- FileStats result;
- result.insert(std::make_pair(DisplayedFilesModelRoles::author, metadata.createdBy));
- result.insert(std::make_pair(DisplayedFilesModelRoles::modifiedTime, metadata.lastModifiedDate));
- result.insert(std::make_pair(DisplayedFilesModelRoles::creationTime, metadata.creationDate));
- result.insert(std::make_pair(DisplayedFilesModelRoles::company, metadata.company));
- result.insert(std::make_pair(DisplayedFilesModelRoles::license, metadata.license));
- result.insert(std::make_pair(DisplayedFilesModelRoles::description, metadata.comment));
- return result;
-}
-
-/// Load the thumbnail image data (if any) that is stored in an FCStd file.
-/// \returns The image bytes, or an empty QByteArray (if no thumbnail was stored)
-QByteArray loadFCStdThumbnail(const std::string & pathToFCStdFile)
-{
- App::ProjectFile proj(pathToFCStdFile);
- if (proj.loadDocument()) {
- try {
- std::string thumbnailFile = proj.extractInputFile("thumbnails/Thumbnail.png");
- auto inputFile = QFile(QString::fromStdString(thumbnailFile));
- inputFile.open(QIODevice::OpenModeFlag::ReadOnly);
- return inputFile.readAll();
- }
- catch (...) {
- }
- }
- return {};
-}
-
-FileStats getFileInfo(const std::string& path)
-{
- FileStats result;
- Base::FileInfo file(path);
- if (file.hasExtension("FCStd")) {
- result = fileInfoFromFreeCADFile(path);
- }
- else {
- file.lastModified();
- }
- result.insert(std::make_pair(DisplayedFilesModelRoles::path, path));
- result.insert(std::make_pair(DisplayedFilesModelRoles::size, humanReadableSize(file.size())));
- result.insert(std::make_pair(DisplayedFilesModelRoles::baseName, file.fileName()));
- return result;
-}
-} // namespace
-
-DisplayedFilesModel::DisplayedFilesModel(QObject* parent) : QAbstractListModel(parent)
-{
-}
-
-
-int DisplayedFilesModel::rowCount(const QModelIndex& parent) const
-{
- Q_UNUSED(parent);
- return static_cast(_fileInfoCache.size());
-}
-
-QVariant DisplayedFilesModel::data(const QModelIndex& index, int roleAsInt) const
-{
- int row = index.row();
- if (row < 0 || row >= static_cast(_fileInfoCache.size())) {
- return {};
- }
- auto mapEntry = _fileInfoCache.at(row);
- auto role = static_cast(roleAsInt);
- switch (role) {
- case DisplayedFilesModelRoles::author: // NOLINT(bugprone-branch-clone)
- [[fallthrough]];
- case DisplayedFilesModelRoles::baseName:
- [[fallthrough]];
- case DisplayedFilesModelRoles::company:
- [[fallthrough]];
- case DisplayedFilesModelRoles::creationTime:
- [[fallthrough]];
- case DisplayedFilesModelRoles::description:
- [[fallthrough]];
- case DisplayedFilesModelRoles::license:
- [[fallthrough]];
- case DisplayedFilesModelRoles::modifiedTime:
- [[fallthrough]];
- case DisplayedFilesModelRoles::path:
- [[fallthrough]];
- case DisplayedFilesModelRoles::size:
- if (mapEntry.find(role) != mapEntry.end()) {
- return QString::fromStdString(mapEntry.at(role));
- }
- else {
- return {};
- }
- case DisplayedFilesModelRoles::image: {
- auto path = QString::fromStdString(mapEntry.at(DisplayedFilesModelRoles::path));
- if (_imageCache.contains(path)) {
- return _imageCache[path];
- }
- break;
- }
- default:
- break;
- }
- switch (roleAsInt) {
- case Qt::ItemDataRole::ToolTipRole:
- return QString::fromStdString(mapEntry.at(DisplayedFilesModelRoles::path));
- }
- return {};
-}
-
-bool freecadCanOpen (const QString& extension)
-{
- auto importTypes = App::GetApplication().getImportTypes();
- return std::find(importTypes.begin(), importTypes.end(), extension.toStdString()) != importTypes.end();
-}
-
-void DisplayedFilesModel::addFile(const QString &filePath)
-{
- QFileInfo qfi (filePath);
- if (!qfi.isReadable()){
- return;
- }
- if (!freecadCanOpen(qfi.suffix())) {
- return;
- }
- _fileInfoCache.emplace_back(getFileInfo(filePath.toStdString()));
- if (qfi.completeSuffix() == QLatin1String("FCStd")) {
- auto thumbnail = loadFCStdThumbnail(filePath.toStdString());
- if (!thumbnail.isEmpty()) {
- _imageCache.insert(filePath, thumbnail);
- }
- }
-}
-
-void DisplayedFilesModel::clear()
-{
- _fileInfoCache.clear();
-}
-
-QHash DisplayedFilesModel::roleNames() const
-{
- static QHash nameMap {
- std::make_pair(int(DisplayedFilesModelRoles::author), "author"),
- std::make_pair(int(DisplayedFilesModelRoles::baseName), "baseName"),
- std::make_pair(int(DisplayedFilesModelRoles::company), "company"),
- std::make_pair(int(DisplayedFilesModelRoles::creationTime), "creationTime"),
- std::make_pair(int(DisplayedFilesModelRoles::description), "description"),
- std::make_pair(int(DisplayedFilesModelRoles::image), "image"),
- std::make_pair(int(DisplayedFilesModelRoles::license), "license"),
- std::make_pair(int(DisplayedFilesModelRoles::modifiedTime), "modifiedTime"),
- std::make_pair(int(DisplayedFilesModelRoles::path), "path"),
- std::make_pair(int(DisplayedFilesModelRoles::size), "size"),
- };
- return nameMap;
-}
+// SPDX-License-Identifier: LGPL-2.1-or-later
+/****************************************************************************
+ * *
+ * Copyright (c) 2024 The FreeCAD Project Association AISBL *
+ * *
+ * This file is part of FreeCAD. *
+ * *
+ * FreeCAD is free software: you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation, either version 2.1 of the *
+ * License, or (at your option) any later version. *
+ * *
+ * 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 *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with FreeCAD. If not, see *
+ * . *
+ * *
+ ***************************************************************************/
+
+#include "PreCompiled.h"
+#ifndef _PreComp_
+#include
+#include
+#include
+#endif
+
+#include "DisplayedFilesModel.h"
+#include
+#include
+
+using namespace Start;
+
+
+namespace
+{
+
+std::string humanReadableSize(unsigned int bytes)
+{
+ static const std::vector siPrefix {
+ "b",
+ "kb",
+ "Mb",
+ "Gb",
+ "Tb",
+ "Pb",
+ "Eb" // I think it's safe to stop here (for the time being)...
+ };
+ size_t base = 0;
+ double inUnits = bytes;
+ constexpr double siFactor {1000.0};
+ while (inUnits > siFactor && base < siPrefix.size() - 1) {
+ ++base;
+ inUnits /= siFactor;
+ }
+ if (base == 0) {
+ // Don't include a decimal point for bytes
+ return fmt::format("{:.0f} {}", inUnits, siPrefix[base]);
+ }
+ // For all others, include one digit after the decimal place
+ return fmt::format("{:.1f} {}", inUnits, siPrefix[base]);
+}
+
+FileStats fileInfoFromFreeCADFile(const std::string& path)
+{
+ App::ProjectFile proj(path);
+ proj.loadDocument();
+ auto metadata = proj.getMetadata();
+ FileStats result;
+ result.insert(std::make_pair(DisplayedFilesModelRoles::author, metadata.createdBy));
+ result.insert(
+ std::make_pair(DisplayedFilesModelRoles::modifiedTime, metadata.lastModifiedDate));
+ result.insert(std::make_pair(DisplayedFilesModelRoles::creationTime, metadata.creationDate));
+ result.insert(std::make_pair(DisplayedFilesModelRoles::company, metadata.company));
+ result.insert(std::make_pair(DisplayedFilesModelRoles::license, metadata.license));
+ result.insert(std::make_pair(DisplayedFilesModelRoles::description, metadata.comment));
+ return result;
+}
+
+/// Load the thumbnail image data (if any) that is stored in an FCStd file.
+/// \returns The image bytes, or an empty QByteArray (if no thumbnail was stored)
+QByteArray loadFCStdThumbnail(const std::string& pathToFCStdFile)
+{
+ App::ProjectFile proj(pathToFCStdFile);
+ if (proj.loadDocument()) {
+ try {
+ std::string thumbnailFile = proj.extractInputFile("thumbnails/Thumbnail.png");
+ auto inputFile = QFile(QString::fromStdString(thumbnailFile));
+ inputFile.open(QIODevice::OpenModeFlag::ReadOnly);
+ return inputFile.readAll();
+ }
+ catch (...) {
+ }
+ }
+ return {};
+}
+
+FileStats getFileInfo(const std::string& path)
+{
+ FileStats result;
+ Base::FileInfo file(path);
+ if (file.hasExtension("FCStd")) {
+ result = fileInfoFromFreeCADFile(path);
+ }
+ else {
+ file.lastModified();
+ }
+ result.insert(std::make_pair(DisplayedFilesModelRoles::path, path));
+ result.insert(std::make_pair(DisplayedFilesModelRoles::size, humanReadableSize(file.size())));
+ result.insert(std::make_pair(DisplayedFilesModelRoles::baseName, file.fileName()));
+ return result;
+}
+} // namespace
+
+DisplayedFilesModel::DisplayedFilesModel(QObject* parent)
+ : QAbstractListModel(parent)
+{}
+
+
+int DisplayedFilesModel::rowCount(const QModelIndex& parent) const
+{
+ Q_UNUSED(parent);
+ return static_cast(_fileInfoCache.size());
+}
+
+QVariant DisplayedFilesModel::data(const QModelIndex& index, int roleAsInt) const
+{
+ int row = index.row();
+ if (row < 0 || row >= static_cast(_fileInfoCache.size())) {
+ return {};
+ }
+ auto mapEntry = _fileInfoCache.at(row);
+ auto role = static_cast(roleAsInt);
+ switch (role) {
+ case DisplayedFilesModelRoles::author: // NOLINT(bugprone-branch-clone)
+ [[fallthrough]];
+ case DisplayedFilesModelRoles::baseName:
+ [[fallthrough]];
+ case DisplayedFilesModelRoles::company:
+ [[fallthrough]];
+ case DisplayedFilesModelRoles::creationTime:
+ [[fallthrough]];
+ case DisplayedFilesModelRoles::description:
+ [[fallthrough]];
+ case DisplayedFilesModelRoles::license:
+ [[fallthrough]];
+ case DisplayedFilesModelRoles::modifiedTime:
+ [[fallthrough]];
+ case DisplayedFilesModelRoles::path:
+ [[fallthrough]];
+ case DisplayedFilesModelRoles::size:
+ if (mapEntry.find(role) != mapEntry.end()) {
+ return QString::fromStdString(mapEntry.at(role));
+ }
+ else {
+ return {};
+ }
+ case DisplayedFilesModelRoles::image: {
+ auto path = QString::fromStdString(mapEntry.at(DisplayedFilesModelRoles::path));
+ if (_imageCache.contains(path)) {
+ return _imageCache[path];
+ }
+ break;
+ }
+ default:
+ break;
+ }
+ switch (roleAsInt) {
+ case Qt::ItemDataRole::ToolTipRole:
+ return QString::fromStdString(mapEntry.at(DisplayedFilesModelRoles::path));
+ }
+ return {};
+}
+
+bool freecadCanOpen(const QString& extension)
+{
+ auto importTypes = App::GetApplication().getImportTypes();
+ return std::find(importTypes.begin(), importTypes.end(), extension.toStdString())
+ != importTypes.end();
+}
+
+void DisplayedFilesModel::addFile(const QString& filePath)
+{
+ QFileInfo qfi(filePath);
+ if (!qfi.isReadable()) {
+ return;
+ }
+ if (!freecadCanOpen(qfi.suffix())) {
+ return;
+ }
+ _fileInfoCache.emplace_back(getFileInfo(filePath.toStdString()));
+ if (qfi.completeSuffix() == QLatin1String("FCStd")) {
+ auto thumbnail = loadFCStdThumbnail(filePath.toStdString());
+ if (!thumbnail.isEmpty()) {
+ _imageCache.insert(filePath, thumbnail);
+ }
+ }
+}
+
+void DisplayedFilesModel::clear()
+{
+ _fileInfoCache.clear();
+}
+
+QHash DisplayedFilesModel::roleNames() const
+{
+ static QHash nameMap {
+ std::make_pair(int(DisplayedFilesModelRoles::author), "author"),
+ std::make_pair(int(DisplayedFilesModelRoles::baseName), "baseName"),
+ std::make_pair(int(DisplayedFilesModelRoles::company), "company"),
+ std::make_pair(int(DisplayedFilesModelRoles::creationTime), "creationTime"),
+ std::make_pair(int(DisplayedFilesModelRoles::description), "description"),
+ std::make_pair(int(DisplayedFilesModelRoles::image), "image"),
+ std::make_pair(int(DisplayedFilesModelRoles::license), "license"),
+ std::make_pair(int(DisplayedFilesModelRoles::modifiedTime), "modifiedTime"),
+ std::make_pair(int(DisplayedFilesModelRoles::path), "path"),
+ std::make_pair(int(DisplayedFilesModelRoles::size), "size"),
+ };
+ return nameMap;
+}
diff --git a/src/Mod/CleanStart/App/DisplayedFilesModel.h b/src/Mod/Start/App/DisplayedFilesModel.h
similarity index 87%
rename from src/Mod/CleanStart/App/DisplayedFilesModel.h
rename to src/Mod/Start/App/DisplayedFilesModel.h
index e08937d060..09615d0972 100644
--- a/src/Mod/CleanStart/App/DisplayedFilesModel.h
+++ b/src/Mod/Start/App/DisplayedFilesModel.h
@@ -1,85 +1,85 @@
-// SPDX-License-Identifier: LGPL-2.1-or-later
-/****************************************************************************
- * *
- * Copyright (c) 2024 The FreeCAD Project Association AISBL *
- * *
- * This file is part of FreeCAD. *
- * *
- * FreeCAD is free software: you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation, either version 2.1 of the *
- * License, or (at your option) any later version. *
- * *
- * 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 *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with FreeCAD. If not, see *
- * . *
- * *
- ***************************************************************************/
-
-#ifndef FREECAD_CLEANSTART_DISPLAYEDFILESMODEL_H
-#define FREECAD_CLEANSTART_DISPLAYEDFILESMODEL_H
-
-#include
-#include
-#include
-
-#include "../CleanStartGlobal.h"
-
-namespace CleanStart
-{
-
-enum class DisplayedFilesModelRoles
-{
- baseName = Qt::UserRole + 1,
- image,
- size,
- author,
- creationTime,
- modifiedTime,
- description,
- company,
- license,
- path
-};
-
-using FileStats = std::map;
-
-/// A model for displaying a list of files including a thumbnail or icon, plus various file statistics.
-class CleanStartExport DisplayedFilesModel: public QAbstractListModel
-{
- Q_OBJECT
-public:
- explicit DisplayedFilesModel(QObject* parent = nullptr);
-
- int rowCount(const QModelIndex& parent = QModelIndex()) const override;
-
- QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override;
-
- void addFile(const QString &filePath);
-
- void clear();
-
-protected:
- /// For communication with QML, define the text version of each role name defined in the
- /// DisplayedFilesModelRoles enumeration
- QHash roleNames() const override;
-
- /// Destroy and recreate the cache of info about the files. Should be connected to a signal
- /// indicating when some piece of information about the files has changed. Does NOT generate
- /// a new list of files, only re-caches the existing ones.
- void reCacheFileInfo();
-
-private:
-
- std::vector _fileInfoCache;
- QMap _imageCache;
-};
-
-} // namespace CleanStart
-
-#endif // FREECAD_CLEANSTART_DISPLAYEDFILESMODEL_H
+// SPDX-License-Identifier: LGPL-2.1-or-later
+/****************************************************************************
+ * *
+ * Copyright (c) 2024 The FreeCAD Project Association AISBL *
+ * *
+ * This file is part of FreeCAD. *
+ * *
+ * FreeCAD is free software: you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation, either version 2.1 of the *
+ * License, or (at your option) any later version. *
+ * *
+ * 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 *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with FreeCAD. If not, see *
+ * . *
+ * *
+ ***************************************************************************/
+
+#ifndef FREECAD_START_DISPLAYEDFILESMODEL_H
+#define FREECAD_START_DISPLAYEDFILESMODEL_H
+
+#include
+#include
+#include
+
+#include "../StartGlobal.h"
+
+namespace Start
+{
+
+enum class DisplayedFilesModelRoles
+{
+ baseName = Qt::UserRole + 1,
+ image,
+ size,
+ author,
+ creationTime,
+ modifiedTime,
+ description,
+ company,
+ license,
+ path
+};
+
+using FileStats = std::map;
+
+/// A model for displaying a list of files including a thumbnail or icon, plus various file
+/// statistics.
+class StartExport DisplayedFilesModel: public QAbstractListModel
+{
+ Q_OBJECT
+public:
+ explicit DisplayedFilesModel(QObject* parent = nullptr);
+
+ int rowCount(const QModelIndex& parent = QModelIndex()) const override;
+
+ QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override;
+
+ void addFile(const QString& filePath);
+
+ void clear();
+
+protected:
+ /// For communication with QML, define the text version of each role name defined in the
+ /// DisplayedFilesModelRoles enumeration
+ QHash roleNames() const override;
+
+ /// Destroy and recreate the cache of info about the files. Should be connected to a signal
+ /// indicating when some piece of information about the files has changed. Does NOT generate
+ /// a new list of files, only re-caches the existing ones.
+ void reCacheFileInfo();
+
+private:
+ std::vector _fileInfoCache;
+ QMap _imageCache;
+};
+
+} // namespace Start
+
+#endif // FREECAD_START_DISPLAYEDFILESMODEL_H
diff --git a/src/Mod/CleanStart/App/ExamplesModel.cpp b/src/Mod/Start/App/ExamplesModel.cpp
similarity index 80%
rename from src/Mod/CleanStart/App/ExamplesModel.cpp
rename to src/Mod/Start/App/ExamplesModel.cpp
index 7b9733158b..9d6bb6d3b2 100644
--- a/src/Mod/CleanStart/App/ExamplesModel.cpp
+++ b/src/Mod/Start/App/ExamplesModel.cpp
@@ -1,54 +1,57 @@
-// SPDX-License-Identifier: LGPL-2.1-or-later
-/****************************************************************************
- * *
- * Copyright (c) 2024 The FreeCAD Project Association AISBL *
- * *
- * This file is part of FreeCAD. *
- * *
- * FreeCAD is free software: you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation, either version 2.1 of the *
- * License, or (at your option) any later version. *
- * *
- * 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 *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with FreeCAD. If not, see *
- * . *
- * *
- ***************************************************************************/
-
-#include "PreCompiled.h"
-#ifndef _PreComp_
-#include
-#endif
-
-#include "ExamplesModel.h"
-#include
-
-using namespace CleanStart;
-
-FC_LOG_LEVEL_INIT(ExamplesModel)
-
-ExamplesModel::ExamplesModel(QObject* parent) : DisplayedFilesModel(parent)
-{
- auto examplesPath = QDir(QString::fromStdString(App::Application::getResourceDir()));
- _examplesDirectory.setPath (examplesPath.filePath(QLatin1String("examples")));
-}
-
-void ExamplesModel::loadExamples()
-{
- beginResetModel();
- clear();
- if (!_examplesDirectory.isReadable()) {
- Base::Console().Warning("Cannot read %s", _examplesDirectory.absolutePath().toStdString().c_str());
- }
- auto entries = _examplesDirectory.entryList(QDir::Filter::Files | QDir::Filter::Readable, QDir::SortFlag::Name);
- for (const auto & entry : entries) {
- addFile(_examplesDirectory.filePath(entry));
- }
- endResetModel();
-}
+// SPDX-License-Identifier: LGPL-2.1-or-later
+/****************************************************************************
+ * *
+ * Copyright (c) 2024 The FreeCAD Project Association AISBL *
+ * *
+ * This file is part of FreeCAD. *
+ * *
+ * FreeCAD is free software: you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation, either version 2.1 of the *
+ * License, or (at your option) any later version. *
+ * *
+ * 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 *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with FreeCAD. If not, see *
+ * . *
+ * *
+ ***************************************************************************/
+
+#include "PreCompiled.h"
+#ifndef _PreComp_
+#include
+#endif
+
+#include "ExamplesModel.h"
+#include
+
+using namespace Start;
+
+FC_LOG_LEVEL_INIT(ExamplesModel)
+
+ExamplesModel::ExamplesModel(QObject* parent)
+ : DisplayedFilesModel(parent)
+{
+ auto examplesPath = QDir(QString::fromStdString(App::Application::getResourceDir()));
+ _examplesDirectory.setPath(examplesPath.filePath(QLatin1String("examples")));
+}
+
+void ExamplesModel::loadExamples()
+{
+ beginResetModel();
+ clear();
+ if (!_examplesDirectory.isReadable()) {
+ Base::Console().Warning("Cannot read %s",
+ _examplesDirectory.absolutePath().toStdString().c_str());
+ }
+ auto entries = _examplesDirectory.entryList(QDir::Filter::Files | QDir::Filter::Readable,
+ QDir::SortFlag::Name);
+ for (const auto& entry : entries) {
+ addFile(_examplesDirectory.filePath(entry));
+ }
+ endResetModel();
+}
diff --git a/src/Mod/CleanStart/App/ExamplesModel.h b/src/Mod/Start/App/ExamplesModel.h
similarity index 85%
rename from src/Mod/CleanStart/App/ExamplesModel.h
rename to src/Mod/Start/App/ExamplesModel.h
index fe232b737a..0382c712b6 100644
--- a/src/Mod/CleanStart/App/ExamplesModel.h
+++ b/src/Mod/Start/App/ExamplesModel.h
@@ -1,53 +1,54 @@
-// SPDX-License-Identifier: LGPL-2.1-or-later
-/****************************************************************************
- * *
- * Copyright (c) 2024 The FreeCAD Project Association AISBL *
- * *
- * This file is part of FreeCAD. *
- * *
- * FreeCAD is free software: you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation, either version 2.1 of the *
- * License, or (at your option) any later version. *
- * *
- * 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 *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with FreeCAD. If not, see *
- * . *
- * *
- ***************************************************************************/
-
-#ifndef FREECAD_CLEANSTART_EXAMPLESMODEL_H
-#define FREECAD_CLEANSTART_EXAMPLESMODEL_H
-
-#include
-#include
-#include
-#include
-
-#include "DisplayedFilesModel.h"
-#include "../CleanStartGlobal.h"
-
-namespace CleanStart
-{
-
-/// A model for displaying a list of files including a thumbnail or icon, plus various file statistics.
-class CleanStartExport ExamplesModel: public DisplayedFilesModel
-{
- Q_OBJECT
-public:
- explicit ExamplesModel(QObject* parent = nullptr);
-
- void loadExamples();
-
-private:
- QDir _examplesDirectory;
-};
-
-} // namespace CleanStart
-
-#endif // FREECAD_CLEANSTART_EXAMPLESMODEL_H
+// SPDX-License-Identifier: LGPL-2.1-or-later
+/****************************************************************************
+ * *
+ * Copyright (c) 2024 The FreeCAD Project Association AISBL *
+ * *
+ * This file is part of FreeCAD. *
+ * *
+ * FreeCAD is free software: you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation, either version 2.1 of the *
+ * License, or (at your option) any later version. *
+ * *
+ * 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 *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with FreeCAD. If not, see *
+ * . *
+ * *
+ ***************************************************************************/
+
+#ifndef FREECAD_START_EXAMPLESMODEL_H
+#define FREECAD_START_EXAMPLESMODEL_H
+
+#include
+#include
+#include
+#include
+
+#include "DisplayedFilesModel.h"
+#include "../StartGlobal.h"
+
+namespace Start
+{
+
+/// A model for displaying a list of files including a thumbnail or icon, plus various file
+/// statistics.
+class StartExport ExamplesModel: public DisplayedFilesModel
+{
+ Q_OBJECT
+public:
+ explicit ExamplesModel(QObject* parent = nullptr);
+
+ void loadExamples();
+
+private:
+ QDir _examplesDirectory;
+};
+
+} // namespace Start
+
+#endif // FREECAD_START_EXAMPLESMODEL_H
diff --git a/src/Mod/Start/App/PreCompiled.cpp b/src/Mod/Start/App/PreCompiled.cpp
index fde9b79a43..b17d7731bd 100644
--- a/src/Mod/Start/App/PreCompiled.cpp
+++ b/src/Mod/Start/App/PreCompiled.cpp
@@ -1,23 +1,25 @@
-/***************************************************************************
- * Copyright (c) 2010 Jürgen Riegel *
- * *
- * 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"
+// SPDX-License-Identifier: LGPL-2.1-or-later
+/****************************************************************************
+ * *
+# Copyright (c) 2024 The FreeCAD Project Association AISBL *
+ * *
+ * This file is part of FreeCAD. *
+ * *
+ * FreeCAD is free software: you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation, either version 2.1 of the *
+ * License, or (at your option) any later version. *
+ * *
+ * 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 *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with FreeCAD. If not, see *
+ * . *
+ * *
+ ***************************************************************************/
+
+
+#include "PreCompiled.h"
diff --git a/src/Mod/Start/App/PreCompiled.h b/src/Mod/Start/App/PreCompiled.h
index ef3103197a..acbd41c945 100644
--- a/src/Mod/Start/App/PreCompiled.h
+++ b/src/Mod/Start/App/PreCompiled.h
@@ -1,23 +1,24 @@
-/***************************************************************************
- * Copyright (c) 2008 Jürgen Riegel *
- * *
- * 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 *
- * *
+// SPDX-License-Identifier: LGPL-2.1-or-later
+/****************************************************************************
+ * *
+# Copyright (c) 2024 The FreeCAD Project Association AISBL *
+ * *
+ * This file is part of FreeCAD. *
+ * *
+ * FreeCAD is free software: you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation, either version 2.1 of the *
+ * License, or (at your option) any later version. *
+ * *
+ * 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 *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with FreeCAD. If not, see *
+ * . *
+ * *
***************************************************************************/
#ifndef START_PRECOMPILED_H
@@ -25,4 +26,26 @@
#include
+#ifdef _MSC_VER
+#pragma warning(disable : 5208)
#endif
+
+#ifdef _PreComp_
+
+// standard
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+// Qt (should never include GUI files, only QtCore)
+#include
+#include
+#include
+
+#endif // _PreComp_
+#endif // START_PRECOMPILED_H
diff --git a/src/Mod/CleanStart/App/RecentFilesModel.cpp b/src/Mod/Start/App/RecentFilesModel.cpp
similarity index 93%
rename from src/Mod/CleanStart/App/RecentFilesModel.cpp
rename to src/Mod/Start/App/RecentFilesModel.cpp
index 238007a368..1a45b1b343 100644
--- a/src/Mod/CleanStart/App/RecentFilesModel.cpp
+++ b/src/Mod/Start/App/RecentFilesModel.cpp
@@ -1,51 +1,52 @@
-// SPDX-License-Identifier: LGPL-2.1-or-later
-/****************************************************************************
- * *
- * Copyright (c) 2024 The FreeCAD Project Association AISBL *
- * *
- * This file is part of FreeCAD. *
- * *
- * FreeCAD is free software: you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation, either version 2.1 of the *
- * License, or (at your option) any later version. *
- * *
- * 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 *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with FreeCAD. If not, see *
- * . *
- * *
- ***************************************************************************/
-
-#include "PreCompiled.h"
-#ifndef _PreComp_
-#endif
-
-#include "RecentFilesModel.h"
-#include
-#include
-
-using namespace CleanStart;
-
-RecentFilesModel::RecentFilesModel(QObject* parent) : DisplayedFilesModel(parent)
-{
- _parameterGroup = App::GetApplication().GetParameterGroupByPath(
- "User parameter:BaseApp/Preferences/RecentFiles");
-}
-
-void RecentFilesModel::loadRecentFiles()
-{
- beginResetModel();
- clear();
- auto numRows {_parameterGroup->GetInt("RecentFiles", 0)};
- for (int i = 0; i < numRows; ++i) {
- auto entry = fmt::format("MRU{}", i);
- auto path = _parameterGroup->GetASCII(entry.c_str(), "");
- addFile(QString::fromStdString(path));
- }
- endResetModel();
-}
+// SPDX-License-Identifier: LGPL-2.1-or-later
+/****************************************************************************
+ * *
+ * Copyright (c) 2024 The FreeCAD Project Association AISBL *
+ * *
+ * This file is part of FreeCAD. *
+ * *
+ * FreeCAD is free software: you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation, either version 2.1 of the *
+ * License, or (at your option) any later version. *
+ * *
+ * 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 *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with FreeCAD. If not, see *
+ * . *
+ * *
+ ***************************************************************************/
+
+#include "PreCompiled.h"
+#ifndef _PreComp_
+#endif
+
+#include "RecentFilesModel.h"
+#include
+#include
+
+using namespace Start;
+
+RecentFilesModel::RecentFilesModel(QObject* parent)
+ : DisplayedFilesModel(parent)
+{
+ _parameterGroup = App::GetApplication().GetParameterGroupByPath(
+ "User parameter:BaseApp/Preferences/RecentFiles");
+}
+
+void RecentFilesModel::loadRecentFiles()
+{
+ beginResetModel();
+ clear();
+ auto numRows {_parameterGroup->GetInt("RecentFiles", 0)};
+ for (int i = 0; i < numRows; ++i) {
+ auto entry = fmt::format("MRU{}", i);
+ auto path = _parameterGroup->GetASCII(entry.c_str(), "");
+ addFile(QString::fromStdString(path));
+ }
+ endResetModel();
+}
diff --git a/src/Mod/CleanStart/App/RecentFilesModel.h b/src/Mod/Start/App/RecentFilesModel.h
similarity index 85%
rename from src/Mod/CleanStart/App/RecentFilesModel.h
rename to src/Mod/Start/App/RecentFilesModel.h
index 077c53c54b..bdf5be6d37 100644
--- a/src/Mod/CleanStart/App/RecentFilesModel.h
+++ b/src/Mod/Start/App/RecentFilesModel.h
@@ -1,52 +1,53 @@
-// SPDX-License-Identifier: LGPL-2.1-or-later
-/****************************************************************************
- * *
- * Copyright (c) 2024 The FreeCAD Project Association AISBL *
- * *
- * This file is part of FreeCAD. *
- * *
- * FreeCAD is free software: you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation, either version 2.1 of the *
- * License, or (at your option) any later version. *
- * *
- * 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 *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with FreeCAD. If not, see *
- * . *
- * *
- ***************************************************************************/
-
-#ifndef FREECAD_CLEANSTART_RECENTFILESMODEL_H
-#define FREECAD_CLEANSTART_RECENTFILESMODEL_H
-
-#include
-#include
-#include
-
-#include "DisplayedFilesModel.h"
-#include "../CleanStartGlobal.h"
-
-namespace CleanStart
-{
-
-/// A model for displaying a list of files including a thumbnail or icon, plus various file statistics.
-class CleanStartExport RecentFilesModel: public DisplayedFilesModel
-{
- Q_OBJECT
-public:
- explicit RecentFilesModel(QObject* parent = nullptr);
-
- void loadRecentFiles();
-
-private:
- Base::Reference _parameterGroup;
-};
-
-} // namespace CleanStart
-
-#endif // FREECAD_CLEANSTART_RECENTFILESMODEL_H
+// SPDX-License-Identifier: LGPL-2.1-or-later
+/****************************************************************************
+ * *
+ * Copyright (c) 2024 The FreeCAD Project Association AISBL *
+ * *
+ * This file is part of FreeCAD. *
+ * *
+ * FreeCAD is free software: you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation, either version 2.1 of the *
+ * License, or (at your option) any later version. *
+ * *
+ * 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 *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with FreeCAD. If not, see *
+ * . *
+ * *
+ ***************************************************************************/
+
+#ifndef FREECAD_START_RECENTFILESMODEL_H
+#define FREECAD_START_RECENTFILESMODEL_H
+
+#include
+#include
+#include
+
+#include "DisplayedFilesModel.h"
+#include "../StartGlobal.h"
+
+namespace Start
+{
+
+/// A model for displaying a list of files including a thumbnail or icon, plus various file
+/// statistics.
+class StartExport RecentFilesModel: public DisplayedFilesModel
+{
+ Q_OBJECT
+public:
+ explicit RecentFilesModel(QObject* parent = nullptr);
+
+ void loadRecentFiles();
+
+private:
+ Base::Reference _parameterGroup;
+};
+
+} // namespace Start
+
+#endif // FREECAD_START_RECENTFILESMODEL_H
diff --git a/src/Mod/Start/App/StartConfiguration.h b/src/Mod/Start/App/StartConfiguration.h
deleted file mode 100644
index b03ebad9b0..0000000000
--- a/src/Mod/Start/App/StartConfiguration.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/***************************************************************************
- * Copyright (c) 2008 Jürgen Riegel *
- * *
- * 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 *
- * *
- ***************************************************************************/
-
-
-#ifndef START_CONFIGURATION_H
-#define START_CONFIGURATION_H
-
-#include
-
-// Exporting of App classes
-#ifdef FC_OS_WIN32
-#define START_SHOW_SKETCHER
-#define START_USE_DRAFTING
-#else // for Linux
-#define START_USE_DRAFTING
-#endif
-
-
-#endif
diff --git a/src/Mod/Start/CMakeLists.txt b/src/Mod/Start/CMakeLists.txt
index 401a0ee97c..cb81dd1034 100644
--- a/src/Mod/Start/CMakeLists.txt
+++ b/src/Mod/Start/CMakeLists.txt
@@ -1,51 +1,49 @@
-add_subdirectory(App)
-
-set(Start_Scripts
- Init.py
- TestStartGui.py
-)
-
-if(BUILD_GUI)
- list(APPEND Start_Scripts InitGui.py)
-
- add_subdirectory(Gui)
- add_subdirectory(StartPage)
-endif(BUILD_GUI)
-
-set(Start_Tests
- TestStart/__init__.py
- TestStart/TestStartPage.py)
-
-set(Start_Test_Files
- ${Start_Tests}
- ${Start_Scripts})
-
-add_custom_target(StartScripts ALL
- SOURCES ${Start_Scripts}
-)
-
-add_custom_target(StartTests ALL
- SOURCES ${Start_Test_Files}
-)
-
-fc_target_copy_resource(StartScripts
- ${CMAKE_CURRENT_SOURCE_DIR}
- ${CMAKE_BINARY_DIR}/Mod/Start
- ${Start_Scripts})
-
-fc_copy_sources(StartTests "${CMAKE_BINARY_DIR}/Mod/Start" ${Start_Test_Files})
-
-
-INSTALL(
- FILES
- ${Start_Scripts}
- DESTINATION
- Mod/Start
-)
-
-INSTALL(
- FILES
- ${Start_Tests}
- DESTINATION
- Mod/Start/TestStart
-)
+# SPDX-License-Identifier: LGPL-2.1-or-later
+# /****************************************************************************
+# * *
+# * Copyright (c) 2024 The FreeCAD Project Association AISBL *
+# * *
+# * This file is part of FreeCAD. *
+# * *
+# * FreeCAD is free software: you can redistribute it and/or modify it *
+# * under the terms of the GNU Lesser General Public License as *
+# * published by the Free Software Foundation, either version 2.1 of the *
+# * License, or (at your option) any later version. *
+# * *
+# * 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 *
+# * Lesser General Public License for more details. *
+# * *
+# * You should have received a copy of the GNU Lesser General Public *
+# * License along with FreeCAD. If not, see *
+# * . *
+# * *
+# ***************************************************************************/
+
+add_subdirectory(App)
+
+set(Start_Scripts
+ Init.py
+ )
+
+if (BUILD_GUI)
+ add_subdirectory(Gui)
+ list(APPEND Start_Scripts InitGui.py)
+endif (BUILD_GUI)
+
+add_custom_target(StartScripts ALL
+ SOURCES ${Start_Scripts}
+ )
+
+fc_target_copy_resource(StartScripts
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${CMAKE_BINARY_DIR}/Mod/Start
+ ${Start_Scripts})
+
+INSTALL(
+ FILES
+ ${Start_Scripts}
+ DESTINATION
+ Mod/Start
+)
diff --git a/src/Mod/Start/Gui/AppStartGui.cpp b/src/Mod/Start/Gui/AppStartGui.cpp
index 7015d8ab30..8e1f2dc5f1 100644
--- a/src/Mod/Start/Gui/AppStartGui.cpp
+++ b/src/Mod/Start/Gui/AppStartGui.cpp
@@ -1,23 +1,24 @@
-/***************************************************************************
- * Copyright (c) 2008 Jürgen Riegel *
- * *
- * 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 *
- * *
+// SPDX-License-Identifier: LGPL-2.1-or-later
+/****************************************************************************
+ * *
+ * Copyright (c) 2024 The FreeCAD Project Association AISBL *
+ * *
+ * This file is part of FreeCAD. *
+ * *
+ * FreeCAD is free software: you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation, either version 2.1 of the *
+ * License, or (at your option) any later version. *
+ * *
+ * 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 *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with FreeCAD. If not, see *
+ * . *
+ * *
***************************************************************************/
#include "PreCompiled.h"
@@ -25,17 +26,14 @@
#include
#include
#include
-#include
#include
-#include
-#include "DlgStartPreferencesImp.h"
+#include
+
+#include <3rdParty/GSL/include/gsl/pointers>
+
#include "Workbench.h"
-
-// use a different name to CreateCommand()
-void CreateStartCommands();
-
void loadStartResource()
{
// add resources and reloads the translators
@@ -44,6 +42,12 @@ void loadStartResource()
Gui::Translator::instance()->refresh();
}
+namespace StartGui
+{
+extern PyObject* initModule();
+}
+
+
namespace StartGui
{
class Module: public Py::ExtensionModule
@@ -54,62 +58,24 @@ public:
{
initialize("This module is the StartGui module."); // register with Python
}
-
-private:
};
PyObject* initModule()
{
- return Base::Interpreter().addModule(new Module);
+ auto newModule = gsl::owner(new Module);
+ return Base::Interpreter().addModule(newModule); // Transfer ownership
}
} // namespace StartGui
-
/* Python entry */
PyMOD_INIT_FUNC(StartGui)
{
- if (!Gui::Application::Instance) {
- PyErr_SetString(PyExc_ImportError, "Cannot load Gui module in console application.");
- PyMOD_Return(nullptr);
- }
-
- // load dependent module
- try {
- Base::Interpreter().runString("import WebGui");
- }
- catch (const Base::Exception& e) {
- PyErr_SetString(PyExc_ImportError, e.what());
- PyMOD_Return(nullptr);
- }
- catch (Py::Exception& e) {
- Py::Object o = Py::type(e);
- if (o.isString()) {
- Py::String s(o);
- Base::Console().Error("%s\n", s.as_std_string("utf-8").c_str());
- }
- else {
- Py::String s(o.repr());
- Base::Console().Error("%s\n", s.as_std_string("utf-8").c_str());
- }
- // Prints message to console window if we are in interactive mode
- PyErr_Print();
- }
-
+ Base::Console().Log("Loading GUI of Start module... ");
PyObject* mod = StartGui::initModule();
- Base::Console().Log("Loading GUI of Start module... done\n");
-
- // clang-format off
- // register preferences pages
- new Gui::PrefPageProducer (QT_TRANSLATE_NOOP("QObject", "Start"));
- new Gui::PrefPageProducer (QT_TRANSLATE_NOOP("QObject", "Start"));
- // clang-format on
-
- // instantiating the commands
- CreateStartCommands();
StartGui::Workbench::init();
-
- // add resources and reloads the translators
loadStartResource();
+ Base::Console().Log("done\n");
+
PyMOD_Return(mod);
}
diff --git a/src/Mod/Start/Gui/CMakeLists.txt b/src/Mod/Start/Gui/CMakeLists.txt
index 7140934b15..4eaedd1fd9 100644
--- a/src/Mod/Start/Gui/CMakeLists.txt
+++ b/src/Mod/Start/Gui/CMakeLists.txt
@@ -1,60 +1,89 @@
-include_directories(
- ${CMAKE_CURRENT_BINARY_DIR}
- ${Boost_INCLUDE_DIRS}
- ${COIN3D_INCLUDE_DIRS}
- ${ZLIB_INCLUDE_DIR}
- ${PYTHON_INCLUDE_DIRS}
- ${XercesC_INCLUDE_DIRS}
-)
-
-set(StartGui_LIBS
- Start
- FreeCADGui
-)
-
-set(StartGui_UIC_SRCS
- DlgStartPreferences.ui
- DlgStartPreferencesAdvanced.ui
-)
-
-set (Start_TR_QRC ${CMAKE_CURRENT_BINARY_DIR}/Resources/Start_translation.qrc)
-qt_find_and_add_translation(QM_SRCS "Resources/translations/*_*.ts"
- ${CMAKE_CURRENT_BINARY_DIR}/Resources/translations)
-qt_create_resource_file(${Start_TR_QRC} ${QM_SRCS})
-qt_add_resources(Start_QRC_SRCS Resources/Start.qrc ${Start_TR_QRC})
-
-SET(StartGui_SRCS
- ${Start_QRC_SRCS}
- ${StartGui_UIC_SRCS}
- DlgStartPreferences.ui
- DlgStartPreferencesAdvanced.ui
- DlgStartPreferencesImp.cpp
- DlgStartPreferencesImp.h
- AppStartGui.cpp
- Command.cpp
- PreCompiled.cpp
- PreCompiled.h
- Workbench.cpp
- Workbench.h
-)
-
-SET(StartGuiIcon_SVG
- Resources/icons/StartWorkbench.svg
-)
-
-if(FREECAD_USE_PCH)
- add_definitions(-D_PreComp_)
- GET_MSVC_PRECOMPILED_SOURCE("PreCompiled.cpp" PCH_SRCS ${StartGui_SRCS})
- ADD_MSVC_PRECOMPILED_HEADER(StartGui PreCompiled.h PreCompiled.cpp PCH_SRCS)
-endif(FREECAD_USE_PCH)
-
-add_library(StartGui SHARED ${StartGui_SRCS} ${StartGuiIcon_SVG})
-target_link_libraries(StartGui ${StartGui_LIBS})
-
-SET_BIN_DIR(StartGui StartGui /Mod/Start)
-SET_PYTHON_PREFIX_SUFFIX(StartGui)
-
-fc_copy_sources(StartGui "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_DATADIR}/Mod/Start" ${StartGuiIcon_SVG})
-
-INSTALL(TARGETS StartGui DESTINATION ${CMAKE_INSTALL_LIBDIR})
-INSTALL(FILES ${StartGuiIcon_SVG} DESTINATION "${CMAKE_INSTALL_DATADIR}/Mod/Start/Resources/icons")
+# SPDX-License-Identifier: LGPL-2.1-or-later
+# /****************************************************************************
+# * *
+# * Copyright (c) 2024 The FreeCAD Project Association AISBL *
+# * *
+# * This file is part of FreeCAD. *
+# * *
+# * FreeCAD is free software: you can redistribute it and/or modify it *
+# * under the terms of the GNU Lesser General Public License as *
+# * published by the Free Software Foundation, either version 2.1 of the *
+# * License, or (at your option) any later version. *
+# * *
+# * 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 *
+# * Lesser General Public License for more details. *
+# * *
+# * You should have received a copy of the GNU Lesser General Public *
+# * License along with FreeCAD. If not, see *
+# * . *
+# * *
+# ***************************************************************************/
+
+include_directories(
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${PYTHON_INCLUDE_DIRS}
+ ${Boost_INCLUDE_DIRS}
+ ${ZLIB_INCLUDE_DIR}
+ ${XercesC_INCLUDE_DIRS}
+ ${QtCore_INCLUDE_DIRS}
+ ${QtWidgets_INCLUDE_DIRS}
+ ${QtSvg_INCLUDE_DIRS}
+ #${QtNetwork_INCLUDE_DIRS}
+ ${QtUiTools_INCLUDE_DIRS}
+ #${QtQuick_INCLUDE_DIRS}
+ #${QtQuickWidgets_INCLUDE_DIRS}
+)
+
+set(StartGui_LIBS
+ Start
+ FreeCADGui
+ )
+
+set(Start_TR_QRC ${CMAKE_CURRENT_BINARY_DIR}/Resources/Start_translation.qrc)
+qt_find_and_add_translation(QM_SRCS "Resources/translations/*_*.ts"
+ ${CMAKE_CURRENT_BINARY_DIR}/Resources/translations)
+qt_create_resource_file(${Start_TR_QRC} ${QM_SRCS})
+qt_add_resources(Start_QRC_SRCS Resources/Start.qrc ${Start_TR_QRC})
+# qtquick_compiler_add_resources(Start_QRC_SRCS Resources/Start.qrc ${Start_TR_QRC} qml.qrc)
+
+SET(StartGui_SRCS
+ ${Start_QRC_SRCS}
+ ${StartGui_UIC_SRCS}
+ AppStartGui.cpp
+ Command.cpp
+ PreCompiled.cpp
+ PreCompiled.h
+ StartView.cpp
+ StartView.h
+ FileCardDelegate.cpp
+ FileCardDelegate.h
+ FileCardView.cpp
+ FileCardView.h
+ Workbench.cpp
+ Workbench.h
+ )
+
+SET(StartGuiIcon_SVG
+ Resources/icons/StartWorkbench.svg
+ )
+
+# TODO: Evaluate PCH use with Qt6/QtQuick/Qml
+if (FREECAD_USE_PCH)
+ add_definitions(-D_PreComp_)
+ GET_MSVC_PRECOMPILED_SOURCE("PreCompiled.cpp" PCH_SRCS ${StartGui_SRCS})
+ ADD_MSVC_PRECOMPILED_HEADER(StartGui PreCompiled.h PreCompiled.cpp PCH_SRCS)
+endif (FREECAD_USE_PCH)
+
+add_library(StartGui SHARED ${StartGui_SRCS} ${StartGuiIcon_SVG})
+# target_link_libraries(StartGui ${StartGui_LIBS} Qt::Quick Qt::Qml Qt::QuickWidgets)
+target_link_libraries(StartGui ${StartGui_LIBS})
+
+SET_BIN_DIR(StartGui StartGui /Mod/Start)
+SET_PYTHON_PREFIX_SUFFIX(StartGui)
+
+fc_copy_sources(StartGui "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_DATADIR}/Mod/Start" ${StartGuiIcon_SVG})
+
+INSTALL(TARGETS StartGui DESTINATION ${CMAKE_INSTALL_LIBDIR})
+INSTALL(FILES ${StartGuiIcon_SVG} DESTINATION "${CMAKE_INSTALL_DATADIR}/Mod/Start/Resources/icons")
diff --git a/src/Mod/Start/Gui/Command.cpp b/src/Mod/Start/Gui/Command.cpp
index aa944e1dff..160c2759f9 100644
--- a/src/Mod/Start/Gui/Command.cpp
+++ b/src/Mod/Start/Gui/Command.cpp
@@ -1,23 +1,24 @@
-/***************************************************************************
- * Copyright (c) 2010 Jürgen Riegel *
- * *
- * 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 *
- * *
+// SPDX-License-Identifier: LGPL-2.1-or-later
+/****************************************************************************
+ * *
+ * Copyright (c) 2024 The FreeCAD Project Association AISBL *
+ * *
+ * This file is part of FreeCAD. *
+ * *
+ * FreeCAD is free software: you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation, either version 2.1 of the *
+ * License, or (at your option) any later version. *
+ * *
+ * 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 *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with FreeCAD. If not, see *
+ * . *
+ * *
***************************************************************************/
#include "PreCompiled.h"
@@ -25,35 +26,37 @@
#include
#include
+#include <3rdParty/GSL/include/gsl/pointers>
+
#include "Workbench.h"
using namespace std;
-DEF_STD_CMD(CmdStartPage)
+DEF_STD_CMD(CmdStart)
-CmdStartPage::CmdStartPage()
- : Command("Start_StartPage")
+CmdStart::CmdStart()
+ : Command("Start_Start")
{
sAppModule = "Start";
sGroup = QT_TR_NOOP("Start");
- sMenuText = QT_TR_NOOP("Start Page");
- sToolTipText = QT_TR_NOOP("Displays the start page in a browser view");
- sWhatsThis = "Start_StartPage";
+ sMenuText = QT_TR_NOOP("Start");
+ sToolTipText = QT_TR_NOOP("Displays the Start in an MDI view");
+ sWhatsThis = "Start_Start";
sStatusTip = sToolTipText;
sPixmap = "StartWorkbench";
}
-void CmdStartPage::activated(int iMsg)
+void CmdStart::activated(int iMsg)
{
Q_UNUSED(iMsg);
- StartGui::Workbench::loadStartPage();
+ StartGui::Workbench::loadStart();
}
void CreateStartCommands()
{
Gui::CommandManager& rcCmdMgr = Gui::Application::Instance->commandManager();
-
- rcCmdMgr.addCommand(new CmdStartPage());
+ auto newCommand = gsl::owner(new CmdStart);
+ rcCmdMgr.addCommand(newCommand); // Transfer ownership
}
diff --git a/src/Mod/Start/Gui/DlgStartPreferences.ui b/src/Mod/Start/Gui/DlgStartPreferences.ui
deleted file mode 100644
index fbbe67a47e..0000000000
--- a/src/Mod/Start/Gui/DlgStartPreferences.ui
+++ /dev/null
@@ -1,777 +0,0 @@
-
-
- DlgStartPreferences
-
-
-
- 0
- 0
- 548
- 894
-
-
-
- General
-
-
- -
-
-
- Options
-
-
- -
-
-
- Switch workbench after loading
-
-
-
- -
-
-
- Workbench to switch to after loading a file from the Start page, only used if Start is the start up workbench
-
-
-
- -
-
-
- Close start page after loading
-
-
-
- -
-
-
- If checked, will automatically close the Start page when FreeCAD launches
-
-
- Qt::RightToLeft
-
-
-
-
-
- closeStart
-
-
- Mod/Start
-
-
-
- -
-
-
- Close and switch on opening file
-
-
-
- -
-
-
- If application is started by opening a file, apply the two settings above
-
-
- Qt::RightToLeft
-
-
-
-
-
- DoNotShowOnOpen
-
-
- Mod/Start
-
-
-
-
-
-
- -
-
-
- Contents
-
-
- -
-
- -
-
-
- Qt::Horizontal
-
-
-
- 40
- 20
-
-
-
-
- -
-
-
-
- 100
- 16777215
-
-
-
- The size of file thumbnail icons in recent files and examples sections
-
-
- Qt::LeftToRight
-
-
- Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter
-
-
- px
-
-
- 32
-
-
- 128
-
-
- 128
-
-
- FileThumbnailIconsSize
-
-
- Mod/Start
-
-
-
-
-
- -
-
-
- Qt::RightToLeft
-
-
-
-
-
- true
-
-
- ShowFileThumbnailIcons
-
-
- Mod/Start
-
-
-
- -
-
-
- If you want the examples to show on the first page
-
-
- Qt::RightToLeft
-
-
-
-
-
- true
-
-
- ShowExamples
-
-
- Mod/Start
-
-
-
- -
-
-
- Displays help tips in the Start workbench Documents tab
-
-
- Qt::RightToLeft
-
-
-
-
-
- true
-
-
- ShowTips
-
-
- Mod/Start
-
-
-
- -
-
-
- Show tips
-
-
-
- -
-
-
- Show forum
-
-
-
- -
-
-
- Show notepad
-
-
-
- -
-
-
- If this is checked, the latest posts from the FreeCAD forum will be displayed on the Activity tab
-
-
- Qt::RightToLeft
-
-
-
-
-
- ShowForum
-
-
- Mod/Start
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
- File thumbnail size
-
-
-
- -
-
-
- Show examples folder contents
-
-
-
- -
-
-
- Shows a notepad next to the file thumbnails, where you can keep notes across sessions
-
-
- Qt::RightToLeft
-
-
-
-
-
- ShowNotes
-
-
- Mod/Start
-
-
-
- -
-
-
- Show file thumbnails
-
-
-
- -
-
-
- Gui::FileChooser::Directory
-
-
- An optional custom folder to be displayed at the bottom of the first page.
-By using ";;" to separate paths, you can add several folders here
-
-
- ShowCustomFolder
-
-
- Mod/Start
-
-
-
- -
-
-
- Show additional folder
-
-
-
-
-
-
- -
-
-
- Fonts and colors
-
-
- -
-
-
-
- 60
- 60
-
-
-
- The background color of the boxes inside the pages
-
-
-
- 221
- 221
- 221
-
-
-
- BoxColor
-
-
- Mod/Start
-
-
-
- -
-
-
- Page text color
-
-
-
- -
-
-
- Page background color
-
-
-
- -
-
-
-
- 60
- 60
-
-
-
- The background of the main start page area
-
-
-
- 255
- 255
- 255
-
-
-
- PageColor
-
-
- Mod/Start
-
-
-
- -
-
- -
-
-
- false
-
-
- in FreeCAD
-
-
- true
-
-
- InBrowser
-
-
- Mod/Start
-
-
-
- -
-
-
- false
-
-
- In external browser
-
-
- InWeb
-
-
- Mod/Start
-
-
-
-
-
- -
-
-
- Font family
-
-
-
- -
-
-
- false
-
-
- Open links
-
-
-
- -
-
-
-
- 60
- 60
-
-
-
- The background color behind the panels
-
-
-
- 79
- 88
- 116
-
-
-
- BackgroundColor1
-
-
- Mod/Start
-
-
-
- -
-
-
- Use FreeCAD style sheet
-
-
-
- -
-
-
- false
-
-
- Background color down gradient
-
-
-
- -
-
-
- false
-
-
-
- 60
- 60
-
-
-
- The down gradient for the background color (currently unsupported)
-
-
-
- 127
- 158
- 181
-
-
-
- BackgroundColor2
-
-
- Mod/Start
-
-
-
- -
-
-
- Box background color
-
-
-
- -
-
-
- Background color
-
-
-
- -
-
-
- Background text color
-
-
-
- -
-
- -
-
-
- The font family to use on the start page. Can be a font name or a comma-separated series of fallback fonts
-
-
-
-
-
- Arial,Helvetica,sans
-
-
- FontFamily
-
-
- Mod/Start
-
-
-
- -
-
-
- The base font size to use for all texts of the Start page
-
-
- px
-
-
- 13
-
-
- FontSize
-
-
- Mod/Start
-
-
-
-
-
- -
-
-
-
- 60
- 60
-
-
-
- The color of the links
-
-
-
- 0
- 0
- 255
-
-
-
- LinkColor
-
-
- Mod/Start
-
-
-
- -
-
-
- Link color
-
-
-
- -
-
-
- If this is checked and a style sheet is specified in General preferences, it will be used and override the colors below
-
-
- Qt::RightToLeft
-
-
-
-
-
- UseStyleSheet
-
-
- Mod/Start
-
-
-
- -
-
-
-
- 60
- 60
-
-
-
- The color of the version text
-
-
-
- 95
- 95
- 95
-
-
-
- BackgroundTextColor
-
-
- Mod/Start
-
-
-
- -
-
-
-
- 60
- 60
-
-
-
- The color of the text on the main pages
-
-
-
- 0
- 0
- 0
-
-
-
- PageTextColor
-
-
- Mod/Start
-
-
-
- -
-
-
- An optional image to display as background
-
-
- BackgroundImage
-
-
- Mod/Start
-
-
-
- -
-
-
- Background image
-
-
-
-
-
-
- -
-
-
- Qt::Vertical
-
-
-
- 20
- 40
-
-
-
-
-
-
-
-
- Gui::FileChooser
- QWidget
-
-
-
- Gui::ColorButton
- QPushButton
-
-
-
- Gui::PrefFileChooser
- Gui::FileChooser
-
-
-
- Gui::PrefSpinBox
- QSpinBox
-
-
-
- Gui::PrefColorButton
- Gui::ColorButton
-
-
-
- Gui::PrefRadioButton
- QRadioButton
-
-
-
- Gui::PrefCheckBox
- QCheckBox
-
-
-
- Gui::PrefLineEdit
- QLineEdit
-
-
-
-
-
-
diff --git a/src/Mod/Start/Gui/DlgStartPreferencesAdvanced.ui b/src/Mod/Start/Gui/DlgStartPreferencesAdvanced.ui
deleted file mode 100644
index d97177501e..0000000000
--- a/src/Mod/Start/Gui/DlgStartPreferencesAdvanced.ui
+++ /dev/null
@@ -1,90 +0,0 @@
-
-
- DlgStartPreferencesAdvanced
-
-
-
- 0
- 0
- 548
- 896
-
-
-
- Advanced
-
-
- -
-
-
- Custom HTML Template
-
-
- -
-
-
- An optional HTML template that will be used instead of the default start page.
-
-
- Template
-
-
- Mod/Start
-
-
-
-
-
-
- -
-
-
- Custom CSS
-
-
- -
-
-
- <html><head/><body><p>You can paste your custom CSS here and the Start Page will apply it for you. To learn more about how you can style the Start Page, take a look at the HTML and CSS sources:</p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html</span></a></p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css</span></a></p></body></html>
-
-
- true
-
-
- true
-
-
-
- -
-
-
- false
-
-
- CustomCSS
-
-
- Mod/Start
-
-
-
-
-
-
-
-
-
-
- Gui::PrefFileChooser
- QWidget
-
-
-
- Gui::PrefTextEdit
- QWidget
-
-
-
-
-
-
diff --git a/src/Mod/Start/Gui/DlgStartPreferencesImp.cpp b/src/Mod/Start/Gui/DlgStartPreferencesImp.cpp
deleted file mode 100644
index 4a625ecf91..0000000000
--- a/src/Mod/Start/Gui/DlgStartPreferencesImp.cpp
+++ /dev/null
@@ -1,204 +0,0 @@
-/***************************************************************************
- * Copyright (c) 2018 Yorik van Havre *
- * *
- * 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"
-
-#include
-
-#include "DlgStartPreferencesImp.h"
-#include "ui_DlgStartPreferences.h"
-#include "ui_DlgStartPreferencesAdvanced.h"
-
-
-using namespace StartGui;
-
-/**
- * Constructs a DlgStartPreferencesImp which is a child of 'parent'
- */
-DlgStartPreferencesImp::DlgStartPreferencesImp(QWidget* parent)
- : PreferencePage(parent)
- , ui(new Ui_DlgStartPreferences)
-{
- ui->setupUi(this);
-
- // Hide currently unused controls
- ui->label_12->hide();
- ui->label_7->hide();
- ui->colorButton_7->hide();
- ui->radioButton_1->hide();
- ui->radioButton_2->hide();
-
- // fills the combo box with all available workbenches
- // sorted by their menu text
- QStringList work = Gui::Application::Instance->workbenches();
- QMap menuText;
- for (const auto& it : work) {
- QString text = Gui::Application::Instance->workbenchMenuText(it);
- menuText[text] = it;
- }
-
- // add special workbench to selection
- QPixmap px = Gui::Application::Instance->workbenchIcon(QString::fromLatin1("NoneWorkbench"));
- QString key = QString::fromLatin1("");
- QString value = QString::fromLatin1("$LastModule");
- if (px.isNull()) {
- ui->AutoloadModuleCombo->addItem(key, QVariant(value));
- }
- else {
- ui->AutoloadModuleCombo->addItem(px, key, QVariant(value));
- }
-
- for (QMap::Iterator it = menuText.begin(); it != menuText.end(); ++it) {
- QPixmap px = Gui::Application::Instance->workbenchIcon(it.value());
- if (px.isNull()) {
- ui->AutoloadModuleCombo->addItem(it.key(), QVariant(it.value()));
- }
- else {
- ui->AutoloadModuleCombo->addItem(px, it.key(), QVariant(it.value()));
- }
- }
-}
-
-/**
- * Destroys the object and frees any allocated resources
- */
-DlgStartPreferencesImp::~DlgStartPreferencesImp() = default;
-
-void DlgStartPreferencesImp::saveSettings()
-{
- int index = ui->AutoloadModuleCombo->currentIndex();
- QVariant data = ui->AutoloadModuleCombo->itemData(index);
- QString startWbName = data.toString();
- App::GetApplication()
- .GetParameterGroupByPath("User parameter:BaseApp/Preferences/Mod/Start")
- ->SetASCII("AutoloadModule", startWbName.toLatin1());
- ui->backgroundColorButton->onSave();
- ui->backgroundTextColorButton->onSave();
- ui->pageBackgroundColorButton->onSave();
- ui->pageTextColorButton->onSave();
- ui->boxBackgroundColorButton->onSave();
- ui->linkColorButton->onSave();
- ui->colorButton_7->onSave();
- ui->backgroundImageFileChooser->onSave();
- ui->showAdditionalFolderFileChooser->onSave();
- ui->radioButton_1->onSave();
- ui->radioButton_2->onSave();
- ui->showNotepadCheckBox->onSave();
- ui->showExamplesCheckBox->onSave();
- ui->closeStartCheckBox->onSave();
- ui->closeAndSwitchCheckBox->onSave();
- ui->showForumCheckBox->onSave();
- ui->useStyleSheetCheckBox->onSave();
- ui->showTipsCheckBox->onSave();
- ui->fontLineEdit->onSave();
- ui->fontSizeSpinBox->onSave();
- ui->showFileThumbnailIconsCheckBox->onSave();
- ui->fileThumbnailIconSizeSpinBox->onSave();
-}
-
-void DlgStartPreferencesImp::loadSettings()
-{
- std::string start = App::Application::Config()["StartWorkbench"];
- start = App::GetApplication()
- .GetParameterGroupByPath("User parameter:BaseApp/Preferences/Mod/Start")
- ->GetASCII("AutoloadModule", start.c_str());
- QString startWbName = QLatin1String(start.c_str());
- ui->AutoloadModuleCombo->setCurrentIndex(ui->AutoloadModuleCombo->findData(startWbName));
- ui->backgroundColorButton->onRestore();
- ui->backgroundTextColorButton->onRestore();
- ui->pageBackgroundColorButton->onRestore();
- ui->pageTextColorButton->onRestore();
- ui->boxBackgroundColorButton->onRestore();
- ui->linkColorButton->onRestore();
- ui->colorButton_7->onRestore();
- ui->backgroundImageFileChooser->onRestore();
- ui->showAdditionalFolderFileChooser->onRestore();
- ui->radioButton_1->onRestore();
- ui->radioButton_2->onRestore();
- ui->showNotepadCheckBox->onRestore();
- ui->showExamplesCheckBox->onRestore();
- ui->closeStartCheckBox->onRestore();
- ui->closeAndSwitchCheckBox->onRestore();
- ui->showForumCheckBox->onRestore();
- ui->useStyleSheetCheckBox->onRestore();
- ui->showTipsCheckBox->onRestore();
- ui->fontLineEdit->onRestore();
- ui->fontSizeSpinBox->onRestore();
- ui->showFileThumbnailIconsCheckBox->onRestore();
- ui->fileThumbnailIconSizeSpinBox->onRestore();
-}
-
-/**
- * Sets the strings of the subwidgets using the current language.
- */
-void DlgStartPreferencesImp::changeEvent(QEvent* ev)
-{
- if (ev->type() == QEvent::LanguageChange) {
- ui->retranslateUi(this);
- }
- else {
- Gui::Dialog::PreferencePage::changeEvent(ev);
- }
-}
-
-
-/**
- * Constructs a DlgStartPreferencesAdvancedImp which is a child of 'parent'
- */
-DlgStartPreferencesAdvancedImp::DlgStartPreferencesAdvancedImp(QWidget* parent)
- : PreferencePage(parent)
- , ui(new Ui_DlgStartPreferencesAdvanced)
-{
- ui->setupUi(this);
-}
-
-/**
- * Destroys the object and frees any allocated resources
- */
-DlgStartPreferencesAdvancedImp::~DlgStartPreferencesAdvancedImp() = default;
-
-void DlgStartPreferencesAdvancedImp::saveSettings()
-{
- ui->templateFileChooser->onSave();
- ui->customCSSTextEdit->onSave();
-}
-
-void DlgStartPreferencesAdvancedImp::loadSettings()
-{
- ui->templateFileChooser->onRestore();
- ui->customCSSTextEdit->onRestore();
-}
-
-/**
- * Sets the strings of the subwidgets using the current language.
- */
-void DlgStartPreferencesAdvancedImp::changeEvent(QEvent* ev)
-{
- if (ev->type() == QEvent::LanguageChange) {
- ui->retranslateUi(this);
- }
- else {
- Gui::Dialog::PreferencePage::changeEvent(ev);
- }
-}
-
-#include "moc_DlgStartPreferencesImp.cpp"
diff --git a/src/Mod/Start/Gui/DlgStartPreferencesImp.h b/src/Mod/Start/Gui/DlgStartPreferencesImp.h
deleted file mode 100644
index 49cee1122f..0000000000
--- a/src/Mod/Start/Gui/DlgStartPreferencesImp.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/***************************************************************************
- * Copyright (c) 2018 Yorik van Havre *
- * *
- * 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 *
- * *
- ***************************************************************************/
-
-#ifndef STARTGUI_DLGSTARTPREFERENCESIMP_H
-#define STARTGUI_DLGSTARTPREFERENCESIMP_H
-
-#include
-#include
-
-
-class Ui_DlgStartPreferences;
-class Ui_DlgStartPreferencesAdvanced;
-namespace StartGui
-{
-class DlgStartPreferencesImp: public Gui::Dialog::PreferencePage
-{
- Q_OBJECT
-
-public:
- explicit DlgStartPreferencesImp(QWidget* parent = nullptr);
- ~DlgStartPreferencesImp() override;
-
-protected:
- void saveSettings() override;
- void loadSettings() override;
- void changeEvent(QEvent* e) override;
-
-private:
- std::unique_ptr ui;
-};
-
-class DlgStartPreferencesAdvancedImp: public Gui::Dialog::PreferencePage
-{
- Q_OBJECT
-
-public:
- explicit DlgStartPreferencesAdvancedImp(QWidget* parent = nullptr);
- ~DlgStartPreferencesAdvancedImp() override;
-
-protected:
- void saveSettings() override;
- void loadSettings() override;
- void changeEvent(QEvent* e) override;
-
-private:
- std::unique_ptr ui;
-};
-
-} // namespace StartGui
-
-#endif // STARTGUI_DLGSTARTPREFERENCESIMP_H
diff --git a/src/Mod/CleanStart/Gui/FileCardDelegate.cpp b/src/Mod/Start/Gui/FileCardDelegate.cpp
similarity index 74%
rename from src/Mod/CleanStart/Gui/FileCardDelegate.cpp
rename to src/Mod/Start/Gui/FileCardDelegate.cpp
index b5af64b46c..b6ea1abafb 100644
--- a/src/Mod/CleanStart/Gui/FileCardDelegate.cpp
+++ b/src/Mod/Start/Gui/FileCardDelegate.cpp
@@ -1,148 +1,158 @@
-// SPDX-License-Identifier: LGPL-2.1-or-later
-/****************************************************************************
- * *
- * Copyright (c) 2024 The FreeCAD Project Association AISBL *
- * *
- * This file is part of FreeCAD. *
- * *
- * FreeCAD is free software: you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation, either version 2.1 of the *
- * License, or (at your option) any later version. *
- * *
- * 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 *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with FreeCAD. If not, see *
- * . *
- * *
- ***************************************************************************/
-
-#include "PreCompiled.h"
-
-#ifndef _PreComp_
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#endif
-
-#include "FileCardDelegate.h"
-#include "../App/DisplayedFilesModel.h"
-#include "App/Application.h"
-#include <3rdParty/GSL/include/gsl/pointers>
-
-using namespace CleanStart;
-
-FileCardDelegate::FileCardDelegate(QObject *parent)
- : QAbstractItemDelegate(parent) {
- _parameterGroup = App::GetApplication().GetParameterGroupByPath(
- "User parameter:BaseApp/Preferences/Mod/Start");
-}
-
-
-void FileCardDelegate::paint(QPainter *painter,
- const QStyleOptionViewItem &option,
- const QModelIndex &index) const {
- auto thumbnailSize =
- static_cast(_parameterGroup->GetInt("FileThumbnailIconsSize", 64)); // NOLINT
- auto cardWidth = thumbnailSize;
- auto baseName = index.data(static_cast(DisplayedFilesModelRoles::baseName)).toString();
- auto size = index.data(static_cast(DisplayedFilesModelRoles::size)).toString();
- auto image = index.data(static_cast(DisplayedFilesModelRoles::image)).toByteArray();
- auto path = index.data(static_cast(DisplayedFilesModelRoles::path)).toString();
- painter->save();
- auto widget = gsl::owner(new QWidget());
- auto layout = gsl::owner(new QVBoxLayout());
- widget->setLayout(layout);
- auto thumbnail = gsl::owner(new QLabel());
- auto pixmap = gsl::owner(new QPixmap());
- if (!image.isEmpty()) {
- pixmap->loadFromData(image);
- auto scaled = pixmap->scaled(QSize(thumbnailSize, thumbnailSize),
- Qt::AspectRatioMode::KeepAspectRatio,
- Qt::TransformationMode::SmoothTransformation);
- thumbnail->setPixmap(scaled);
- } else {
- thumbnail->setPixmap(generateThumbnail(path));
- }
- thumbnail->setFixedSize(thumbnailSize, thumbnailSize);
- thumbnail->setSizePolicy(QSizePolicy::Policy::Fixed, QSizePolicy::Policy::Fixed);
- auto elided =
- painter->fontMetrics().elidedText(baseName, Qt::TextElideMode::ElideRight, cardWidth);
- auto name = gsl::owner(new QLabel(elided));
- layout->addWidget(thumbnail);
- layout->addWidget(name);
- auto sizeLabel = gsl::owner(new QLabel(size));
- layout->addWidget(sizeLabel);
- layout->addStretch();
- layout->setSpacing(0);
- widget->resize(option.rect.size());
- painter->translate(option.rect.topLeft());
- widget->render(painter, QPoint(), QRegion(), QWidget::DrawChildren);
- painter->restore();
- delete pixmap;
-}
-
-
-QSize FileCardDelegate::sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const {
- Q_UNUSED(option)
- Q_UNUSED(index)
- auto thumbnailSize = _parameterGroup->GetInt("FileThumbnailIconsSize", 128); // NOLINT
- auto cardSpacing = _parameterGroup->GetInt("FileCardSpacing", 20); // NOLINT
- auto cardWidth = thumbnailSize + cardSpacing;
-
- auto font = QGuiApplication::font();
- auto qfm = QFontMetrics(font);
- auto textHeight = 2 * qfm.lineSpacing();
- auto cardHeight = thumbnailSize + textHeight + cardSpacing;
-
- return {static_cast(cardWidth), static_cast(cardHeight)};
-}
-
-namespace {
- QPixmap pixmapToSizedQImage(const QImage &pixmap, int size) {
- return QPixmap::fromImage(pixmap).scaled(size, size,
- Qt::AspectRatioMode::KeepAspectRatio,
- Qt::TransformationMode::SmoothTransformation);
- }
-}
-
-QPixmap FileCardDelegate::generateThumbnail(const QString &path) const {
- auto thumbnailSize =
- static_cast(_parameterGroup->GetInt("FileThumbnailIconsSize", 64)); // NOLINT
- if (path.endsWith(QLatin1String(".fcstd"), Qt::CaseSensitivity::CaseInsensitive)) {
- QImageReader reader(QLatin1String(":/icons/freecad-doc.svg"));;
- reader.setScaledSize({thumbnailSize, thumbnailSize});
- return QPixmap::fromImage(reader.read());
- }
- if (path.endsWith(QLatin1String(".fcmacro"), Qt::CaseSensitivity::CaseInsensitive)) {
- QImageReader reader(QLatin1String(":/icons/MacroEditor.svg"));;
- reader.setScaledSize({thumbnailSize, thumbnailSize});
- return QPixmap::fromImage(reader.read());
- }
- if (!QImageReader::imageFormat(path).isEmpty()) {
- // It is an image: it can be its own thumbnail
- QImageReader reader(path);
- auto image = reader.read();
- return pixmapToSizedQImage(image, thumbnailSize);
- }
- QIcon icon = QFileIconProvider().icon(QFileInfo(path));
- if (!icon.isNull()) {
- QPixmap pixmap = icon.pixmap(thumbnailSize);
- if (!pixmap.isNull()) {
- return pixmap;
- }
- }
- QPixmap pixmap = QPixmap(thumbnailSize, thumbnailSize);
- pixmap.fill();
- return pixmap;
-}
+// SPDX-License-Identifier: LGPL-2.1-or-later
+/****************************************************************************
+ * *
+ * Copyright (c) 2024 The FreeCAD Project Association AISBL *
+ * *
+ * This file is part of FreeCAD. *
+ * *
+ * FreeCAD is free software: you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation, either version 2.1 of the *
+ * License, or (at your option) any later version. *
+ * *
+ * 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 *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with FreeCAD. If not, see *
+ * . *
+ * *
+ ***************************************************************************/
+
+#include "PreCompiled.h"
+
+#ifndef _PreComp_
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#endif
+
+#include "FileCardDelegate.h"
+#include "../App/DisplayedFilesModel.h"
+#include "App/Application.h"
+#include <3rdParty/GSL/include/gsl/pointers>
+
+using namespace Start;
+
+FileCardDelegate::FileCardDelegate(QObject* parent)
+ : QAbstractItemDelegate(parent)
+{
+ _parameterGroup = App::GetApplication().GetParameterGroupByPath(
+ "User parameter:BaseApp/Preferences/Mod/Start");
+}
+
+
+void FileCardDelegate::paint(QPainter* painter,
+ const QStyleOptionViewItem& option,
+ const QModelIndex& index) const
+{
+ auto thumbnailSize =
+ static_cast(_parameterGroup->GetInt("FileThumbnailIconsSize", 64)); // NOLINT
+ auto cardWidth = thumbnailSize;
+ auto baseName = index.data(static_cast(DisplayedFilesModelRoles::baseName)).toString();
+ auto size = index.data(static_cast(DisplayedFilesModelRoles::size)).toString();
+ auto image = index.data(static_cast(DisplayedFilesModelRoles::image)).toByteArray();
+ auto path = index.data(static_cast(DisplayedFilesModelRoles::path)).toString();
+ painter->save();
+ auto widget = gsl::owner(new QWidget());
+ auto layout = gsl::owner(new QVBoxLayout());
+ widget->setLayout(layout);
+ auto thumbnail = gsl::owner(new QLabel());
+ auto pixmap = gsl::owner(new QPixmap());
+ if (!image.isEmpty()) {
+ pixmap->loadFromData(image);
+ auto scaled = pixmap->scaled(QSize(thumbnailSize, thumbnailSize),
+ Qt::AspectRatioMode::KeepAspectRatio,
+ Qt::TransformationMode::SmoothTransformation);
+ thumbnail->setPixmap(scaled);
+ }
+ else {
+ thumbnail->setPixmap(generateThumbnail(path));
+ }
+ thumbnail->setFixedSize(thumbnailSize, thumbnailSize);
+ thumbnail->setSizePolicy(QSizePolicy::Policy::Fixed, QSizePolicy::Policy::Fixed);
+ auto elided =
+ painter->fontMetrics().elidedText(baseName, Qt::TextElideMode::ElideRight, cardWidth);
+ auto name = gsl::owner(new QLabel(elided));
+ layout->addWidget(thumbnail);
+ layout->addWidget(name);
+ auto sizeLabel = gsl::owner(new QLabel(size));
+ layout->addWidget(sizeLabel);
+ layout->addStretch();
+ layout->setSpacing(0);
+ widget->resize(option.rect.size());
+ painter->translate(option.rect.topLeft());
+ widget->render(painter, QPoint(), QRegion(), QWidget::DrawChildren);
+ painter->restore();
+ delete pixmap;
+}
+
+
+QSize FileCardDelegate::sizeHint(const QStyleOptionViewItem& option, const QModelIndex& index) const
+{
+ Q_UNUSED(option)
+ Q_UNUSED(index)
+ auto thumbnailSize = _parameterGroup->GetInt("FileThumbnailIconsSize", 128); // NOLINT
+ auto cardSpacing = _parameterGroup->GetInt("FileCardSpacing", 20); // NOLINT
+ auto cardWidth = thumbnailSize + cardSpacing;
+
+ auto font = QGuiApplication::font();
+ auto qfm = QFontMetrics(font);
+ auto textHeight = 2 * qfm.lineSpacing();
+ auto cardHeight = thumbnailSize + textHeight + cardSpacing;
+
+ return {static_cast(cardWidth), static_cast(cardHeight)};
+}
+
+namespace
+{
+QPixmap pixmapToSizedQImage(const QImage& pixmap, int size)
+{
+ return QPixmap::fromImage(pixmap).scaled(size,
+ size,
+ Qt::AspectRatioMode::KeepAspectRatio,
+ Qt::TransformationMode::SmoothTransformation);
+}
+} // namespace
+
+QPixmap FileCardDelegate::generateThumbnail(const QString& path) const
+{
+ auto thumbnailSize =
+ static_cast(_parameterGroup->GetInt("FileThumbnailIconsSize", 64)); // NOLINT
+ if (path.endsWith(QLatin1String(".fcstd"), Qt::CaseSensitivity::CaseInsensitive)) {
+ QImageReader reader(QLatin1String(":/icons/freecad-doc.svg"));
+ ;
+ reader.setScaledSize({thumbnailSize, thumbnailSize});
+ return QPixmap::fromImage(reader.read());
+ }
+ if (path.endsWith(QLatin1String(".fcmacro"), Qt::CaseSensitivity::CaseInsensitive)) {
+ QImageReader reader(QLatin1String(":/icons/MacroEditor.svg"));
+ ;
+ reader.setScaledSize({thumbnailSize, thumbnailSize});
+ return QPixmap::fromImage(reader.read());
+ }
+ if (!QImageReader::imageFormat(path).isEmpty()) {
+ // It is an image: it can be its own thumbnail
+ QImageReader reader(path);
+ auto image = reader.read();
+ return pixmapToSizedQImage(image, thumbnailSize);
+ }
+ QIcon icon = QFileIconProvider().icon(QFileInfo(path));
+ if (!icon.isNull()) {
+ QPixmap pixmap = icon.pixmap(thumbnailSize);
+ if (!pixmap.isNull()) {
+ return pixmap;
+ }
+ }
+ QPixmap pixmap = QPixmap(thumbnailSize, thumbnailSize);
+ pixmap.fill();
+ return pixmap;
+}
diff --git a/src/Mod/CleanStart/Gui/FileCardDelegate.h b/src/Mod/Start/Gui/FileCardDelegate.h
similarity index 75%
rename from src/Mod/CleanStart/Gui/FileCardDelegate.h
rename to src/Mod/Start/Gui/FileCardDelegate.h
index 454563c130..6ba177d93f 100644
--- a/src/Mod/CleanStart/Gui/FileCardDelegate.h
+++ b/src/Mod/Start/Gui/FileCardDelegate.h
@@ -1,52 +1,52 @@
-// SPDX-License-Identifier: LGPL-2.1-or-later
-/****************************************************************************
- * *
- * Copyright (c) 2024 The FreeCAD Project Association AISBL *
- * *
- * This file is part of FreeCAD. *
- * *
- * FreeCAD is free software: you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation, either version 2.1 of the *
- * License, or (at your option) any later version. *
- * *
- * 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 *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with FreeCAD. If not, see *
- * . *
- * *
- ***************************************************************************/
-
-#ifndef FREECAD_CLEANSTART_FILECARDDELEGATE_H
-#define FREECAD_CLEANSTART_FILECARDDELEGATE_H
-
-#include
-#include
-
-#include
-
-class FileCardDelegate : public QAbstractItemDelegate {
-
-public:
-
- explicit FileCardDelegate(QObject *parent = nullptr);
-
- void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
-
- QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const override;
-
-protected:
-
- QPixmap generateThumbnail(const QString &path) const;
-
-private:
-
- Base::Reference _parameterGroup;
-};
-
-
-#endif //FREECAD_CLEANSTART_FILECARDDELEGATE_H
+// SPDX-License-Identifier: LGPL-2.1-or-later
+/****************************************************************************
+ * *
+ * Copyright (c) 2024 The FreeCAD Project Association AISBL *
+ * *
+ * This file is part of FreeCAD. *
+ * *
+ * FreeCAD is free software: you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation, either version 2.1 of the *
+ * License, or (at your option) any later version. *
+ * *
+ * 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 *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with FreeCAD. If not, see *
+ * . *
+ * *
+ ***************************************************************************/
+
+#ifndef FREECAD_START_FILECARDDELEGATE_H
+#define FREECAD_START_FILECARDDELEGATE_H
+
+#include
+#include
+
+#include
+
+class FileCardDelegate: public QAbstractItemDelegate
+{
+
+public:
+ explicit FileCardDelegate(QObject* parent = nullptr);
+
+ void paint(QPainter* painter,
+ const QStyleOptionViewItem& option,
+ const QModelIndex& index) const override;
+
+ QSize sizeHint(const QStyleOptionViewItem& option, const QModelIndex& index) const override;
+
+protected:
+ QPixmap generateThumbnail(const QString& path) const;
+
+private:
+ Base::Reference _parameterGroup;
+};
+
+
+#endif // FREECAD_START_FILECARDDELEGATE_H
diff --git a/src/Mod/CleanStart/Gui/FileCardView.cpp b/src/Mod/Start/Gui/FileCardView.cpp
similarity index 87%
rename from src/Mod/CleanStart/Gui/FileCardView.cpp
rename to src/Mod/Start/Gui/FileCardView.cpp
index 1ae1043468..3ea44a0a59 100644
--- a/src/Mod/CleanStart/Gui/FileCardView.cpp
+++ b/src/Mod/Start/Gui/FileCardView.cpp
@@ -1,84 +1,87 @@
-// SPDX-License-Identifier: LGPL-2.1-or-later
-/****************************************************************************
- * *
- * Copyright (c) 2024 The FreeCAD Project Association AISBL *
- * *
- * This file is part of FreeCAD. *
- * *
- * FreeCAD is free software: you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation, either version 2.1 of the *
- * License, or (at your option) any later version. *
- * *
- * 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 *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with FreeCAD. If not, see *
- * . *
- * *
- ***************************************************************************/
-
-#include "PreCompiled.h"
-#include "FileCardView.h"
-
-#include
-#include "../App/DisplayedFilesModel.h"
-
-namespace CleanStartGui
-{
-
-
-FileCardView::FileCardView(QWidget *parent) : QListView(parent)
-{
- QSizePolicy sizePolicy(QSizePolicy::Policy::MinimumExpanding,
- QSizePolicy::Policy::MinimumExpanding);
- sizePolicy.setHeightForWidth(true);
- setSizePolicy(sizePolicy);
- setHorizontalScrollBarPolicy(Qt::ScrollBarPolicy::ScrollBarAlwaysOff);
- setVerticalScrollBarPolicy(Qt::ScrollBarPolicy::ScrollBarAlwaysOff);
- setViewMode(QListView::ViewMode::IconMode);
- setFlow(QListView::Flow::LeftToRight);
- setResizeMode(QListView::ResizeMode::Adjust);
- setUniformItemSizes(true);
-}
-
-int FileCardView::heightForWidth(int width) const
-{
- auto model = this->model();
- auto delegate = this->itemDelegate();
- if (!model || !delegate) {
- return 0;
- }
- int numCards = model->rowCount();
- auto cardSize = delegate->sizeHint(QStyleOptionViewItem(), model->index(0, 0));
- int cardsPerRow = static_cast(width / cardSize.width());
- int numRows = static_cast (ceil(static_cast(numCards) / static_cast(cardsPerRow)));
- int neededHeight = numRows * cardSize.height();
- auto hGrp = App::GetApplication().GetParameterGroupByPath(
- "User parameter:BaseApp/Preferences/Mod/Start");
- int cardSpacing = static_cast(hGrp->GetInt("FileCardSpacing", 20)); // NOLINT
- return neededHeight + cardSpacing*(numRows-1) + 2*cardSpacing;
-}
-
-QSize FileCardView::sizeHint() const
-{
- auto hGrp = App::GetApplication().GetParameterGroupByPath(
- "User parameter:BaseApp/Preferences/Mod/Start");
- int cardSpacing = static_cast(hGrp->GetInt("FileCardSpacing", 20)); // NOLINT
-
- auto model = this->model();
- auto delegate = this->itemDelegate();
- if (!model || !delegate) {
- // The model and/or delegate have not been set yet, this was an early startup call
- return {cardSpacing, cardSpacing};
- }
- int numCards = model->rowCount();
- auto cardSize = delegate->sizeHint(QStyleOptionViewItem(), model->index(0, 0));
- return {(cardSize.width()+cardSpacing) * numCards + cardSpacing, cardSize.height() + 2* cardSpacing};
-}
-
-
-} // namespace CleanStart
+// SPDX-License-Identifier: LGPL-2.1-or-later
+/****************************************************************************
+ * *
+ * Copyright (c) 2024 The FreeCAD Project Association AISBL *
+ * *
+ * This file is part of FreeCAD. *
+ * *
+ * FreeCAD is free software: you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation, either version 2.1 of the *
+ * License, or (at your option) any later version. *
+ * *
+ * 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 *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with FreeCAD. If not, see *
+ * . *
+ * *
+ ***************************************************************************/
+
+#include "PreCompiled.h"
+#include "FileCardView.h"
+
+#include
+#include "../App/DisplayedFilesModel.h"
+
+namespace StartGui
+{
+
+
+FileCardView::FileCardView(QWidget* parent)
+ : QListView(parent)
+{
+ QSizePolicy sizePolicy(QSizePolicy::Policy::MinimumExpanding,
+ QSizePolicy::Policy::MinimumExpanding);
+ sizePolicy.setHeightForWidth(true);
+ setSizePolicy(sizePolicy);
+ setHorizontalScrollBarPolicy(Qt::ScrollBarPolicy::ScrollBarAlwaysOff);
+ setVerticalScrollBarPolicy(Qt::ScrollBarPolicy::ScrollBarAlwaysOff);
+ setViewMode(QListView::ViewMode::IconMode);
+ setFlow(QListView::Flow::LeftToRight);
+ setResizeMode(QListView::ResizeMode::Adjust);
+ setUniformItemSizes(true);
+}
+
+int FileCardView::heightForWidth(int width) const
+{
+ auto model = this->model();
+ auto delegate = this->itemDelegate();
+ if (!model || !delegate) {
+ return 0;
+ }
+ int numCards = model->rowCount();
+ auto cardSize = delegate->sizeHint(QStyleOptionViewItem(), model->index(0, 0));
+ int cardsPerRow = static_cast(width / cardSize.width());
+ int numRows =
+ static_cast(ceil(static_cast(numCards) / static_cast(cardsPerRow)));
+ int neededHeight = numRows * cardSize.height();
+ auto hGrp = App::GetApplication().GetParameterGroupByPath(
+ "User parameter:BaseApp/Preferences/Mod/Start");
+ int cardSpacing = static_cast(hGrp->GetInt("FileCardSpacing", 20)); // NOLINT
+ return neededHeight + cardSpacing * (numRows - 1) + 2 * cardSpacing;
+}
+
+QSize FileCardView::sizeHint() const
+{
+ auto hGrp = App::GetApplication().GetParameterGroupByPath(
+ "User parameter:BaseApp/Preferences/Mod/Start");
+ int cardSpacing = static_cast(hGrp->GetInt("FileCardSpacing", 20)); // NOLINT
+
+ auto model = this->model();
+ auto delegate = this->itemDelegate();
+ if (!model || !delegate) {
+ // The model and/or delegate have not been set yet, this was an early startup call
+ return {cardSpacing, cardSpacing};
+ }
+ int numCards = model->rowCount();
+ auto cardSize = delegate->sizeHint(QStyleOptionViewItem(), model->index(0, 0));
+ return {(cardSize.width() + cardSpacing) * numCards + cardSpacing,
+ cardSize.height() + 2 * cardSpacing};
+}
+
+
+} // namespace StartGui
diff --git a/src/Mod/CleanStart/Gui/FileCardView.h b/src/Mod/Start/Gui/FileCardView.h
similarity index 86%
rename from src/Mod/CleanStart/Gui/FileCardView.h
rename to src/Mod/Start/Gui/FileCardView.h
index 2e8994858a..9ccd720f6d 100644
--- a/src/Mod/CleanStart/Gui/FileCardView.h
+++ b/src/Mod/Start/Gui/FileCardView.h
@@ -1,47 +1,46 @@
-// SPDX-License-Identifier: LGPL-2.1-or-later
-/****************************************************************************
- * *
- * Copyright (c) 2024 The FreeCAD Project Association AISBL *
- * *
- * This file is part of FreeCAD. *
- * *
- * FreeCAD is free software: you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation, either version 2.1 of the *
- * License, or (at your option) any later version. *
- * *
- * 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 *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with FreeCAD. If not, see *
- * . *
- * *
- ***************************************************************************/
-
-#ifndef FREECAD_CLEANSTART_FILECARDVIEW_H
-#define FREECAD_CLEANSTART_FILECARDVIEW_H
-
-#include
-
-namespace CleanStartGui
-{
-
-class FileCardView : public QListView
-{
- Q_OBJECT
-
-public:
- explicit FileCardView(QWidget *parent = nullptr);
-
- int heightForWidth(int width) const override;
-
- QSize sizeHint() const override;
-
-};
-
-} // namespace CleanStart
-
-#endif // FREECAD_CLEANSTART_FILECARDVIEW_H
+// SPDX-License-Identifier: LGPL-2.1-or-later
+/****************************************************************************
+ * *
+ * Copyright (c) 2024 The FreeCAD Project Association AISBL *
+ * *
+ * This file is part of FreeCAD. *
+ * *
+ * FreeCAD is free software: you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation, either version 2.1 of the *
+ * License, or (at your option) any later version. *
+ * *
+ * 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 *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with FreeCAD. If not, see *
+ * . *
+ * *
+ ***************************************************************************/
+
+#ifndef FREECAD_START_FILECARDVIEW_H
+#define FREECAD_START_FILECARDVIEW_H
+
+#include
+
+namespace StartGui
+{
+
+class FileCardView: public QListView
+{
+ Q_OBJECT
+
+public:
+ explicit FileCardView(QWidget* parent = nullptr);
+
+ int heightForWidth(int width) const override;
+
+ QSize sizeHint() const override;
+};
+
+} // namespace StartGui
+
+#endif // FREECAD_START_FILECARDVIEW_H
diff --git a/src/Mod/Start/Gui/PreCompiled.cpp b/src/Mod/Start/Gui/PreCompiled.cpp
index cde4369c5b..b17d7731bd 100644
--- a/src/Mod/Start/Gui/PreCompiled.cpp
+++ b/src/Mod/Start/Gui/PreCompiled.cpp
@@ -1,23 +1,25 @@
-/***************************************************************************
- * Copyright (c) 2008 Jürgen Riegel *
- * *
- * 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"
+// SPDX-License-Identifier: LGPL-2.1-or-later
+/****************************************************************************
+ * *
+# Copyright (c) 2024 The FreeCAD Project Association AISBL *
+ * *
+ * This file is part of FreeCAD. *
+ * *
+ * FreeCAD is free software: you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation, either version 2.1 of the *
+ * License, or (at your option) any later version. *
+ * *
+ * 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 *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with FreeCAD. If not, see *
+ * . *
+ * *
+ ***************************************************************************/
+
+
+#include "PreCompiled.h"
diff --git a/src/Mod/Start/Gui/PreCompiled.h b/src/Mod/Start/Gui/PreCompiled.h
index 7480c06a48..28c77a66df 100644
--- a/src/Mod/Start/Gui/PreCompiled.h
+++ b/src/Mod/Start/Gui/PreCompiled.h
@@ -1,23 +1,24 @@
-/***************************************************************************
- * Copyright (c) 2008 Jürgen Riegel *
- * *
- * 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 *
- * *
+// SPDX-License-Identifier: LGPL-2.1-or-later
+/****************************************************************************
+ * *
+# Copyright (c) 2024 The FreeCAD Project Association AISBL *
+ * *
+ * This file is part of FreeCAD. *
+ * *
+ * FreeCAD is free software: you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation, either version 2.1 of the *
+ * License, or (at your option) any later version. *
+ * *
+ * 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 *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with FreeCAD. If not, see *
+ * . *
+ * *
***************************************************************************/
#ifndef STARTGUI_PRECOMPILED_H
@@ -25,11 +26,40 @@
#include
+#ifdef _MSC_VER
+#pragma warning(disable : 5208)
+#endif
+
#ifdef _PreComp_
-// Qt Toolkit
+// standard
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+// Qt
#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
-#endif //_PreComp_
-
+#endif // _PreComp_
#endif // STARTGUI_PRECOMPILED_H
diff --git a/src/Mod/Start/Gui/Resources/Start.qrc b/src/Mod/Start/Gui/Resources/Start.qrc
index f72b14dff9..cfd3c7cc7f 100644
--- a/src/Mod/Start/Gui/Resources/Start.qrc
+++ b/src/Mod/Start/Gui/Resources/Start.qrc
@@ -1,6 +1,5 @@
-
-
-