def reopen(self, plt): widget = QtGui.QWidget() self.subwin_abq = Ui_pyQTGraph() self.subwin_abq.setupUi(widget, plt) widget.setParent(self) self.setWidget(widget) self._isClosed = False self.show()
def __init__(self, parent, plt): super(QMdiPlotSubWindow, self).__init__(parent) self.setWindowTitle('Untitled') self.setWindowIcon(QtGui.QIcon('LayoutCreator.ico')) self.setAttribute(QtCore.Qt.WA_DeleteOnClose) self.resize(500, 300) widget = QtGui.QWidget() self.subwin_abq = Ui_pyQTGraph() self.subwin_abq.setupUi(widget, plt) widget.setParent(self) self.setWidget(widget) parent.addSubWindow(self) self._isClosed = False self.show()
def __init__(self, parent, plt): super(QMdiPlotSubWindow,self).__init__(parent) self.setWindowTitle( 'Untitled' ) self.setWindowIcon(QtGui.QIcon('LayoutCreator.ico')) self.setAttribute(QtCore.Qt.WA_DeleteOnClose) self.resize(500, 300) widget = QtGui.QWidget() self.subwin_abq = Ui_pyQTGraph() self.subwin_abq.setupUi(widget, plt) widget.setParent(self) self.setWidget(widget) parent.addSubWindow(self) self._isClosed = False self.show()
class QMdiPlotSubWindow(QtGui.QMdiSubWindow): def __init__(self, parent, plt): super(QMdiPlotSubWindow,self).__init__(parent) self.setWindowTitle( 'Untitled' ) self.setWindowIcon(QtGui.QIcon('LayoutCreator.ico')) self.setAttribute(QtCore.Qt.WA_DeleteOnClose) self.resize(500, 300) widget = QtGui.QWidget() self.subwin_abq = Ui_pyQTGraph() self.subwin_abq.setupUi(widget, plt) widget.setParent(self) self.setWidget(widget) parent.addSubWindow(self) self._isClosed = False self.show() def update(self, plt): self.subwin_abq.update(plt) def setName(self, name): self._name = name self.setWindowTitle( name ) def name(self): if hasattr(self, '_name'): return self._name else: return None def closeEvent(self, event): super(QMdiPlotSubWindow,self).closeEvent(event) self._isClosed = True def isClosed(self): return self._isClosed def reopen(self, plt): widget = QtGui.QWidget() self.subwin_abq = Ui_pyQTGraph() self.subwin_abq.setupUi(widget, plt) widget.setParent(self) self.setWidget(widget) self._isClosed = False self.show()
class QMdiPlotSubWindow(QtGui.QMdiSubWindow): def __init__(self, parent, plt): super(QMdiPlotSubWindow, self).__init__(parent) self.setWindowTitle('Untitled') self.setWindowIcon(QtGui.QIcon('LayoutCreator.ico')) self.setAttribute(QtCore.Qt.WA_DeleteOnClose) self.resize(500, 300) widget = QtGui.QWidget() self.subwin_abq = Ui_pyQTGraph() self.subwin_abq.setupUi(widget, plt) widget.setParent(self) self.setWidget(widget) parent.addSubWindow(self) self._isClosed = False self.show() def update(self, plt): self.subwin_abq.update(plt) def setName(self, name): self._name = name self.setWindowTitle(name) def name(self): if hasattr(self, '_name'): return self._name else: return None def closeEvent(self, event): super(QMdiPlotSubWindow, self).closeEvent(event) self._isClosed = True def isClosed(self): return self._isClosed def reopen(self, plt): widget = QtGui.QWidget() self.subwin_abq = Ui_pyQTGraph() self.subwin_abq.setupUi(widget, plt) widget.setParent(self) self.setWidget(widget) self._isClosed = False self.show()