forked from IPKM/nmreval
add binning
This commit is contained in:
21
src/gui_qt/math/binning.py
Normal file
21
src/gui_qt/math/binning.py
Normal file
@ -0,0 +1,21 @@
|
||||
from ..Qt import QtWidgets
|
||||
|
||||
|
||||
class BinningWindow(QtWidgets.QDialog):
|
||||
def __init__(self, parent=None):
|
||||
super().__init__(parent=parent)
|
||||
|
||||
layout = QtWidgets.QFormLayout()
|
||||
|
||||
self.label = QtWidgets.QLabel('Digits (negative values position left of decimal point)')
|
||||
self.spinbox = QtWidgets.QSpinBox()
|
||||
self.spinbox.setMinimum(-10)
|
||||
self.spinbox.setMaximum(10)
|
||||
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)
|
Reference in New Issue
Block a user