mode.dart 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. enum ModeTypeEnum {
  2. undefined,
  3. /// Modes like 2D, TNonL, 3D4D
  4. tissue,
  5. /// Modes like CF, PDI, TVI
  6. flow,
  7. /// Modes like PW, CW, TD
  8. doppler,
  9. /// Modes like MM, AMM
  10. tissueTM
  11. }
  12. abstract class IMode {
  13. // Data Members
  14. /// Gets or sets whether the mode is active.
  15. ///
  16. /// The active mode can be the current most interesting working mode
  17. ///
  18. /// from user's point of view.
  19. ///
  20. /// e.g., If in 2D mode, user presses CF button, then CF mode is enabled and is activated.
  21. ///
  22. /// When user switch to B panel, then B mode is active mode.
  23. ///
  24. /// When set, the Active property of previous mode will be set to false.
  25. bool get active;
  26. set active(bool value);
  27. /// Show or hide the mode. When mode is shown, usually it will create related native models and start to work.
  28. /// This shall be the only way to make the mode work
  29. bool get visible;
  30. set visible(bool value);
  31. /// Indicate whether the mode can be played in current visual state. In another word, the corresponding
  32. /// mode button can be clicked on hard keyboard.
  33. ///
  34. /// If the probe does not support one specific mode, then this flag is false
  35. /// (Also the meta is not in the <see cref="IProbe.SupportedModes"/> list).
  36. ///
  37. /// Else this flag is false in Freezed state when the mode is invisible in live state.
  38. ///
  39. /// One sample: If CF + 2D is visible in live state, at this time, PW is Enabled but is not visible.
  40. ///
  41. /// When freezed, then PW is disabled, but 2D + CF are both Visible and Enabled.
  42. ///
  43. /// When user uncheck CF mode, then CF is invisible but is still Enabled.
  44. ///
  45. /// If user then unfreeze system, then both CF and PW are invisible and are enabled.
  46. bool get enabled;
  47. set enabled(bool value);
  48. /// Gets the identifying name of the <see cref="IMode"/>.
  49. /// B, CF, PDI, TVI, PW, CW, TD, M...
  50. /// This name is hardcoded in every mode.
  51. /// When doing compare, caller shall call like below:
  52. /// if mode.Name == TwoDMode.ModeName
  53. String get name;
  54. ModeTypeEnum get modeType;
  55. }