Example #1
0
 def toggleOptions(self):
     currentWriter = self.getWriterFactory()
     for param, value in specificParams.items():
         treeParam = self.appearanceParams.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.items():
         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)
Example #2
0
 def toggleOptions(self):
     currentWriter = self.getWriterFactory()
     for param, value in specificParams.items():
         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.items():
         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)