1
0
forked from IPKM/nmreval
nmreval/src/gui_qt/math/binning.py
2023-06-20 19:22:00 +02:00

22 lines
733 B
Python

from ..Qt import QtWidgets, QtGui
class BinningWindow(QtWidgets.QDialog):
def __init__(self, parent=None):
super().__init__(parent=parent)
layout = QtWidgets.QFormLayout()
self.label = QtWidgets.QLabel('Bin width')
self.spinbox = QtWidgets.QLineEdit()
self.spinbox.setValidator(QtGui.QDoubleValidator())
self.spinbox.setText('1')
layout.addRow(self.label, self.spinbox)
self.dialogbox = QtWidgets.QDialogButtonBox(QtWidgets.QDialogButtonBox.Ok | QtWidgets.QDialogButtonBox.Cancel)
self.dialogbox.accepted.connect(self.accept)
self.dialogbox.rejected.connect(self.reject)
layout.addWidget(self.dialogbox)
self.setLayout(layout)