promptActivity.h 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. /***********************************************
  2. /gen auto by zuitools
  3. ***********************************************/
  4. #ifndef __PROMPTACTIVITY_H__
  5. #define __PROMPTACTIVITY_H__
  6. #include "app/Activity.h"
  7. #include "entry/EasyUIContext.h"
  8. #include "uart/ProtocolData.h"
  9. #include "uart/ProtocolParser.h"
  10. #include "utils/Log.h"
  11. #include "control/ZKDigitalClock.h"
  12. #include "control/ZKPainter.h"
  13. #include "control/ZKButton.h"
  14. #include "control/ZKCircleBar.h"
  15. #include "control/ZKDiagram.h"
  16. #include "control/ZKListView.h"
  17. #include "control/ZKPointer.h"
  18. #include "control/ZKQRCode.h"
  19. #include "control/ZKTextView.h"
  20. #include "control/ZKSeekBar.h"
  21. #include "control/ZKEditText.h"
  22. #include "control/ZKVideoView.h"
  23. #include "control/ZKRadioGroup.h"
  24. #include "window/ZKSlideWindow.h"
  25. /*TAG:Macro宏ID*/
  26. #define ID_PROMPT_QuickPromptListView 80001
  27. #define ID_PROMPT_PromptTextView 50008
  28. #define ID_PROMPT_PromptPainter 52004
  29. #define ID_PROMPT_ExitPromptButton 20002
  30. #define ID_PROMPT_PromptWindow 110002
  31. #define ID_PROMPT_sys_back 100
  32. #define ID_PROMPT_StartPromptButton 20001
  33. #define ID_PROMPT_SetPromptTimeRadioButton6 22007
  34. #define ID_PROMPT_SetPromptTimeRadioButton5 22012
  35. #define ID_PROMPT_SetPromptTimeRadioButton4 22011
  36. #define ID_PROMPT_SetPromptTimeRadioButton3 22010
  37. #define ID_PROMPT_SetPromptTimeRadioButton2 22009
  38. #define ID_PROMPT_SetPromptTimeRadioButton1 22008
  39. #define ID_PROMPT_SetPromptTimeRadioGroup 94002
  40. #define ID_PROMPT_SetPromptTimeTextView 50007
  41. #define ID_PROMPT_SetPromptTimeStartTextView 50006
  42. #define ID_PROMPT_SetPromptTimePainter 52003
  43. #define ID_PROMPT_QuickPromptTextView 50005
  44. #define ID_PROMPT_QuickPromptStartTextView 50004
  45. #define ID_PROMPT_QuickPromptPainter 52002
  46. #define ID_PROMPT_CustomInputEditText 51001
  47. #define ID_PROMPT_CustomInputTextView 50002
  48. #define ID_PROMPT_CustomInputStartTextView 50003
  49. #define ID_PROMPT_CustomInputPainter 52001
  50. #define ID_PROMPT_SetPromptTextView 50001
  51. #define ID_PROMPT_SetPromptWindow 110001
  52. /*TAG:Macro宏ID END*/
  53. class promptActivity : public Activity,
  54. public ZKSeekBar::ISeekBarChangeListener,
  55. public ZKListView::IItemClickListener,
  56. public ZKListView::AbsListAdapter,
  57. public ZKSlideWindow::ISlideItemClickListener,
  58. public EasyUIContext::ITouchListener,
  59. public ZKRadioGroup::ICheckedChangeListener,
  60. public ZKEditText::ITextChangeListener,
  61. public ZKVideoView::IVideoPlayerMessageListener
  62. {
  63. public:
  64. promptActivity();
  65. virtual ~promptActivity();
  66. /**
  67. * 注册定时器
  68. */
  69. void registerUserTimer(int id, int time);
  70. /**
  71. * 取消定时器
  72. */
  73. void unregisterUserTimer(int id);
  74. /**
  75. * 重置定时器
  76. */
  77. void resetUserTimer(int id, int time);
  78. protected:
  79. /*TAG:PROTECTED_FUNCTION*/
  80. virtual const char* getAppName() const;
  81. virtual void onCreate();
  82. virtual void onClick(ZKBase *pBase);
  83. virtual void onResume();
  84. virtual void onPause();
  85. virtual void onIntent(const Intent *intentPtr);
  86. virtual bool onTimer(int id);
  87. virtual void onProgressChanged(ZKSeekBar *pSeekBar, int progress);
  88. virtual int getListItemCount(const ZKListView *pListView) const;
  89. virtual void obtainListItemData(ZKListView *pListView, ZKListView::ZKListItem *pListItem, int index);
  90. virtual void onItemClick(ZKListView *pListView, int index, int subItemIndex);
  91. virtual void onSlideItemClick(ZKSlideWindow *pSlideWindow, int index);
  92. virtual bool onTouchEvent(const MotionEvent &ev);
  93. virtual void onCheckedChanged(ZKRadioGroup* pRadioGroup, int checkedID);
  94. virtual void onTextChanged(ZKTextView *pTextView, const string &text);
  95. void rigesterActivityTimer();
  96. virtual void onVideoPlayerMessage(ZKVideoView *pVideoView, int msg);
  97. void videoLoopPlayback(ZKVideoView *pVideoView, int msg, size_t callbackTabIndex);
  98. void startVideoLoopPlayback();
  99. void stopVideoLoopPlayback();
  100. bool parseVideoFileList(const char *pFileListPath, std::vector<string>& mediaFileList);
  101. int removeCharFromString(string& nString, char c);
  102. private:
  103. /*TAG:PRIVATE_VARIABLE*/
  104. int mVideoLoopIndex;
  105. int mVideoLoopErrorCount;
  106. };
  107. #endif