class BLJDialog(QtGui.QDialog): def __init__(self): QtGui.QDialog.__init__(self) self.ui = UI() self.ui.setupUi(self) self.setWindowTitle("Create binary Lennard-Jones system") self.natoms = None # self.ui.buttonBox.Ok.setDefault(True) # self.ui.buttonBox.Ok.setDefault(True) def get_input(self): self.natoms = int(self.ui.lineEdit_natoms.text()) self.ntypeA = int(self.ui.lineEdit_ntypeA.text()) self.sigAB = float(self.ui.lineEdit_sigAB.text()) self.epsAB = float(self.ui.lineEdit_epsAB.text()) self.sigBB = float(self.ui.lineEdit_sigBB.text()) self.epsBB = float(self.ui.lineEdit_epsBB.text()) self.sigAA = 1. self.epsAA = 1. def on_buttonBox_accepted(self): self.get_input() self.close() def on_buttonBox_rejected(self): self.close()
def __init__(self): QtGui.QDialog.__init__(self) self.ui = UI() self.ui.setupUi(self) self.setWindowTitle("Create binary Lennard-Jones system") self.natoms = None