You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 line
1.2KB

  1. class PropertyType(object):
  2. pass
  3. class Property(object):
  4. class Select(PropertyType):
  5. def __init__(self, label, options):
  6. PropertyType.__init__(self)
  7. self.label = label
  8. self.options = options
  9. class Number(PropertyType):
  10. def __init__(self, label, configurable=False, default_value=0, unit=""):
  11. PropertyType.__init__(self)
  12. self.label = label
  13. self.configurable = configurable
  14. class Text(PropertyType):
  15. def __init__(self, label, configurable=False, default_value=""):
  16. PropertyType.__init__(self)
  17. self.label = label
  18. self.configurable = configurable
  19. class StepProperty(Property):
  20. class Actor(PropertyType):
  21. def __init__(self, label):
  22. PropertyType.__init__(self)
  23. self.label = label
  24. self.configurable = True
  25. class Sensor(PropertyType):
  26. def __init__(self, label):
  27. PropertyType.__init__(self)
  28. self.label = label
  29. self.configurable = True
  30. class Kettle(PropertyType):
  31. def __init__(self, label):
  32. PropertyType.__init__(self)
  33. self.label = label
  34. self.configurable = True