functionActivity.h 5.5 KB

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