Delete language from list is now implemented.
self.setupUi (self)
self.currentfile = None
+ # delete a language from the list of languages known
+ def on_delete_lang (self):
+ # get selected language
+ selitems = self.languageslist.selectedItems ()
+ if selitems == []:
+ PyQt4.QtGui.QMessageBox.critical (self, "Cannot delete", "No items selected.")
+ return
+ # confirm
+ ans = PyQt4.QtGui.QMessageBox.question (self, "Confirm",
+ "Are you sure you wish to delete the selected item?",
+ PyQt4.QtGui.QMessageBox.Yes, PyQt4.QtGui.QMessageBox.No)
+ if ans == PyQt4.QtGui.QMessageBox.Yes:
+ for item in selitems:
+ self.languageslist.takeTopLevelItem (self.languageslist.indexOfTopLevelItem (item))
+
+ self.reset_language_fields ()
+
# add a language to the list of languages known
def on_add_lang (self):
# check if the language is set
</hint>
</hints>
</connection>
+ <connection>
+ <sender>deletelanguage</sender>
+ <signal>clicked()</signal>
+ <receiver>biacv_mainwindow</receiver>
+ <slot>on_delete_lang()</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>687</x>
+ <y>142</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>733</x>
+ <y>52</y>
+ </hint>
+ </hints>
+ </connection>
</connections>
<slots>
<slot>on_add_education()</slot>
<slot>on_select_skill()</slot>
<slot>on_update_skill()</slot>
<slot>on_add_lang()</slot>
+ <slot>on_delete_lang()</slot>
</slots>
</ui>
# Form implementation generated from reading ui file 'biacv_mainwindow.ui'
#
-# Created: Thu Dec 1 18:55:17 2011
+# Created: Fri Dec 2 10:24:51 2011
# by: PyQt4 UI code generator 4.8.6
#
# WARNING! All changes made in this file will be lost!
QtCore.QObject.connect(self.skillslist, QtCore.SIGNAL(_fromUtf8("itemSelectionChanged()")), biacv_mainwindow.on_select_skill)
QtCore.QObject.connect(self.updateskill, QtCore.SIGNAL(_fromUtf8("clicked()")), biacv_mainwindow.on_update_skill)
QtCore.QObject.connect(self.addlanguage, QtCore.SIGNAL(_fromUtf8("clicked()")), biacv_mainwindow.on_add_lang)
+ QtCore.QObject.connect(self.deletelanguage, QtCore.SIGNAL(_fromUtf8("clicked()")), biacv_mainwindow.on_delete_lang)
QtCore.QMetaObject.connectSlotsByName(biacv_mainwindow)
def retranslateUi(self, biacv_mainwindow):