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

39 рядки
1.3KB

  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 StepProperty(Property):
  21. class Actor(PropertyType):
  22. def __init__(self, label):
  23. PropertyType.__init__(self)
  24. self.label = label
  25. self.configurable = True
  26. class Sensor(PropertyType):
  27. def __init__(self, label):
  28. PropertyType.__init__(self)
  29. self.label = label
  30. self.configurable = True
  31. class Kettle(PropertyType):
  32. def __init__(self, label):
  33. PropertyType.__init__(self)
  34. self.label = label
  35. self.configurable = True