mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-05-21 21:16:29 +02:00
[core] PushButton attribute implemented
Add PushButtonParam class and implement onAttributeClicked method
This commit is contained in:
parent
6791f02f2d
commit
eb1a0faf97
3 changed files with 31 additions and 0 deletions
|
@ -31,6 +31,8 @@ def attributeFactory(description, value, isOutput, node, root=None, parent=None)
|
|||
cls = ListAttribute
|
||||
elif isinstance(description, desc.ChoiceParam):
|
||||
cls = ChoiceParam
|
||||
elif isinstance(description, desc.PushButtonParam):
|
||||
cls = PushButtonParam
|
||||
else:
|
||||
cls = Attribute
|
||||
attr = cls(node, description, isOutput, root, parent)
|
||||
|
@ -398,6 +400,13 @@ def raiseIfLink(func):
|
|||
return func(attr, *args, **kwargs)
|
||||
return wrapper
|
||||
|
||||
class PushButtonParam(Attribute):
|
||||
def __init__(self, node, attributeDesc, isOutput, root=None, parent=None):
|
||||
super(PushButtonParam, self).__init__(node, attributeDesc, isOutput, root, parent)
|
||||
|
||||
@Slot()
|
||||
def clicked(self):
|
||||
self.node.onAttributeClicked(self)
|
||||
|
||||
class ChoiceParam(Attribute):
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue