def __init__(self, repo): self.diffs = repo.notindatabase(); self.isDirty = len(self.diffs) > 0 text = "Working Tree [NOT CLEAN]" if self.isDirty else "Working Tree" icon = worktreeUncleanIcon if self.isDirty else worktreeCleanIcon TreeItem.__init__(self, repo, icon, text) self.setFlags(QtCore.Qt.ItemIsEnabled | QtCore.Qt.ItemIsSelectable)
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.ItemIsDragEnabled) if layer is not None and hasattr(layer, 'name') \ and hasattr(layer, 'publicSource'): self.setToolTip(0, "{0}:\n{1}".format(layer.name(), layer.publicSource()))
def __init__(self, group): icon = QtGui.QIcon(os.path.dirname(__file__) + "/../images/group.gif") TreeItem.__init__(self, group , icon) self.setFlags(QtCore.Qt.ItemIsEnabled | QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsDragEnabled)
def __init__(self): icon = QtGui.QIcon(os.path.dirname(__file__) + "/../images/qgis.png") TreeItem.__init__(self, None, icon, "QGIS project")
def __init__(self): icon = QtGui.QIcon(os.path.dirname(__file__) + "/../images/style.png") TreeItem.__init__(self, None, icon, "QGIS Styles")
def __init__(self, table): TreeItem.__init__(self, table, self.getIcon(table)) self.setFlags(QtCore.Qt.ItemIsEnabled | QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsDragEnabled)
def __init__(self, schema): pgIcon = QtGui.QIcon( os.path.dirname(__file__) + "/../images/namespace.png") TreeItem.__init__(self, schema, pgIcon) 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)
def __init__(self, group): icon = QtGui.QIcon(os.path.dirname(__file__) + "/../images/group.gif") TreeItem.__init__(self, group, icon) self.setFlags(QtCore.Qt.ItemIsEnabled | QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsDragEnabled)
def __init__(self, tree): TreeItem.__init__(self, tree, treeIcon, tree.path) self.setFlags(QtCore.Qt.ItemIsEnabled | QtCore.Qt.ItemIsSelectable)
def __init__(self, entry): TreeItem.__init__(self, entry, commitIcon, entry.commit.message) self.setFlags(QtCore.Qt.ItemIsEnabled | QtCore.Qt.ItemIsSelectable)
def __init__(self): self.repos = {} TreeItem.__init__(self, None, geogitIcon, "Geogit repositories")
def __init__(self, repo, name): TreeItem.__init__(self, repo, repoIcon, name) self.setFlags(QtCore.Qt.ItemIsEnabled | QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsDropEnabled)
def __init__(self, layer): icon = QtGui.QIcon(os.path.dirname(__file__) + "/../images/style.png") TreeItem.__init__(self, layer, icon, "Style of layer '" + layer.name() + "'") self.setFlags(QtCore.Qt.ItemIsEnabled | QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsDragEnabled)
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): TreeItem.__init__(self, None, pgIcon, "PostGIS connections") self.databases = []
def __init__(self, schema): pgIcon = QtGui.QIcon(os.path.dirname(__file__) + "/../images/namespace.png") TreeItem.__init__(self, schema, pgIcon) self.setFlags(QtCore.Qt.ItemIsEnabled | QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsDropEnabled)
def __init__(self): TreeItem.__init__(self, None, pgIcon, "PostGIS Connections") self.databases = []
def __init__(self, conn): TreeItem.__init__(self, conn, pgIcon) self.setFlags(QtCore.Qt.ItemIsEnabled | QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsDropEnabled)
def __init__(self): icon = QtGui.QIcon(os.path.dirname(__file__) + "/../images/group.gif") TreeItem.__init__(self, None, icon, "QGIS Groups")