Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

67 рядки
2.3KB

  1. class PropertyType(object):
  2. pass
  3. class Property(object):
  4. class Select(PropertyType):
  5. def __init__(self, label, options, description=""):
  6. PropertyType.__init__(self)
  7. self.label = label
  8. self.options = options
  9. self.description = description
  10. class Number(PropertyType):
  11. def __init__(self, label, configurable=False, default_value=None, unit="", description=""):
  12. PropertyType.__init__(self)
  13. self.label = label
  14. self.configurable = configurable
  15. self.default_value = default_value
  16. self.description = description
  17. class Text(PropertyType):
  18. def __init__(self, label, configurable=False, default_value="", description=""):
  19. PropertyType.__init__(self)
  20. self.label = label
  21. self.configurable = configurable
  22. self.description = description
  23. class Actor(PropertyType):
  24. def __init__(self, label, description=""):
  25. PropertyType.__init__(self)
  26. self.label = label
  27. self.configurable = True
  28. self.description = description
  29. class Sensor(PropertyType):
  30. def __init__(self, label, description=""):
  31. PropertyType.__init__(self)
  32. self.label = label
  33. self.configurable = True
  34. self.description = description
  35. class Kettle(PropertyType):
  36. def __init__(self, label, description=""):
  37. PropertyType.__init__(self)
  38. self.label = label
  39. self.configurable = True
  40. self.description = description
  41. class StepProperty(Property):
  42. class Actor(PropertyType):
  43. def __init__(self, label, description=""):
  44. PropertyType.__init__(self)
  45. self.label = label
  46. self.configurable = True
  47. self.description = description
  48. class Sensor(PropertyType):
  49. def __init__(self, label, description=""):
  50. PropertyType.__init__(self)
  51. self.label = label
  52. self.configurable = True
  53. self.description = description
  54. class Kettle(PropertyType):
  55. def __init__(self, label, description=""):
  56. PropertyType.__init__(self)
  57. self.label = label
  58. self.configurable = True
  59. self.description = description