def createTreeDock(self): self.treeDock = QtGui.QDockWidget('File tree', self) self.tree = HDFTreeWidget(parent=self.treeDock) self.sigOpen.connect(self.tree.openFiles) self.tree.doubleClicked.connect(self.tree.createDatasetWidget) self.tree.sigDatasetWidgetCreated.connect(self.addMdiChildWindow) self.tree.sigDatasetWidgetClosed.connect(self.closeMdiChildWindow) self.tree.sigAttributeWidgetCreated.connect(self.addMdiChildWindow) self.tree.sigAttributeWidgetClosed.connect(self.closeMdiChildWindow) self.tree.sigPlotWidgetCreated.connect(self.addMdiChildWindow) self.tree.sigPlotWidgetClosed.connect(self.closeMdiChildWindow) self.tree.sigPlotParamTreeCreated.connect(self.addPanelBelow) self.tree.sigDataWidgetActivated.connect(self.activateDataWindow) # pipe signals of dataviz to those of hdftree widget self.sigShowAttributes.connect(self.tree.showAttributes) self.sigShowDataset.connect(self.tree.showDataset) self.sigPlotDataset.connect(self.tree.plotDataset) self.sigCloseFiles.connect(self.tree.closeFiles) self.treeDock.setWidget(self.tree) self.addDockWidget(QtCore.Qt.LeftDockWidgetArea, self.treeDock)
def addPanelBelow(self, widget): dockWidget = QtGui.QDockWidget(widget.name) dockWidget.setWidget(widget) self.addDockWidget(QtCore.Qt.BottomDockWidgetArea, dockWidget) dockWidget.show()