Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 2 additions & 19 deletions freecad/plot/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,48 +12,37 @@ 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(all_files ${PlotMain_SRCS} ${PlotAxes_SRCS} ${PlotLabels_SRCS} ${PlotPositions_SRCS} ${PlotSave_SRCS} ${PlotSeries_SRCS})

SET(PlotGuiIcon_SVG
resources/icons/PlotWorkbench.svg
resources/icons/Plot_Workbench.svg
)

ADD_CUSTOM_TARGET(Plot ALL
Expand Down Expand Up @@ -101,12 +90,6 @@ INSTALL(
DESTINATION
Mod/Plot/plotSeries
)
INSTALL(
FILES
${PlotUtils_SRCS}
DESTINATION
Mod/Plot/plotUtils
)
INSTALL(
FILES
${PlotMain_SRCS}
Expand Down
8 changes: 2 additions & 6 deletions freecad/plot/Plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,10 @@

try:
import matplotlib
# matplotlib.use('Qt5Agg')
# matplotlib.rcParams['backend.qt5']='PySide2'
matplotlib.use('Qt5Agg')
import matplotlib.pyplot as plt
from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas
if V(matplotlib.__version__) < V("1.4.0"):
from matplotlib.backends.backend_qt5agg import NavigationToolbar2QTAgg as NavigationToolbar
else:
from matplotlib.backends.backend_qt5agg import NavigationToolbar2QT as NavigationToolbar
from matplotlib.backends.backend_qt5agg import NavigationToolbar2QT as NavigationToolbar

from matplotlib.figure import Figure
except ImportError:
Expand Down
21 changes: 7 additions & 14 deletions freecad/plot/PlotGui.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#* *
#***************************************************************************


import PySide
from PySide import QtCore, QtGui
import FreeCAD
Expand All @@ -47,15 +46,13 @@ def Activated(self):
plotSave.load()

def GetResources(self):
# from plotUtils import Paths
# IconPath = Paths.iconsPath() + "/Save.svg"
MenuText = QtCore.QT_TRANSLATE_NOOP(
"Plot_SaveFig",
"Save plot")
ToolTip = QtCore.QT_TRANSLATE_NOOP(
"Plot_SaveFig",
"Save the plot as an image file")
return {'Pixmap': 'Save',
return {'Pixmap': 'Plot_Save',
'MenuText': MenuText,
'ToolTip': ToolTip}

Expand All @@ -72,7 +69,7 @@ def GetResources(self):
ToolTip = QtCore.QT_TRANSLATE_NOOP(
"Plot_Axes",
"Configure the axes parameters")
return {'Pixmap': 'Axes',
return {'Pixmap': 'Plot_Axes',
'MenuText': MenuText,
'ToolTip': ToolTip}

Expand All @@ -83,15 +80,13 @@ def Activated(self):
plotSeries.load()

def GetResources(self):
# from plotUtils import Paths
# IconPath = Paths.iconsPath() + "/Series.svg"
MenuText = QtCore.QT_TRANSLATE_NOOP(
"Plot_Series",
"Configure series")
ToolTip = QtCore.QT_TRANSLATE_NOOP(
"Plot_Series",
"Configure series drawing style and label")
return {'Pixmap': 'Series',
return {'Pixmap': 'Plot_Series',
'MenuText': MenuText,
'ToolTip': ToolTip}

Expand All @@ -111,15 +106,13 @@ def Activated(self):
Plot.grid(not flag)

def GetResources(self):
# from plotUtils import Paths
# IconPath = Paths.iconsPath() + "/Grid.svg"
MenuText = QtCore.QT_TRANSLATE_NOOP(
"Plot_Grid",
"Show/Hide grid")
ToolTip = QtCore.QT_TRANSLATE_NOOP(
"Plot_Grid",
"Show/Hide grid on selected plot")
return {'Pixmap': 'Grid',
return {'Pixmap': 'Plot_Grid',
'MenuText': MenuText,
'ToolTip': ToolTip}

Expand All @@ -145,7 +138,7 @@ def GetResources(self):
ToolTip = QtCore.QT_TRANSLATE_NOOP(
"Plot_Legend",
"Show/Hide legend on selected plot")
return {'Pixmap': 'Legend',
return {'Pixmap': 'Plot_Legend',
'MenuText': MenuText,
'ToolTip': ToolTip}

Expand All @@ -162,7 +155,7 @@ def GetResources(self):
ToolTip = QtCore.QT_TRANSLATE_NOOP(
"Plot_Labels",
"Set title and axes labels")
return {'Pixmap': 'Labels',
return {'Pixmap': 'Plot_Labels',
'MenuText': MenuText,
'ToolTip': ToolTip}

Expand All @@ -179,7 +172,7 @@ def GetResources(self):
ToolTip = QtCore.QT_TRANSLATE_NOOP(
"Plot_Positions",
"Set labels and legend positions and sizes")
return {'Pixmap': 'Positions',
return {'Pixmap': 'Plot_Positions',
'MenuText': MenuText,
'ToolTip': ToolTip}

Expand Down
Loading