def on_apply_click(self): error = Error() if self.is_table_filled() is not True: error.set_message("Not Filled!") if self.is_connectable() is False: error.set_message("Not Valid Information!") return error
def is_board_filled(self): error = Error() for i in range(int(self.lineEdit_boardsizem.displayText())): for j in range(int(self.lineEdit_boardsizen.displayText())): if eq(self.sequence.matrix[i][j].displayText(), ""): error.set_message("(%d, %d) Board Value is Not Filled!" % (i + 1, j + 1)) return error return error
def is_value_number(value, title): error = Error() if is_number(value): if float(value) == 0: error.set_message(title + "CANNOT be 0!") return error else: error.set_message("Input of " + title + " is Not Number!") return error
def on_id_apply(self): error = Error() if self.is_existing_id(): error.set_message("Duplicated ID!") if self.is_valid_id() is not True: error.set_message("Not Valid ID!") self.lineEdit_dbid.setText("") if error.is_true: self.checkBox_dbid.setChecked(False) return error
def is_seq_filled(self): error = Error() if self.seqsize == 0: error.set_message("Enter Sequence Size!") return error for i in range(self.seqsize): if eq(self.sequence.elements[i], ""): error.set_message("%dth Sequence is Not Filled!" % (i + 1)) return error return error