654 |
654 |
655 def __editWhiteList(self): |
655 def __editWhiteList(self): |
656 """ |
656 """ |
657 Private slot to edit the whitelist. |
657 Private slot to edit the whitelist. |
658 """ |
658 """ |
659 # TODO: add a whitelist edit dialog with "add" and "delete" |
659 from .EditWhiteListDialog import EditWhiteListDialog |
660 ## whitelist = dlg.getWhiteList() |
660 dlg = EditWhiteListDialog(self.__data["WhiteLists"]) |
661 ## self.__storeWhiteList(whitelist) |
661 if dlg.exec_() == QDialog.Accepted: |
|
662 whitelists = dlg.getWhiteLists() |
|
663 self.__storeWhiteLists(whitelists) |
662 |
664 |
663 def __whiteList(self): |
665 def __whiteList(self): |
664 """ |
666 """ |
665 Private slot to add entries to the whitelist. |
667 Private slot to add entries to the whitelist. |
666 """ |
668 """ |
679 del itm |
681 del itm |
680 if pitm.childCount() == 0: |
682 if pitm.childCount() == 0: |
681 self.resultList.takeTopLevelItem( |
683 self.resultList.takeTopLevelItem( |
682 self.resultList.indexOfTopLevelItem(pitm)) |
684 self.resultList.indexOfTopLevelItem(pitm)) |
683 del pitm |
685 del pitm |
684 self.__storeWhiteList(whitelists) |
686 self.__storeWhiteLists(whitelists) |
685 |
687 |
686 def __storeWhiteList(self, whitelists): |
688 def __storeWhiteLists(self, whitelists): |
687 """ |
689 """ |
688 Private method to store the new whitelists, if they have changed. |
690 Private method to store the new whitelists, if they have changed. |
689 |
691 |
690 @param whitelists dictionary of lists of whitelisted names |
692 @param whitelists dictionary of lists of whitelisted names |
691 @type dict of list of str |
693 @type dict of list of str |