예제 #1
0
        def slotAddAdditional(self):
            dia = AdditionalFileDialog(self)
            if dia.exec_loop() == QDialog.Rejected:
                return
            res = dia.getResult()
            KListViewItem(self.lvAdditionalFiles, res[0], res[1], res[2], res[3])
            if not os.path.isdir(self.filesDir):
                os.mkdir(self.filesDir)
            shutil.copyfile(res[4], self.filesDir + "/" + res[3])

            self.syncAdditional()
예제 #2
0
        def slotBrowseAdditional(self):
            lvi = self.lvAdditionalFiles.selectedItem()
            if not lvi:
                return
            dia = AdditionalFileDialog(self, [str(lvi.text(0)), str(lvi.text(1)), str(lvi.text(2)), str(lvi.text(3))])
            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[3])
            # TODO: additinal file may be renamed

            self.syncAdditional()