diff --git a/src/Mod/Fem/Gui/CMakeLists.txt b/src/Mod/Fem/Gui/CMakeLists.txt index 3c2f0c047..7a951863a 100755 --- a/src/Mod/Fem/Gui/CMakeLists.txt +++ b/src/Mod/Fem/Gui/CMakeLists.txt @@ -211,6 +211,14 @@ fc_target_copy_resource(FemGui MechanicalAnalysis.ui ) +SET(FemGuiIcon_SVG + Resources/icons/preferences-fem.svg +) + +fc_copy_sources(FemGui "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_DATADIR}/Mod/Fem" ${FemGuiIcon_SVG}) + +INSTALL(FILES ${FemGuiIcon_SVG} DESTINATION "${CMAKE_INSTALL_DATADIR}/Mod/Fem/Resources/icons") + SET_BIN_DIR(FemGui FemGui /Mod/Fem) SET_PYTHON_PREFIX_SUFFIX(FemGui) diff --git a/src/Mod/Fem/InitGui.py b/src/Mod/Fem/InitGui.py index e19059be8..4074ec67d 100755 --- a/src/Mod/Fem/InitGui.py +++ b/src/Mod/Fem/InitGui.py @@ -1,4 +1,4 @@ -# Fem gui init module +# Fem gui init module # (c) 2009 Juergen Riegel # # Gathering all the information to start FreeCAD @@ -30,41 +30,19 @@ #***************************************************************************/ +class FemWorkbench (Workbench): + "Fem workbench object" + def __init__(self): + self.__class__.Icon = FreeCAD.getResourceDir() + "Mod/Fem/Resources/icons/preferences-fem.svg" + self.__class__.MenuText = "FEM" + self.__class__.ToolTip = "FEM workbench" -class FemWorkbench ( Workbench ): - "Fem workbench object" - Icon = """ - /* XPM */ - static const char *Fem_Box[]={ - "16 16 3 1", - ". c None", - "# c #000000", - "a c #c6c642", - "................", - ".......#######..", - "......#aaaaa##..", - ".....#aaaaa###..", - "....#aaaaa##a#..", - "...#aaaaa##aa#..", - "..#aaaaa##aaa#..", - ".########aaaa#..", - ".#aaaaa#aaaaa#..", - ".#aaaaa#aaaa##..", - ".#aaaaa#aaa##...", - ".#aaaaa#aa##....", - ".#aaaaa#a##... .", - ".#aaaaa###......", - ".########.......", - "................"}; - """ - MenuText = "Fem" - ToolTip = "Fem workbench" + def Initialize(self): + # load the module + import Fem + import FemGui - def Initialize(self): - # load the module - import Fem - import FemGui - def GetClassName(self): - return "FemGui::Workbench" + def GetClassName(self): + return "FemGui::Workbench" Gui.addWorkbench(FemWorkbench())