+ # selection is changed
+ def on_select_education (self):
+ self.set_education_fields ()
+
+ # update educational qualification button
+ def on_update_education (self):
+ selitems = self.educationlist.selectedItems ()
+ # if no item is selected
+ if selitems == []:
+ PyQt4.QtGui.QMessageBox.critical (self, "Cannot update", "No item selected")
+ return
+ # if the qualification title is not set
+ if self.degree_name.text () == "":
+ PyQt4.QtGui.QMessageBox.critical (self, "Cannot update", "A required field is missing.")
+ return
+ selitem = selitems[0]
+
+ selitem.setText (0, self.degree_name.text ())
+ selitem.setText (1, self.yearofpassing.date ().toString ("MMM, yyyy"))
+ selitem.setText (2, self.institution.text ())
+ selitem.setText (3, self.university.text ())
+ selitem.setText (4, self.grade.text ())
+ selitem.setText (5, str (self.percentage.value ()))