[common] add 'values' method on DictModels

This commit is contained in:
Yann Lanthony 2018-01-12 13:05:19 +01:00
parent 4ea793be74
commit e391d76a82
2 changed files with 6 additions and 0 deletions

View file

@ -18,6 +18,9 @@ class CoreDictModel:
def items(self): def items(self):
return self._objects.items() return self._objects.items()
def values(self):
return self._objects.values()
@property @property
def objects(self): def objects(self):
return self._objects return self._objects

View file

@ -67,6 +67,9 @@ class QObjectListModel(QtCore.QAbstractListModel):
""" Returns the object list used by the model to store data. """ """ Returns the object list used by the model to store data. """
return self._objects return self._objects
def values(self):
return self._objects
def setObjectList(self, objects): def setObjectList(self, objects):
""" Sets the model's internal objects list to objects. The model will """ Sets the model's internal objects list to objects. The model will
notify any attached views that its underlying data has changed. notify any attached views that its underlying data has changed.