def openDetailsViewer(self, details, read_only=False): ''' Called when a different block is selected. ''' # Ensure there is no other viewer self.closeDetailsViewer() # Check there is something to view if details is None: return # Create a new viewer. widget = DetailsViewer(self.ui.areaDetails, details, self.session, read_only) self.ui.areaDetails.setWidget(widget) widget.show() self.ui.areaDetails.show() self.details_viewer = widget widget.open_view.connect(self.openView)
def onCellDoubleClicked(self, row, column, widget): if row < len(self.table_contents[widget]): item = self.table_contents[widget][row] DetailsViewer.createAsWindow(item[0], self.session)