functionActivity.h 4.7 KB

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