FEM: prepare separation of task panels

This commit is contained in:
Bernd Hahnebach
2020-06-03 23:48:34 +02:00
parent 0fdcebe2d6
commit 5bd3f191b9
4 changed files with 15 additions and 0 deletions

View File

@@ -347,6 +347,10 @@ SET(FemGuiObjects_SRCS
femguiobjects/readme.md
)
SET(FemGuiTaskPanels_SRCS
femtaskpanels/__init__.py
)
SET(FemGuiTests_SRCS
femtest/gui/__init__.py
femtest/gui/test_open.py
@@ -386,6 +390,7 @@ SET(FemGuiViewProvider_SRCS
SET(FemAllGuiScripts
${FemGuiBaseModules_SRCS}
${FemGuiObjects_SRCS}
${FemGuiTaskPanels_SRCS}
${FemGuiTests_SRCS}
${FemGuiUtils_SRCS}
${FemGuiViewProvider_SRCS}
@@ -401,6 +406,7 @@ if(BUILD_GUI)
# install directories for Python packages (for make install)
INSTALL(FILES ${FemGuiBaseModules_SRCS} DESTINATION Mod/Fem/)
INSTALL(FILES ${FemGuiObjects_SRCS} DESTINATION Mod/Fem/femguiobjects/)
INSTALL(FILES ${FemGuiTaskPanels_SRCS} DESTINATION Mod/Fem/femtaskpanels/)
INSTALL(FILES ${FemGuiTests_SRCS} DESTINATION Mod/Fem/femtest/gui/)
INSTALL(FILES ${FemGuiUtils_SRCS} DESTINATION Mod/Fem/femguiutils/)
INSTALL(FILES ${FemGuiViewProvider_SRCS} DESTINATION Mod/Fem/femviewprovider/)

View File

@@ -102,6 +102,14 @@ Python style is preferred over Doxygen style
- see `ccx` tools module in fem tools package
- see [forum topic](https://forum.freecadweb.org/viewtopic.php?f=10&t=37094)
### Module structure
- task panels should go into a separate package too
- according pep8 imports should be on module beginning
- if task panel class in inside viewprovider module, the imports needed for task panel are module beginning too
- might be some special plot module or what ever is needed
- if this is not available the object can not even created
- if task panel is separate the object can be createdh
## C++
### Naming policy
- CamelCase names

View File

View File

@@ -117,6 +117,7 @@ class TestFemCommon(unittest.TestCase):
if FreeCAD.GuiUp:
pymodules += testtools.collect_python_modules("femcommands")
pymodules += testtools.collect_python_modules("femguiobjects")
pymodules += testtools.collect_python_modules("femtaskpanels")
# import all collected modules
# fcc_print(pymodules)