Skip to content

Commit

Permalink
Set PySide to all ambiguous QtGui and QtCore calls
Browse files Browse the repository at this point in the history
  • Loading branch information
sanguinariojoe authored and yorikvanhavre committed Oct 4, 2014
1 parent 537e759 commit 4de77a9
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/Mod/Plot/Plot.py
Expand Up @@ -35,18 +35,18 @@
from matplotlib.backends.backend_qt4agg import NavigationToolbar2QTAgg as NavigationToolbar
from matplotlib.figure import Figure
except ImportError:
msg = QtGui.QApplication.translate(
msg = PySide.QtGui.QApplication.translate(
"plot_console",
"matplotlib not found, so Plot module can not be loaded",
None,
QtGui.QApplication.UnicodeUTF8)
PySide.QtGui.QApplication.UnicodeUTF8)
FreeCAD.Console.PrintMessage(msg + '\n')
raise ImportError("matplotlib not installed")


def getMainWindow():
""" Return the FreeCAD main window. """
toplevel = QtGui.qApp.topLevelWidgets()
toplevel = PySide.QtGui.qApp.topLevelWidgets()
for i in toplevel:
if i.metaObject().className() == "Gui::MainWindow":
return i
Expand Down Expand Up @@ -364,19 +364,19 @@ def getp(self, prop):
return plt.getp(self.line, prop)


class Plot(QtGui.QWidget):
class Plot(PySide.QtGui.QWidget):
def __init__(self,
winTitle="plot",
parent=None,
flags=QtCore.Qt.WindowFlags(0)):
flags=PySide.QtCore.Qt.WindowFlags(0)):
"""Construct a new plot widget.
Keyword arguments:
winTitle -- Tab title.
parent -- Widget parent.
flags -- QWidget flags
"""
QtGui.QWidget.__init__(self, parent, flags)
PySide.QtGui.QWidget.__init__(self, parent, flags)
self.setWindowTitle(winTitle)
# Create matplotlib canvas
self.fig = Figure()
Expand All @@ -390,7 +390,7 @@ def __init__(self,
self.axes.yaxis.set_ticks_position('left')
self.axes.spines['right'].set_color('none')
# Setup layout
vbox = QtGui.QVBoxLayout()
vbox = PySide.QtGui.QVBoxLayout()
vbox.addWidget(self.canvas)
self.setLayout(vbox)
# Active series
Expand Down

0 comments on commit 4de77a9

Please sign in to comment.