def setStatusFilter(self, status): """Filter file tree by change status 'MARSC'""" status = str(status) assert util.all(c in 'MARSC' for c in status) if self._statusfilter == status: return # for performance reason self._statusfilter = status self._rebuildrootentry()
def __init__(self, repo, rev=None, statusfilter='MASC', parent=None): QAbstractItemModel.__init__(self, parent) self._repo = repo self._rev = rev self._subinfo = {} assert util.all(c in 'MARSC' for c in statusfilter) self._statusfilter = statusfilter
def __init__(self, repo, rev=None, namefilter=None, statusfilter='MASC', parent=None): QAbstractItemModel.__init__(self, parent) self._diricon = QApplication.style().standardIcon(QStyle.SP_DirIcon) self._fileicon = QApplication.style().standardIcon(QStyle.SP_FileIcon) self._repo = repo self._rev = rev self._subinfo = {} self._namefilter = namefilter assert util.all(c in 'MARSC' for c in statusfilter) self._statusfilter = statusfilter
def setStatus(self, text): """Set the status text""" assert util.all(c in self._TYPES for c in text) for c in self._TYPES: self._actions[c].setChecked(c in text)