memory (params), tools (xml_tools), plugins, frontends: add "int" parameter type with "min" and "max" attributes
This commit is contained in:
parent
20c94f1fbc
commit
ac59d061f4
1 changed files with 80 additions and 11 deletions
|
|
@ -101,6 +101,10 @@ class BoolWidget(Widget):
|
|||
"""
|
||||
|
||||
|
||||
class IntWidget(Widget):
|
||||
"""Input widget with require an integer"""
|
||||
|
||||
|
||||
class ButtonWidget(Widget):
|
||||
"""A clickable widget"""
|
||||
|
||||
|
|
@ -388,6 +392,9 @@ class XMLUIPanel(XMLUIBase):
|
|||
elif type_=="bool":
|
||||
ctrl = self.widget_factory.createBoolWidget(_xmlui_parent, value==C.BOOL_TRUE, self._isAttrSet("read_only", node))
|
||||
self.ctrl_list[name] = ({'type':type_, 'control':ctrl})
|
||||
elif type_ == "int":
|
||||
ctrl = self.widget_factory.createIntWidget(_xmlui_parent, value, self._isAttrSet("read_only", node))
|
||||
self.ctrl_list[name] = ({'type':type_, 'control':ctrl})
|
||||
elif type_ == "list":
|
||||
style = [] if node.getAttribute("multi") == 'yes' else ['single']
|
||||
_options = [(option.getAttribute("value"), option.getAttribute("label")) for option in node.getElementsByTagName("option")]
|
||||
|
|
|
|||
Loading…
Reference in a new issue