functionActivity.h 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. /***********************************************
  2. /gen auto by zuitools
  3. ***********************************************/
  4. #ifndef __FUNCTIONACTIVITY_H__
  5. #define __FUNCTIONACTIVITY_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 "window/ZKSlideWindow.h"
  24. /*TAG:Macro宏ID*/
  25. #define ID_FUNCTION_GainCallListView 80003
  26. #define ID_FUNCTION_GainCancelButton 20014
  27. #define ID_FUNCTION_GainCallButton 20015
  28. #define ID_FUNCTION_GainCallTextView 50013
  29. #define ID_FUNCTION_GainCallPainter 52007
  30. #define ID_FUNCTION_GainCallWindow 110008
  31. #define ID_FUNCTION_NursingTimeBackButton 20022
  32. #define ID_FUNCTION_NursingTimeButton 20017
  33. #define ID_FUNCTION_UnitTextView 50023
  34. #define ID_FUNCTION_TimeTextView 50022
  35. #define ID_FUNCTION_TimeTextPainter 52009
  36. #define ID_FUNCTION_Reduce5Button 20021
  37. #define ID_FUNCTION_Reduce1Button 20020
  38. #define ID_FUNCTION_Add5Button 20018
  39. #define ID_FUNCTION_Add1Button 20019
  40. #define ID_FUNCTION_TimeListView 80002
  41. #define ID_FUNCTION_NursingTimeWindow 110010
  42. #define ID_FUNCTION_RebootLineButton 20013
  43. #define ID_FUNCTION_RebootLineTextView 50012
  44. #define ID_FUNCTION_RebootPowerButton 20012
  45. #define ID_FUNCTION_RebootDeviceButton 20011
  46. #define ID_FUNCTION_RebootPowerTextView 50011
  47. #define ID_FUNCTION_RebootDeviceTextView 50010
  48. #define ID_FUNCTION_RebootWindow 110007
  49. #define ID_FUNCTION_ServerCancelButton 20010
  50. #define ID_FUNCTION_ServerConfirmButton 20009
  51. #define ID_FUNCTION_ServerPromptTextView 50009
  52. #define ID_FUNCTION_ServerTextView 50008
  53. #define ID_FUNCTION_ServerPortEditText 51003
  54. #define ID_FUNCTION_ServerIpEditText 51002
  55. #define ID_FUNCTION_ServerPainter 52006
  56. #define ID_FUNCTION_ServerWindow 110006
  57. #define ID_FUNCTION_PwdBackButton 20008
  58. #define ID_FUNCTION_PwdConfirmButton 20007
  59. #define ID_FUNCTION_PwdEditText 51001
  60. #define ID_FUNCTION_PwdPromptTextView 50007
  61. #define ID_FUNCTION_PwdTextView 50006
  62. #define ID_FUNCTION_PwdPainter 52005
  63. #define ID_FUNCTION_PwdWindow 110005
  64. #define ID_FUNCTION_CancelLogoutButton 20006
  65. #define ID_FUNCTION_ConfirmLogoutButton 20005
  66. #define ID_FUNCTION_LogoutTextView 50005
  67. #define ID_FUNCTION_LogoutPicPainter 52004
  68. #define ID_FUNCTION_LogoutWindow 110004
  69. #define ID_FUNCTION_FunctionButton 20004
  70. #define ID_FUNCTION_StateTextView 50004
  71. #define ID_FUNCTION_FunctionTextView 50003
  72. #define ID_FUNCTION_IconPainter 52003
  73. #define ID_FUNCTION_FunctionWindow 110003
  74. #define ID_FUNCTION_WarnWindow 110002
  75. #define ID_FUNCTION_backButton 20003
  76. #define ID_FUNCTION_WarnTextView 50002
  77. #define ID_FUNCTION_CancelCallButton 20002
  78. #define ID_FUNCTION_ConfirmCallButton 20001
  79. #define ID_FUNCTION_CallBedListView 80001
  80. #define ID_FUNCTION_CallBedTextView 50001
  81. #define ID_FUNCTION_CallBedPicPainter 52002
  82. #define ID_FUNCTION_CallBedWindow 110001
  83. #define ID_FUNCTION_FunctionPainter 52001
  84. /*TAG:Macro宏ID END*/
  85. class functionActivity : public Activity,
  86. public ZKSeekBar::ISeekBarChangeListener,
  87. public ZKListView::IItemClickListener,
  88. public ZKListView::AbsListAdapter,
  89. public ZKSlideWindow::ISlideItemClickListener,
  90. public EasyUIContext::ITouchListener,
  91. public ZKEditText::ITextChangeListener,
  92. public ZKVideoView::IVideoPlayerMessageListener
  93. {
  94. public:
  95. functionActivity();
  96. virtual ~functionActivity();
  97. /**
  98. * 注册定时器
  99. */
  100. void registerUserTimer(int id, int time);
  101. /**
  102. * 取消定时器
  103. */
  104. void unregisterUserTimer(int id);
  105. /**
  106. * 重置定时器
  107. */
  108. void resetUserTimer(int id, int time);
  109. protected:
  110. /*TAG:PROTECTED_FUNCTION*/
  111. virtual const char* getAppName() const;
  112. virtual void onCreate();
  113. virtual void onClick(ZKBase *pBase);
  114. virtual void onResume();
  115. virtual void onPause();
  116. virtual void onIntent(const Intent *intentPtr);
  117. virtual bool onTimer(int id);
  118. virtual void onProgressChanged(ZKSeekBar *pSeekBar, int progress);
  119. virtual int getListItemCount(const ZKListView *pListView) const;
  120. virtual void obtainListItemData(ZKListView *pListView, ZKListView::ZKListItem *pListItem, int index);
  121. virtual void onItemClick(ZKListView *pListView, int index, int subItemIndex);
  122. virtual void onSlideItemClick(ZKSlideWindow *pSlideWindow, int index);
  123. virtual bool onTouchEvent(const MotionEvent &ev);
  124. virtual void onTextChanged(ZKTextView *pTextView, const string &text);
  125. void rigesterActivityTimer();
  126. virtual void onVideoPlayerMessage(ZKVideoView *pVideoView, int msg);
  127. void videoLoopPlayback(ZKVideoView *pVideoView, int msg, size_t callbackTabIndex);
  128. void startVideoLoopPlayback();
  129. void stopVideoLoopPlayback();
  130. bool parseVideoFileList(const char *pFileListPath, std::vector<string>& mediaFileList);
  131. int removeCharFromString(string& nString, char c);
  132. private:
  133. /*TAG:PRIVATE_VARIABLE*/
  134. int mVideoLoopIndex;
  135. int mVideoLoopErrorCount;
  136. };
  137. #endif