Stateful.py 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. # @author:hyf
  2. import sqlite3, tomlkit
  3. # -----
  4. class UserCommand:
  5. def __init__(self, obj, command) -> None:
  6. self.focusMode = False
  7. self.obj = obj
  8. self.command = command
  9. def app_help():
  10. pass
  11. def app_exit():
  12. exit()
  13. def app_export(self):
  14. pass
  15. def list_board(self):
  16. pass
  17. def list_event(self):
  18. pass
  19. def select_board(self):
  20. print(self.obj + "is selected")
  21. self.focusMode = True
  22. def Command_add():
  23. pass
  24. def Command_edit():
  25. pass
  26. def Command_move():
  27. pass
  28. def Command_delete():
  29. pass
  30. def Command_archive():
  31. pass
  32. def Command_back2home():
  33. pass
  34. def Command_get_info():
  35. pass
  36. def Command_get_num():
  37. pass
  38. class Trigger():
  39. def __init__(self) -> None:
  40. pass
  41. class Board(UserCommand):
  42. def __init__(self) -> None:
  43. super().__init__()
  44. class Event(UserCommand):
  45. def __init__(self) -> None:
  46. super().__init__()
  47. # ----- functions binding command to model -----
  48. class WithToml(UserCommand):
  49. def __init__(self, obj, command):
  50. super().__init__(obj, command)
  51. class WithSqlite3(UserCommand):
  52. def __init__(self, obj, command):
  53. super().__init__(obj, command)
  54. def add_insert():
  55. pass
  56. def edit_update():
  57. pass
  58. def del_delete():
  59. pass
  60. # class WithMd():
  61. # class WithCsv():
  62. # class WithMysql():