4 """ Abstract class for holders of objects which are accessed via a data accessor. 6 Objects can be filtered using a filter function. 16 """ Sets exclusive mode to given value. 18 If exclusive mode is set to True objects will only appear once in the list of objects if they are added using appendObject. 23 """ Sets the DataAccessor from which the nodes are created. 25 You need to call updateContent() in order to make the changes visible. 33 """ Sets the objects that shall be shown. 35 You need to call updateContent() in order to make the changes visible. 43 """ Sets the one object that shall be shown. 45 This method is provided for e.g. views which show a single object. 46 You need to call updateContent() in order to make the changes visible. 51 """ Return the first object. 53 This method is provided for e.g. views which show a single object. 61 """ Appends object to lists of data objects. 64 self._dataObjects.append(object)
68 """ Removes object from list of data objects. 71 self._dataObjects.remove(object)
74 """ Return number of data objects. 79 """ Removes all objects from this ObjectHolder. 84 """ Set the filter function used in the view. 89 """ The default filter function for objects. 94 """ Apply the filter to a list of objects. 96 This function should be used any time the view handles a list of objects 97 e.g. on self.dataObjects() or self.dataAccessor().children(object): 98 self.applyFilter(self.dataAccessor().children(object)) 105 for object
in objects[:]:
113 for object
in objects:
def numberDataObjectChildren(self, objects=None)
def _noFilter(self, objects)
def setExclusiveMode(self, exclusive=True)
def setDataObject(self, object)
def setDataAccessor(self, accessor)
def allDataObjectChildren(self, objects=None)
def applyFilter(self, objects)
def setDataObjects(self, objects)
def dataObjectsCount(self)
def setFilter(self, filter)
def removeObject(self, object)
def appendObject(self, object)