mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-08-04 01:08:26 +02:00
rename Model to DictModel + augment API
* add "update" and "reset" methods * core: no more default keyAttrName * qt: if keyAttrName is empty, don't register items in internal dictionnary
This commit is contained in:
parent
9c7d0c1b1c
commit
1e306f8408
5 changed files with 42 additions and 13 deletions
|
@ -1,6 +1,7 @@
|
|||
import meshroom
|
||||
|
||||
Model = None
|
||||
DictModel = None
|
||||
Slot = None
|
||||
Signal = None
|
||||
Property = None
|
||||
|
@ -9,10 +10,10 @@ Variant = None
|
|||
|
||||
if meshroom.backend == meshroom.Backend.PYSIDE:
|
||||
# PySide types
|
||||
from .qt import Model, Slot, Signal, Property, BaseObject, Variant
|
||||
from .qt import DictModel, Slot, Signal, Property, BaseObject, Variant
|
||||
elif meshroom.backend == meshroom.Backend.STANDALONE:
|
||||
# Core types
|
||||
from .core import Model, Slot, Signal, Property, BaseObject, Variant
|
||||
from .core import DictModel, Slot, Signal, Property, BaseObject, Variant
|
||||
|
||||
|
||||
class _BaseModel:
|
||||
|
@ -48,3 +49,11 @@ class _BaseModel:
|
|||
def clear(self):
|
||||
""" Remove all internal objects """
|
||||
pass
|
||||
|
||||
def update(self, d):
|
||||
""" Combine dict 'd' with self """
|
||||
pass
|
||||
|
||||
def reset(self, d):
|
||||
""" Reset model with given values """
|
||||
pass
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue