forked from IPKM/nmreval
22 lines
733 B
Python
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)
|