functionActivity.h 4.7 KB

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