Add GroupParameter.sigAddNew signal

This commit is contained in:
Luke Campagnola 2017-09-29 08:59:14 -07:00
parent 2754427b25
commit ce7594b697
1 changed files with 4 additions and 1 deletions

View File

@ -462,12 +462,15 @@ class GroupParameter(Parameter):
instead of a button.
"""
itemClass = GroupParameterItem
sigAddNew = QtCore.Signal(object, object) # self, type
def addNew(self, typ=None):
"""
This method is called when the user has requested to add a new item to the group.
By default, it emits ``sigAddNew(self, typ)``.
"""
raise Exception("Must override this function in subclass.")
self.sigAddNew.emit(self, typ)
def setAddList(self, vals):
"""Change the list of options available for the user to add to the group."""