def __init__(self, repo, checkable=False, parent=None): super(BranchModel, self).__init__(parent=parent) connect_destructor(self) self.repo = repo self.column_names = [self.tr("Name")] self.checked_branches = set() self._checkable = checkable self.repo.workspace.before_repo_refreshed += self.before_repo_refreshed self.repo.workspace.repo_refreshed += self.repo_refreshed
def __init__(self, workspace, parent=None): super(DirectoryModel, self).__init__(parent=parent) connect_destructor(self) self.workspace = workspace self.header_text = self.tr('Name') self.workspace.before_repo_added += self.before_repo_added self.workspace.repo_added += self.repo_added self.workspace.before_repo_refreshed += self.before_repo_refreshed self.workspace.repo_refreshed += self.repo_refreshed
def __init__(self, repo, root_dir, parent=None): super(StagedChangesModel, self).__init__(parent=parent) connect_destructor(self) self.repo = repo self.root_dir = root_dir self.column_names = [self.tr('Name'), self.tr('Path'), self.tr('Added'), self.tr('Deleted'), self.tr('New Path')] self.icon_provider = FileIconProvider() self.repo.workspace.before_repo_refreshed += self.before_repo_refreshed self.repo.workspace.repo_refreshed += self.repo_refreshed self.refresh()
def __init__(self, workspace, parent=None): super(FileModel, self).__init__(parent=parent) connect_destructor(self) self.workspace = workspace self._file_source = None self._files = None self.column_names = [self.tr('Name'), self.tr('Index Status'), self.tr('Work Tree Status'), self.tr('Full Path')] self.icon_provider = FileIconProvider() workspace.item_updated += self.item_updated workspace.before_repo_refreshed += self.before_repo_refreshed workspace.repo_refreshed += self.repo_refreshed
def __init__(self, repo, revs=None, paths=None, all=False, parent=None): super(LogGraphModel, self).__init__(parent=parent) connect_destructor(self) self.column_names = [self.tr('Graph'), self.tr('Message'), self.tr('Author'), self.tr('Date'), self.tr('SHA')] self.repo = repo self.revs = revs self.paths = paths self.all = all self.graph = None self.repo.workspace.before_repo_refreshed += self.before_repo_refreshed self.repo.workspace.repo_refreshed += self.repo_refreshed self.refresh()