Skip to content

Commit

Permalink
Converted the Plot workbench into a module
Browse files Browse the repository at this point in the history
  • Loading branch information
sanguinariojoe committed Aug 17, 2021
1 parent d34a283 commit b7d0684
Show file tree
Hide file tree
Showing 108 changed files with 6 additions and 22,471 deletions.
107 changes: 2 additions & 105 deletions src/Mod/Plot/CMakeLists.txt
@@ -1,122 +1,19 @@
IF (BUILD_GUI)
PYSIDE_WRAP_RC(Plot_QRC_SRCS resources/Plot.qrc)
ENDIF (BUILD_GUI)

SET(PlotMain_SRCS
Plot.py
InitGui.py
PlotGui.py
)
SOURCE_GROUP("" FILES ${PlotMain_SRCS})

SET(PlotAxes_SRCS
plotAxes/__init__.py
plotAxes/TaskPanel.py
plotAxes/TaskPanel.ui
)
SOURCE_GROUP("plotaxes" FILES ${PlotAxes_SRCS})

SET(PlotLabels_SRCS
plotLabels/__init__.py
plotLabels/TaskPanel.py
plotLabels/TaskPanel.ui
)
SOURCE_GROUP("plotlabels" FILES ${PlotLabels_SRCS})

SET(PlotPositions_SRCS
plotPositions/__init__.py
plotPositions/TaskPanel.py
plotPositions/TaskPanel.ui
)
SOURCE_GROUP("plotpositions" FILES ${PlotPositions_SRCS})

SET(PlotSave_SRCS
plotSave/__init__.py
plotSave/TaskPanel.py
plotSave/TaskPanel.ui
)
SOURCE_GROUP("plotsave" FILES ${PlotSave_SRCS})

SET(PlotSeries_SRCS
plotSeries/__init__.py
plotSeries/TaskPanel.py
plotSeries/TaskPanel.ui
)
SOURCE_GROUP("plotseries" FILES ${PlotSeries_SRCS})

SET(PlotUtils_SRCS
plotUtils/__init__.py
plotUtils/Paths.py
)
SOURCE_GROUP("plotutils" FILES ${PlotUtils_SRCS})

SET(all_files ${PlotMain_SRCS} ${PlotAxes_SRCS} ${PlotLabels_SRCS} ${PlotPositions_SRCS} ${PlotSave_SRCS} ${PlotSeries_SRCS} ${PlotUtils_SRCS})

SET(PlotGuiIcon_SVG
resources/icons/PlotWorkbench.svg
)
SET(all_files ${PlotMain_SRCS})

ADD_CUSTOM_TARGET(Plot ALL
SOURCES ${all_files} ${Plot_QRC_SRCS} ${PlotGuiIcon_SVG}
SOURCES ${all_files}
)

fc_copy_sources(Plot "${CMAKE_BINARY_DIR}/Mod/Plot" ${all_files})

fc_copy_sources(Plot "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_DATADIR}/Mod/Plot" ${PlotGuiIcon_SVG})

IF (BUILD_GUI)
fc_target_copy_resource(Plot
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_BINARY_DIR}/Mod/Plot
Plot_rc.py)
ENDIF (BUILD_GUI)

INSTALL(
FILES
${PlotAxes_SRCS}
DESTINATION
Mod/Plot/plotAxes
)
INSTALL(
FILES
${PlotLabels_SRCS}
DESTINATION
Mod/Plot/plotLabels
)
INSTALL(
FILES
${PlotPositions_SRCS}
DESTINATION
Mod/Plot/plotPositions
)
INSTALL(
FILES
${PlotSave_SRCS}
DESTINATION
Mod/Plot/plotSave
)
INSTALL(
FILES
${PlotSeries_SRCS}
DESTINATION
Mod/Plot/plotSeries
)
INSTALL(
FILES
${PlotUtils_SRCS}
DESTINATION
Mod/Plot/plotUtils
)
INSTALL(
FILES
${PlotMain_SRCS}
${Plot_QRC_SRCS}
DESTINATION
Mod/Plot
)
INSTALL(
FILES
${PlotGuiIcon_SVG}
DESTINATION
"${CMAKE_INSTALL_DATADIR}/Mod/Plot/resources/icons"
)
61 changes: 0 additions & 61 deletions src/Mod/Plot/InitGui.py

This file was deleted.

6 changes: 1 addition & 5 deletions src/Mod/Plot/Plot.py
Expand Up @@ -36,11 +36,7 @@

from matplotlib.figure import Figure
except ImportError:
msg = PySide.QtGui.QApplication.translate(
"plot_console",
"matplotlib not found, so Plot module can not be loaded",
None)
FreeCAD.Console.PrintMessage(msg + '\n')
FreeCAD.Console.PrintWarning('matplotlib not found, so Plot module can not be loaded\n')
raise ImportError("matplotlib not installed")


Expand Down
186 changes: 0 additions & 186 deletions src/Mod/Plot/PlotGui.py

This file was deleted.

4 changes: 3 additions & 1 deletion src/Mod/Plot/README
Expand Up @@ -6,5 +6,7 @@ Jose Luis Cercós Pita <jlcercos@gmail.com>
* Introduction
--------------

Plot is a module that provide an interface to perform plots.
Plot is a module that provide an interface to perform plots. From FreeCAD 0.20
Plot workbench is split into an indepent addon
(https://github.com/FreeCAD/freecad.plot)

0 comments on commit b7d0684

Please sign in to comment.