From b1ee8b288b47a0360ff3aba879d53f29db793b20 Mon Sep 17 00:00:00 2001 From: Eric Firing Date: Fri, 29 Nov 2013 21:01:21 -1000 Subject: [PATCH] backend_qt4agg and qt4: remove redundant classes, unused method. Closes #1151. --- lib/matplotlib/backends/backend_qt4.py | 3 --- lib/matplotlib/backends/backend_qt4agg.py | 19 ++----------------- 2 files changed, 2 insertions(+), 20 deletions(-) diff --git a/lib/matplotlib/backends/backend_qt4.py b/lib/matplotlib/backends/backend_qt4.py index bdf78d0605ac..37092888bf57 100644 --- a/lib/matplotlib/backends/backend_qt4.py +++ b/lib/matplotlib/backends/backend_qt4.py @@ -683,9 +683,6 @@ def configure_subplots(self): dia.setWindowIcon(QtGui.QIcon(image)) dia.exec_() - def _get_canvas(self, fig): - return FigureCanvasQT(fig) - def save_figure(self, *args): filetypes = self.canvas.get_supported_filetypes_grouped() sorted_filetypes = list(six.iteritems(filetypes)) diff --git a/lib/matplotlib/backends/backend_qt4agg.py b/lib/matplotlib/backends/backend_qt4agg.py index 25fc2e7d7b9b..5a6c74d1985c 100644 --- a/lib/matplotlib/backends/backend_qt4agg.py +++ b/lib/matplotlib/backends/backend_qt4agg.py @@ -51,22 +51,6 @@ def new_figure_manager_given_figure(num, figure): return FigureManagerQT(canvas, num) -class NavigationToolbar2QTAgg(NavigationToolbar2QT): - def _get_canvas(self, fig): - return FigureCanvasQTAgg(fig) - - -class FigureManagerQTAgg(FigureManagerQT): - def _get_toolbar(self, canvas, parent): - # must be inited after the window, drawingArea and figure - # attrs are set - if matplotlib.rcParams['toolbar'] == 'toolbar2': - toolbar = NavigationToolbar2QTAgg(canvas, parent) - else: - toolbar = None - return toolbar - - class FigureCanvasQTAgg(FigureCanvasQT, FigureCanvasAgg): """ The canvas the figure renders into. Calls the draw and print fig @@ -183,5 +167,6 @@ def print_figure(self, *args, **kwargs): FigureCanvasAgg.print_figure(self, *args, **kwargs) self.draw() + FigureCanvas = FigureCanvasQTAgg -FigureManager = FigureManagerQTAgg +FigureManager = FigureManagerQT