選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

69 行
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.default_value = default_value
  23. self.description = description
  24. class Actor(PropertyType):
  25. def __init__(self, label, description=""):
  26. PropertyType.__init__(self)
  27. self.label = label
  28. self.configurable = True
  29. self.description = description
  30. class Sensor(PropertyType):
  31. def __init__(self, label, description=""):
  32. PropertyType.__init__(self)
  33. self.label = label
  34. self.configurable = True
  35. self.description = description
  36. class Kettle(PropertyType):
  37. def __init__(self, label, description=""):
  38. PropertyType.__init__(self)
  39. self.label = label
  40. self.configurable = True
  41. self.description = description
  42. class StepProperty(Property):
  43. class Actor(PropertyType):
  44. def __init__(self, label, description=""):
  45. PropertyType.__init__(self)
  46. self.label = label
  47. self.configurable = True
  48. self.description = description
  49. class Sensor(PropertyType):
  50. def __init__(self, label, description=""):
  51. PropertyType.__init__(self)
  52. self.label = label
  53. self.configurable = True
  54. self.description = description
  55. class Kettle(PropertyType):
  56. def __init__(self, label, description=""):
  57. PropertyType.__init__(self)
  58. self.label = label
  59. self.configurable = True
  60. self.description = description