No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

57 líneas
1.8KB

  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=None, unit=""):
  11. PropertyType.__init__(self)
  12. self.label = label
  13. self.configurable = configurable
  14. self.default_value = default_value
  15. class Text(PropertyType):
  16. def __init__(self, label, configurable=False, default_value=""):
  17. PropertyType.__init__(self)
  18. self.label = label
  19. self.configurable = configurable
  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
  35. class StepProperty(Property):
  36. class Actor(PropertyType):
  37. def __init__(self, label):
  38. PropertyType.__init__(self)
  39. self.label = label
  40. self.configurable = True
  41. class Sensor(PropertyType):
  42. def __init__(self, label):
  43. PropertyType.__init__(self)
  44. self.label = label
  45. self.configurable = True
  46. class Kettle(PropertyType):
  47. def __init__(self, label):
  48. PropertyType.__init__(self)
  49. self.label = label
  50. self.configurable = True