def linkClicked(self, tree, explorer, url): TreeItem.linkClicked(self,tree, explorer, url) if url.toString() == 'kill': try: self.element.killSeedingTasks() except FailedRequestError: #TODO: return try: text = self.getDescriptionHtml(tree, explorer) self.description.setHtml(text) except: explorer.setDescriptionWidget()
def __init__(self, layer): icon = QtGui.QIcon(os.path.dirname(__file__) + "/../images/layer.png") TreeItem.__init__(self, layer, icon) self.setFlags(QtCore.Qt.ItemIsEnabled | QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsDropEnabled)
def __init__(self, catalog): self.catalog = catalog icon = QtGui.QIcon(os.path.dirname(__file__) + "/../images/gwc.png") TreeItem.__init__(self, None, icon, "GeoWebCache layers") self.setFlags(QtCore.Qt.ItemIsEnabled | QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsDropEnabled)