self.setupUi (self)
self.currentfile = None
+ # delete skill set button is clicked
+ def on_delete_skill (self):
+ # get the selected items
+ selitems = self.skillslist.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)
+ # answer is yes
+ if ans == PyQt4.QtGui.QMessageBox.Yes:
+ for item in selitems:
+ self.skillslist.takeTopLevelItem (self.skillslist.indexOfTopLevelItem (item))
+
+ self.reset_skillset_fields ()
+
# add skill set button is clicked
def on_add_skill (self):
# if the skill title is blank
# clear the skill set fields
def reset_skillset_fields (self):
- self.skillsetitle.setText ("")
+ self.skillsettitle.setText ("")
self.skilldescription.setPlainText ("")
# update professional history button is clicked
<enum>QTabWidget::Rounded</enum>
</property>
<property name="currentIndex">
- <number>4</number>
+ <number>0</number>
</property>
<property name="documentMode">
<bool>true</bool>
</hint>
</hints>
</connection>
+ <connection>
+ <sender>deleteskill</sender>
+ <signal>clicked()</signal>
+ <receiver>biacv_mainwindow</receiver>
+ <slot>on_delete_skill()</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>598</x>
+ <y>238</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>728</x>
+ <y>174</y>
+ </hint>
+ </hints>
+ </connection>
</connections>
<slots>
<slot>on_add_education()</slot>
<slot>on_delete_profession()</slot>
<slot>on_update_profession()</slot>
<slot>on_add_skill()</slot>
+ <slot>on_delete_skill()</slot>
</slots>
</ui>
# Form implementation generated from reading ui file 'biacv_mainwindow.ui'
#
-# Created: Thu Dec 1 10:10:58 2011
+# Created: Thu Dec 1 15:41:51 2011
# by: PyQt4 UI code generator 4.8.6
#
# WARNING! All changes made in this file will be lost!
self.deleteskill.setObjectName(_fromUtf8("deleteskill"))
self.gridLayout_5.addWidget(self.deleteskill, 2, 3, 1, 1)
self.skillslist = QtGui.QTreeWidget(self.tab_4)
+ self.skillslist.setAlternatingRowColors(True)
+ self.skillslist.setRootIsDecorated(False)
+ self.skillslist.setUniformRowHeights(True)
self.skillslist.setObjectName(_fromUtf8("skillslist"))
self.skillslist.headerItem().setText(0, QtGui.QApplication.translate("biacv_mainwindow", "Skill set", None, QtGui.QApplication.UnicodeUTF8))
self.skillslist.headerItem().setText(1, QtGui.QApplication.translate("biacv_mainwindow", "Description", None, QtGui.QApplication.UnicodeUTF8))
QtCore.QObject.connect(self.deletehistory, QtCore.SIGNAL(_fromUtf8("clicked()")), biacv_mainwindow.on_delete_profession)
QtCore.QObject.connect(self.updatehistory, QtCore.SIGNAL(_fromUtf8("clicked()")), biacv_mainwindow.on_update_profession)
QtCore.QObject.connect(self.addskill, QtCore.SIGNAL(_fromUtf8("clicked()")), biacv_mainwindow.on_add_skill)
+ QtCore.QObject.connect(self.deleteskill, QtCore.SIGNAL(_fromUtf8("clicked()")), biacv_mainwindow.on_delete_skill)
QtCore.QMetaObject.connectSlotsByName(biacv_mainwindow)
def retranslateUi(self, biacv_mainwindow):