From e391d76a82da8ff9d8d0a3da0b28a4bef1d9b308 Mon Sep 17 00:00:00 2001 From: Yann Lanthony Date: Fri, 12 Jan 2018 13:05:19 +0100 Subject: [PATCH] [common] add 'values' method on DictModels --- meshroom/common/core.py | 3 +++ meshroom/common/qt.py | 3 +++ 2 files changed, 6 insertions(+) diff --git a/meshroom/common/core.py b/meshroom/common/core.py index 866a8171..d56ea5ff 100644 --- a/meshroom/common/core.py +++ b/meshroom/common/core.py @@ -18,6 +18,9 @@ class CoreDictModel: def items(self): return self._objects.items() + def values(self): + return self._objects.values() + @property def objects(self): return self._objects diff --git a/meshroom/common/qt.py b/meshroom/common/qt.py index eae03986..878d3217 100644 --- a/meshroom/common/qt.py +++ b/meshroom/common/qt.py @@ -67,6 +67,9 @@ class QObjectListModel(QtCore.QAbstractListModel): """ Returns the object list used by the model to store data. """ return self._objects + def values(self): + return self._objects + def setObjectList(self, objects): """ Sets the model's internal objects list to objects. The model will notify any attached views that its underlying data has changed.