Source code for gui.core.baselineRemovalMethods.KK

from PyQt5 import QtWidgets

from gui.ui.KK import Ui_Form
from gui.util.Modules import Modules
from libpyhat.transform.baseline_code.kajfosz_kwiatek import \
    KajfoszKwiatek as KK


[docs] class Ui_Form(Ui_Form, Modules):
[docs] def setupUi(self, Form): super().setupUi(Form) self.checkMinAndMax() Modules.setupUi(self, Form)
[docs] def get_widget(self): return self.groupbox
[docs] def setHidden(self, bool): self.get_widget().setHidden(bool)
[docs] def connectWidgets(self): br = KK() self.topWidthSpinBox.setValue(br.top_width) self.bottomWidthSpinBox.setValue(br.bottom_width) self.tangentCheckBox.setChecked(br.tangent) self.exponentSpinBox.setValue(br.exponent)
[docs] def run(self): methodParameters = { 'top_width': self.topWidthSpinBox.value(), 'bottom_width': self.bottomWidthSpinBox.value(), 'tangent': self.tangentCheckBox.isChecked(), 'exponent': self.exponentSpinBox.value() } return methodParameters, self.getChangedValues(methodParameters, KK())
if __name__ == "__main__": import sys app = QtWidgets.QApplication(sys.argv) Form = QtWidgets.QWidget() ui = Ui_Form() ui.setupUi(Form) Form.show() sys.exit(app.exec_())