diff --git a/pyqtgraph/canvas/TransformGuiTemplate_pyqt.py b/pyqtgraph/canvas/TransformGuiTemplate_pyqt.py
index c6cf82e4..7cbb3652 100644
--- a/pyqtgraph/canvas/TransformGuiTemplate_pyqt.py
+++ b/pyqtgraph/canvas/TransformGuiTemplate_pyqt.py
@@ -59,7 +59,7 @@ class Ui_Form(object):
QtCore.QMetaObject.connectSlotsByName(Form)
def retranslateUi(self, Form):
- Form.setWindowTitle(_translate("Form", "Form", None))
+ Form.setWindowTitle(_translate("Form", "PyQtGraph", None))
self.translateLabel.setText(_translate("Form", "Translate:", None))
self.rotateLabel.setText(_translate("Form", "Rotate:", None))
self.scaleLabel.setText(_translate("Form", "Scale:", None))
diff --git a/pyqtgraph/canvas/TransformGuiTemplate_pyqt5.py b/pyqtgraph/canvas/TransformGuiTemplate_pyqt5.py
index 6b1f239b..2af0499a 100644
--- a/pyqtgraph/canvas/TransformGuiTemplate_pyqt5.py
+++ b/pyqtgraph/canvas/TransformGuiTemplate_pyqt5.py
@@ -46,7 +46,7 @@ class Ui_Form(object):
def retranslateUi(self, Form):
_translate = QtCore.QCoreApplication.translate
- Form.setWindowTitle(_translate("Form", "Form"))
+ Form.setWindowTitle(_translate("Form", "PyQtGraph"))
self.translateLabel.setText(_translate("Form", "Translate:"))
self.rotateLabel.setText(_translate("Form", "Rotate:"))
self.scaleLabel.setText(_translate("Form", "Scale:"))
diff --git a/pyqtgraph/canvas/TransformGuiTemplate_pyside.py b/pyqtgraph/canvas/TransformGuiTemplate_pyside.py
index e430b61a..76620342 100644
--- a/pyqtgraph/canvas/TransformGuiTemplate_pyside.py
+++ b/pyqtgraph/canvas/TransformGuiTemplate_pyside.py
@@ -46,7 +46,7 @@ class Ui_Form(object):
QtCore.QMetaObject.connectSlotsByName(Form)
def retranslateUi(self, Form):
- Form.setWindowTitle(QtGui.QApplication.translate("Form", "Form", None, QtGui.QApplication.UnicodeUTF8))
+ Form.setWindowTitle(QtGui.QApplication.translate("Form", "PyQtGraph", None, QtGui.QApplication.UnicodeUTF8))
self.translateLabel.setText(QtGui.QApplication.translate("Form", "Translate:", None, QtGui.QApplication.UnicodeUTF8))
self.rotateLabel.setText(QtGui.QApplication.translate("Form", "Rotate:", None, QtGui.QApplication.UnicodeUTF8))
self.scaleLabel.setText(QtGui.QApplication.translate("Form", "Scale:", None, QtGui.QApplication.UnicodeUTF8))
diff --git a/pyqtgraph/flowchart/FlowchartCtrlTemplate.ui b/pyqtgraph/flowchart/FlowchartCtrlTemplate.ui
index 0361ad3e..6a9a203a 100644
--- a/pyqtgraph/flowchart/FlowchartCtrlTemplate.ui
+++ b/pyqtgraph/flowchart/FlowchartCtrlTemplate.ui
@@ -11,7 +11,7 @@
- Form
+ PyQtGraph
diff --git a/pyqtgraph/flowchart/FlowchartCtrlTemplate_pyqt.py b/pyqtgraph/flowchart/FlowchartCtrlTemplate_pyqt.py
index 8afd43f8..3d8bcf56 100644
--- a/pyqtgraph/flowchart/FlowchartCtrlTemplate_pyqt.py
+++ b/pyqtgraph/flowchart/FlowchartCtrlTemplate_pyqt.py
@@ -69,7 +69,7 @@ class Ui_Form(object):
QtCore.QMetaObject.connectSlotsByName(Form)
def retranslateUi(self, Form):
- Form.setWindowTitle(_translate("Form", "Form", None))
+ Form.setWindowTitle(_translate("Form", "PyQtGraph", None))
self.loadBtn.setText(_translate("Form", "Load..", None))
self.saveBtn.setText(_translate("Form", "Save", None))
self.saveAsBtn.setText(_translate("Form", "As..", None))
diff --git a/pyqtgraph/flowchart/FlowchartCtrlTemplate_pyqt5.py b/pyqtgraph/flowchart/FlowchartCtrlTemplate_pyqt5.py
index b661918d..958f2aaf 100644
--- a/pyqtgraph/flowchart/FlowchartCtrlTemplate_pyqt5.py
+++ b/pyqtgraph/flowchart/FlowchartCtrlTemplate_pyqt5.py
@@ -56,7 +56,7 @@ class Ui_Form(object):
def retranslateUi(self, Form):
_translate = QtCore.QCoreApplication.translate
- Form.setWindowTitle(_translate("Form", "Form"))
+ Form.setWindowTitle(_translate("Form", "PyQtGraph"))
self.loadBtn.setText(_translate("Form", "Load.."))
self.saveBtn.setText(_translate("Form", "Save"))
self.saveAsBtn.setText(_translate("Form", "As.."))
diff --git a/pyqtgraph/flowchart/FlowchartCtrlTemplate_pyside.py b/pyqtgraph/flowchart/FlowchartCtrlTemplate_pyside.py
index b722000e..2db10f6a 100644
--- a/pyqtgraph/flowchart/FlowchartCtrlTemplate_pyside.py
+++ b/pyqtgraph/flowchart/FlowchartCtrlTemplate_pyside.py
@@ -55,7 +55,7 @@ class Ui_Form(object):
QtCore.QMetaObject.connectSlotsByName(Form)
def retranslateUi(self, Form):
- Form.setWindowTitle(QtGui.QApplication.translate("Form", "Form", None, QtGui.QApplication.UnicodeUTF8))
+ Form.setWindowTitle(QtGui.QApplication.translate("Form", "PyQtGraph", None, QtGui.QApplication.UnicodeUTF8))
self.loadBtn.setText(QtGui.QApplication.translate("Form", "Load..", None, QtGui.QApplication.UnicodeUTF8))
self.saveBtn.setText(QtGui.QApplication.translate("Form", "Save", None, QtGui.QApplication.UnicodeUTF8))
self.saveAsBtn.setText(QtGui.QApplication.translate("Form", "As..", None, QtGui.QApplication.UnicodeUTF8))
diff --git a/pyqtgraph/flowchart/FlowchartTemplate.ui b/pyqtgraph/flowchart/FlowchartTemplate.ui
index 8b0c19da..22934b91 100644
--- a/pyqtgraph/flowchart/FlowchartTemplate.ui
+++ b/pyqtgraph/flowchart/FlowchartTemplate.ui
@@ -11,7 +11,7 @@
- Form
+ PyQtGraph
diff --git a/pyqtgraph/flowchart/FlowchartTemplate_pyqt.py b/pyqtgraph/flowchart/FlowchartTemplate_pyqt.py
index 06b10bfe..e6084eee 100644
--- a/pyqtgraph/flowchart/FlowchartTemplate_pyqt.py
+++ b/pyqtgraph/flowchart/FlowchartTemplate_pyqt.py
@@ -62,7 +62,7 @@ class Ui_Form(object):
QtCore.QMetaObject.connectSlotsByName(Form)
def retranslateUi(self, Form):
- Form.setWindowTitle(_translate("Form", "Form", None))
+ Form.setWindowTitle(_translate("Form", "PyQtGraph", None))
from ..flowchart.FlowchartGraphicsView import FlowchartGraphicsView
from ..widgets.DataTreeWidget import DataTreeWidget
diff --git a/pyqtgraph/flowchart/FlowchartTemplate_pyqt5.py b/pyqtgraph/flowchart/FlowchartTemplate_pyqt5.py
index ba754305..448a00ff 100644
--- a/pyqtgraph/flowchart/FlowchartTemplate_pyqt5.py
+++ b/pyqtgraph/flowchart/FlowchartTemplate_pyqt5.py
@@ -49,7 +49,7 @@ class Ui_Form(object):
def retranslateUi(self, Form):
_translate = QtCore.QCoreApplication.translate
- Form.setWindowTitle(_translate("Form", "Form"))
+ Form.setWindowTitle(_translate("Form", "PyQtGraph"))
from ..widgets.DataTreeWidget import DataTreeWidget
from ..flowchart.FlowchartGraphicsView import FlowchartGraphicsView
diff --git a/pyqtgraph/flowchart/FlowchartTemplate_pyside.py b/pyqtgraph/flowchart/FlowchartTemplate_pyside.py
index 2c693c60..47f97f85 100644
--- a/pyqtgraph/flowchart/FlowchartTemplate_pyside.py
+++ b/pyqtgraph/flowchart/FlowchartTemplate_pyside.py
@@ -48,7 +48,7 @@ class Ui_Form(object):
QtCore.QMetaObject.connectSlotsByName(Form)
def retranslateUi(self, Form):
- Form.setWindowTitle(QtGui.QApplication.translate("Form", "Form", None, QtGui.QApplication.UnicodeUTF8))
+ Form.setWindowTitle(QtGui.QApplication.translate("Form", "PyQtGraph", None, QtGui.QApplication.UnicodeUTF8))
from ..flowchart.FlowchartGraphicsView import FlowchartGraphicsView
from ..widgets.DataTreeWidget import DataTreeWidget
diff --git a/pyqtgraph/graphicsItems/PlotItem/plotConfigTemplate.ui b/pyqtgraph/graphicsItems/PlotItem/plotConfigTemplate.ui
index dffc62d0..12d8033e 100644
--- a/pyqtgraph/graphicsItems/PlotItem/plotConfigTemplate.ui
+++ b/pyqtgraph/graphicsItems/PlotItem/plotConfigTemplate.ui
@@ -11,7 +11,7 @@
- Form
+ PyQtGraph
diff --git a/pyqtgraph/graphicsItems/PlotItem/plotConfigTemplate_pyqt.py b/pyqtgraph/graphicsItems/PlotItem/plotConfigTemplate_pyqt.py
index e09c9978..5ecc0438 100644
--- a/pyqtgraph/graphicsItems/PlotItem/plotConfigTemplate_pyqt.py
+++ b/pyqtgraph/graphicsItems/PlotItem/plotConfigTemplate_pyqt.py
@@ -148,7 +148,7 @@ class Ui_Form(object):
QtCore.QMetaObject.connectSlotsByName(Form)
def retranslateUi(self, Form):
- Form.setWindowTitle(_translate("Form", "Form", None))
+ Form.setWindowTitle(_translate("Form", "PyQtGraph", None))
self.averageGroup.setToolTip(_translate("Form", "Display averages of the curves displayed in this plot. The parameter list allows you to choose parameters to average over (if any are available).", None))
self.averageGroup.setTitle(_translate("Form", "Average", None))
self.clipToViewCheck.setToolTip(_translate("Form", "Plot only the portion of each curve that is visible. This assumes X values are uniformly spaced.", None))
diff --git a/pyqtgraph/graphicsItems/PlotItem/plotConfigTemplate_pyqt5.py b/pyqtgraph/graphicsItems/PlotItem/plotConfigTemplate_pyqt5.py
index e9fdff24..817221f2 100644
--- a/pyqtgraph/graphicsItems/PlotItem/plotConfigTemplate_pyqt5.py
+++ b/pyqtgraph/graphicsItems/PlotItem/plotConfigTemplate_pyqt5.py
@@ -135,7 +135,7 @@ class Ui_Form(object):
def retranslateUi(self, Form):
_translate = QtCore.QCoreApplication.translate
- Form.setWindowTitle(_translate("Form", "Form"))
+ Form.setWindowTitle(_translate("Form", "PyQtGraph"))
self.averageGroup.setToolTip(_translate("Form", "Display averages of the curves displayed in this plot. The parameter list allows you to choose parameters to average over (if any are available)."))
self.averageGroup.setTitle(_translate("Form", "Average"))
self.clipToViewCheck.setToolTip(_translate("Form", "Plot only the portion of each curve that is visible. This assumes X values are uniformly spaced."))
diff --git a/pyqtgraph/graphicsItems/PlotItem/plotConfigTemplate_pyside.py b/pyqtgraph/graphicsItems/PlotItem/plotConfigTemplate_pyside.py
index aff31211..d0fd1edd 100644
--- a/pyqtgraph/graphicsItems/PlotItem/plotConfigTemplate_pyside.py
+++ b/pyqtgraph/graphicsItems/PlotItem/plotConfigTemplate_pyside.py
@@ -134,7 +134,7 @@ class Ui_Form(object):
QtCore.QMetaObject.connectSlotsByName(Form)
def retranslateUi(self, Form):
- Form.setWindowTitle(QtGui.QApplication.translate("Form", "Form", None, QtGui.QApplication.UnicodeUTF8))
+ Form.setWindowTitle(QtGui.QApplication.translate("Form", "PyQtGraph", None, QtGui.QApplication.UnicodeUTF8))
self.averageGroup.setToolTip(QtGui.QApplication.translate("Form", "Display averages of the curves displayed in this plot. The parameter list allows you to choose parameters to average over (if any are available).", None, QtGui.QApplication.UnicodeUTF8))
self.averageGroup.setTitle(QtGui.QApplication.translate("Form", "Average", None, QtGui.QApplication.UnicodeUTF8))
self.clipToViewCheck.setToolTip(QtGui.QApplication.translate("Form", "Plot only the portion of each curve that is visible. This assumes X values are uniformly spaced.", None, QtGui.QApplication.UnicodeUTF8))
diff --git a/pyqtgraph/graphicsItems/ViewBox/axisCtrlTemplate.ui b/pyqtgraph/graphicsItems/ViewBox/axisCtrlTemplate.ui
index 297fce75..01bdf93e 100644
--- a/pyqtgraph/graphicsItems/ViewBox/axisCtrlTemplate.ui
+++ b/pyqtgraph/graphicsItems/ViewBox/axisCtrlTemplate.ui
@@ -17,7 +17,7 @@
- Form
+ PyQtGraph
diff --git a/pyqtgraph/graphicsItems/ViewBox/axisCtrlTemplate_pyqt.py b/pyqtgraph/graphicsItems/ViewBox/axisCtrlTemplate_pyqt.py
index 5d952741..b54153fc 100644
--- a/pyqtgraph/graphicsItems/ViewBox/axisCtrlTemplate_pyqt.py
+++ b/pyqtgraph/graphicsItems/ViewBox/axisCtrlTemplate_pyqt.py
@@ -78,7 +78,7 @@ class Ui_Form(object):
QtCore.QMetaObject.connectSlotsByName(Form)
def retranslateUi(self, Form):
- Form.setWindowTitle(_translate("Form", "Form", None))
+ Form.setWindowTitle(_translate("Form", "PyQtGraph", None))
self.label.setText(_translate("Form", "Link Axis:", None))
self.linkCombo.setToolTip(_translate("Form", "Links this axis with another view. When linked, both views will display the same data range.
", None))
self.autoPercentSpin.setToolTip(_translate("Form", "Percent of data to be visible when auto-scaling. It may be useful to decrease this value for data with spiky noise.
", None))
diff --git a/pyqtgraph/graphicsItems/ViewBox/axisCtrlTemplate_pyqt5.py b/pyqtgraph/graphicsItems/ViewBox/axisCtrlTemplate_pyqt5.py
index 78da6eea..0a28e7f6 100644
--- a/pyqtgraph/graphicsItems/ViewBox/axisCtrlTemplate_pyqt5.py
+++ b/pyqtgraph/graphicsItems/ViewBox/axisCtrlTemplate_pyqt5.py
@@ -65,7 +65,7 @@ class Ui_Form(object):
def retranslateUi(self, Form):
_translate = QtCore.QCoreApplication.translate
- Form.setWindowTitle(_translate("Form", "Form"))
+ Form.setWindowTitle(_translate("Form", "PyQtGraph"))
self.label.setText(_translate("Form", "Link Axis:"))
self.linkCombo.setToolTip(_translate("Form", "Links this axis with another view. When linked, both views will display the same data range.
"))
self.autoPercentSpin.setToolTip(_translate("Form", "Percent of data to be visible when auto-scaling. It may be useful to decrease this value for data with spiky noise.
"))
diff --git a/pyqtgraph/graphicsItems/ViewBox/axisCtrlTemplate_pyside.py b/pyqtgraph/graphicsItems/ViewBox/axisCtrlTemplate_pyside.py
index 9ddeb5d1..c90206b5 100644
--- a/pyqtgraph/graphicsItems/ViewBox/axisCtrlTemplate_pyside.py
+++ b/pyqtgraph/graphicsItems/ViewBox/axisCtrlTemplate_pyside.py
@@ -64,7 +64,7 @@ class Ui_Form(object):
QtCore.QMetaObject.connectSlotsByName(Form)
def retranslateUi(self, Form):
- Form.setWindowTitle(QtGui.QApplication.translate("Form", "Form", None, QtGui.QApplication.UnicodeUTF8))
+ Form.setWindowTitle(QtGui.QApplication.translate("Form", "PyQtGraph", None, QtGui.QApplication.UnicodeUTF8))
self.label.setText(QtGui.QApplication.translate("Form", "Link Axis:", None, QtGui.QApplication.UnicodeUTF8))
self.linkCombo.setToolTip(QtGui.QApplication.translate("Form", "Links this axis with another view. When linked, both views will display the same data range.
", None, QtGui.QApplication.UnicodeUTF8))
self.autoPercentSpin.setToolTip(QtGui.QApplication.translate("Form", "Percent of data to be visible when auto-scaling. It may be useful to decrease this value for data with spiky noise.
", None, QtGui.QApplication.UnicodeUTF8))
diff --git a/pyqtgraph/graphicsWindows.py b/pyqtgraph/graphicsWindows.py
index 4033baf3..aa62f4f1 100644
--- a/pyqtgraph/graphicsWindows.py
+++ b/pyqtgraph/graphicsWindows.py
@@ -48,38 +48,39 @@ class TabWindow(QtGui.QMainWindow):
class PlotWindow(PlotWidget):
+ sigClosed = QtCore.Signal(object)
+
"""
(deprecated; use :class:`~pyqtgraph.PlotWidget` instead)
"""
def __init__(self, title=None, **kargs):
mkQApp()
- self.win = QtGui.QMainWindow()
PlotWidget.__init__(self, **kargs)
- self.win.setCentralWidget(self)
- for m in ['resize']:
- setattr(self, m, getattr(self.win, m))
if title is not None:
- self.win.setWindowTitle(title)
- self.win.show()
+ self.setWindowTitle(title)
+ self.show()
+
+ def closeEvent(self, event):
+ PlotWidget.closeEvent(self, event)
+ self.sigClosed.emit(self)
class ImageWindow(ImageView):
+ sigClosed = QtCore.Signal(object)
+
"""
(deprecated; use :class:`~pyqtgraph.ImageView` instead)
"""
def __init__(self, *args, **kargs):
mkQApp()
- self.win = QtGui.QMainWindow()
- self.win.resize(800,600)
+ ImageView.__init__(self)
if 'title' in kargs:
- self.win.setWindowTitle(kargs['title'])
+ self.setWindowTitle(kargs['title'])
del kargs['title']
- ImageView.__init__(self, self.win)
if len(args) > 0 or len(kargs) > 0:
self.setImage(*args, **kargs)
- self.win.setCentralWidget(self)
- for m in ['resize']:
- setattr(self, m, getattr(self.win, m))
- #for m in ['setImage', 'autoRange', 'addItem', 'removeItem', 'blackLevel', 'whiteLevel', 'imageItem']:
- #setattr(self, m, getattr(self.cw, m))
- self.win.show()
+ self.show()
+
+ def closeEvent(self, event):
+ ImageView.closeEvent(self, event)
+ self.sigClosed.emit(self)
diff --git a/pyqtgraph/imageview/ImageView.py b/pyqtgraph/imageview/ImageView.py
index daa9b06d..e9058bdb 100644
--- a/pyqtgraph/imageview/ImageView.py
+++ b/pyqtgraph/imageview/ImageView.py
@@ -411,11 +411,9 @@ class ImageView(QtGui.QWidget):
def close(self):
"""Closes the widget nicely, making sure to clear the graphics scene and release memory."""
- self.ui.roiPlot.close()
- self.ui.graphicsView.close()
- self.scene.clear()
- del self.image
- del self.imageDisp
+ self.clear()
+ self.imageDisp = None
+ self.imageItem.setParent(None)
super(ImageView, self).close()
self.setParent(None)
diff --git a/pyqtgraph/imageview/ImageViewTemplate.ui b/pyqtgraph/imageview/ImageViewTemplate.ui
index 927bda30..ece77864 100644
--- a/pyqtgraph/imageview/ImageViewTemplate.ui
+++ b/pyqtgraph/imageview/ImageViewTemplate.ui
@@ -11,7 +11,7 @@