def publishLayers(tree, explorer, catalog):
    dlg = PublishLayersDialog(catalog)
    dlg.exec_()
    if dlg.topublish is None:
        return
    layers = [(lay, ws, True, name, style) for lay, ws, name, style in dlg.topublish]
    def layersUploaded():
        catItem = tree.findAllItems(catalog)[0]
        catItem.refreshContent(explorer)
        explorer.resetActivity()
    _publishLayers(catalog, layers, layersUploaded)
def publishLayers(tree, explorer, catalog):
    dlg = PublishLayersDialog(catalog)
    dlg.exec_()
    if dlg.topublish is None:
        return
    layers = [(lay, ws, True, name, style)
              for lay, ws, name, style in dlg.topublish]

    def layersUploaded():
        catItem = tree.findAllItems(catalog)[0]
        catItem.refreshContent(explorer)
        explorer.resetActivity()

    _publishLayers(catalog, layers, layersUploaded)
示例#3
0
def publishLayers(tree, explorer, catalog):
    dlg = PublishLayersDialog(catalog)
    dlg.exec_()
    if dlg.topublish is None:
        return
    cat = CatalogWrapper(catalog)
    progress = 0
    explorer.setProgressMaximum(len(dlg.topublish), "Publish layers")
    for layer, workspace, name, style in dlg.topublish:
        explorer.run(cat.publishLayer, None, [], layer, workspace, True, name,
                     style)
        progress += 1
        explorer.setProgress(progress)
    catItem = tree.findAllItems(catalog)[0]
    catItem.refreshContent(explorer)
    explorer.resetActivity()
def publishLayers(tree, explorer, catalog):
    dlg = PublishLayersDialog(catalog)
    dlg.exec_()
    if dlg.topublish is None:
        return
    cat = CatalogWrapper(catalog)
    progress = 0
    explorer.setProgressMaximum(len(dlg.topublish), "Publish layers")
    for layer, workspace, name, style in dlg.topublish:
        explorer.run(cat.publishLayer,
             None,
             [],
             layer, workspace, True, name, style)
        progress += 1
        explorer.setProgress(progress)
    catItem = tree.findAllItems(catalog)[0]
    catItem.refreshContent(explorer)
    explorer.resetActivity()