def toggleOptions(self): currentWriter = self.getWriterFactory() for param, value in specificParams.iteritems(): treeParam = self.paramsTreeOL.findItems( param, (Qt.MatchExactly | Qt.MatchRecursive))[0] if currentWriter == OpenLayersWriter: if value == "OL3": treeParam.setDisabled(False) else: treeParam.setDisabled(True) else: if value == "OL3": treeParam.setDisabled(True) else: treeParam.setDisabled(False) for option, value in specificOptions.iteritems(): treeOptions = self.layersTree.findItems( option, (Qt.MatchExactly | Qt.MatchRecursive)) for treeOption in treeOptions: if currentWriter == OpenLayersWriter: if value == "OL3": treeOption.setDisabled(False) else: treeOption.setDisabled(True) else: if value == "OL3": treeOption.setDisabled(True) else: treeOption.setDisabled(False)
def toggleOptions(self): for param, value in specificParams.iteritems(): treeParam = self.paramsTreeOL.findItems( param, (Qt.MatchExactly | Qt.MatchRecursive))[0] if self.mapFormat.checkedButton().text() == "OpenLayers 3": if value == "OL3": treeParam.setDisabled(False) else: treeParam.setDisabled(True) else: if value == "OL3": treeParam.setDisabled(True) else: treeParam.setDisabled(False) for option, value in specificOptions.iteritems(): treeOptions = self.layersTree.findItems( option, (Qt.MatchExactly | Qt.MatchRecursive)) for treeOption in treeOptions: if self.mapFormat.checkedButton().text() == "OpenLayers 3": if value == "OL3": treeOption.setDisabled(False) else: treeOption.setDisabled(True) else: if value == "OL3": treeOption.setDisabled(True) else: treeOption.setDisabled(False)
def toggleOptions(self): for param, value in specificParams.iteritems(): treeParam = self.paramsTreeOL.findItems(param, (Qt.MatchExactly | Qt.MatchRecursive))[0] if self.mapFormat.checkedButton().text() == "OpenLayers 3": if value == "OL3": treeParam.setDisabled(False) else: treeParam.setDisabled(True) else: if value == "OL3": treeParam.setDisabled(True) else: treeParam.setDisabled(False) for option, value in specificOptions.iteritems(): treeOptions = self.layersTree.findItems(option, (Qt.MatchExactly | Qt.MatchRecursive)) for treeOption in treeOptions: if self.mapFormat.checkedButton().text() == "OpenLayers 3": if value == "OL3": treeOption.setDisabled(False) else: treeOption.setDisabled(True) else: if value == "OL3": treeOption.setDisabled(True) else: treeOption.setDisabled(False)