def __initPeakSelectionView(self, model): if self.__peakSelectionView is None: self.__peakSelectionView = _PeakSelectionTableView(self) layout = qt.QHBoxLayout(self._peakSelectionHolder) layout.setContentsMargins(0, 0, 0, 0) layout.addWidget(self.__peakSelectionView) self._peakSelectionHolder.setLayout(layout) tableModel = _PeakSelectionTableModel(self, model.peakSelectionModel()) tableModel.requestRingChange.connect(self.__setRingNumber) tableModel.requestRemovePeak.connect(self.__removePeak) self.__peakSelectionView.setModel(tableModel)
def __createPlotStatusBar(self, plot): converters = [('X', lambda x, y: x), ('Y', lambda x, y: y), ('Value', self.__getImageValue)] hbox = qt.QHBoxLayout() hbox.setContentsMargins(0, 0, 0, 0) info = PositionInfo(plot=plot, converters=converters) info.autoSnapToActiveCurve = True statusBar = qt.QStatusBar(plot) statusBar.setSizeGripEnabled(False) statusBar.addWidget(info) return statusBar