Ejemplo n.º 1
0
 def slotAddCOMAR(self):
     dia = COMARDialog(self)
     if dia.exec_loop() == QDialog.Rejected:
         return
     res = dia.getResult()
     KListViewItem(self.lvCOMAR, res[0], res[1])
     if not os.path.isdir(self.comarDir):
         os.mkdir(self.comarDir)
     shutil.copyfile(res[2], self.comarDir + "/" + res[1])
     self.syncCOMAR()
Ejemplo n.º 2
0
        def slotBrowseCOMAR(self):
            lvi = self.lvCOMAR.selectedItem()
            if not lvi:
                return
            dia = COMARDialog(self, [str(lvi.text(0)), str(lvi.text(1))])
            if dia.exec_loop() == QDialog.Rejected:
                return
            res = dia.getResult()
            lvi.setText(0, res[0])
            lvi.setText(1, res[1])

            self.syncCOMAR()