def slotBrowseHistory(self): lvi = self.lvHistory.selectedItem() if not lvi: return dia = HistoryDialog(self, [ str(lvi.text(0)), str(lvi.text(1)), str(lvi.text(2)), str(lvi.text(6)), unicode(lvi.text(3)), unicode(lvi.text(4)), str(lvi.text(5)) ]) if dia.exec_loop() == QDialog.Rejected: return res = dia.getResult() lvi.setText(0, res[0]) lvi.setText(1, res[1]) lvi.setText(2, res[2]) lvi.setText(3, res[4]) lvi.setText(4, res[5]) lvi.setText(5, res[6]) lvi.setText(6, res[3]) self.syncHistory()
def slotAddHistory(self): dia = HistoryDialog(self, relValue=self.lvHistory.childCount() + 1) if dia.exec_loop() == QDialog.Accepted: res = dia.getResult() lvi = QListViewItem(self.lvHistory, res[0], res[1], res[2], res[4], res[5], res[6], res[3]) self.syncHistory()
def slotBrowseHistory(self): lvi = self.lvHistory.selectedItem() if not lvi: return dia = HistoryDialog(self, [str(lvi.text(0)), str(lvi.text(1)), str(lvi.text(2)), str(lvi.text(6)), unicode(lvi.text(3)), unicode(lvi.text(4)), str(lvi.text(5))]) if dia.exec_loop() == QDialog.Rejected: return res = dia.getResult() lvi.setText(0, res[0]) lvi.setText(1, res[1]) lvi.setText(2, res[2]) lvi.setText(3, res[4]) lvi.setText(4, res[5]) lvi.setText(5, res[6]) lvi.setText(6, res[3]) self.syncHistory()
def slotAddHistory(self): dia = HistoryDialog(self, relValue = self.lvHistory.childCount() + 1) if dia.exec_loop() == QDialog.Accepted: res = dia.getResult() lvi = QListViewItem(self.lvHistory, res[0], res[1], res[2], res[4], res[5], res[6], res[3]) self.syncHistory()