statusbar.h 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. #ifndef _SYSAPP_STATUSBAR_H_
  2. #define _SYSAPP_STATUSBAR_H_
  3. #include "entry/EasyUIContext.h"
  4. #include "app/SysAppFactory.h"
  5. #include "uart/ProtocolData.h"
  6. #include "uart/ProtocolParser.h"
  7. #include "utils/Log.h"
  8. #include "control/ZKDigitalClock.h"
  9. #include "control/ZKButton.h"
  10. #include "control/ZKCircleBar.h"
  11. #include "control/ZKDiagram.h"
  12. #include "control/ZKListView.h"
  13. #include "control/ZKPainter.h"
  14. #include "control/ZKPointer.h"
  15. #include "control/ZKQRCode.h"
  16. #include "control/ZKTextView.h"
  17. #include "control/ZKSeekBar.h"
  18. #include "control/ZKEditText.h"
  19. #include "control/ZKVideoView.h"
  20. #include "window/ZKSlideWindow.h"
  21. /*TAG:Macro宏ID*/
  22. #define ID_STATUSBAR_TextViewTCP 50004
  23. #define ID_STATUSBAR_TextViewReg 50002
  24. #define ID_STATUSBAR_PartName 50003
  25. #define ID_STATUSBAR_Painter1 52001
  26. #define ID_STATUSBAR_DateView 50001
  27. /*TAG:Macro宏ID END*/
  28. class statusbar : public BaseApp,
  29. public ZKSeekBar::ISeekBarChangeListener,
  30. public ZKListView::IItemClickListener,
  31. public ZKListView::AbsListAdapter,
  32. public ZKSlideWindow::ISlideItemClickListener,
  33. public EasyUIContext::ITouchListener,
  34. public ZKEditText::ITextChangeListener,
  35. public ZKVideoView::IVideoPlayerMessageListener
  36. {
  37. public:
  38. statusbar();
  39. virtual ~statusbar();
  40. virtual void onCreate();
  41. virtual void onClick(ZKBase *pBase);
  42. virtual bool onTimer(int id);
  43. virtual void onProgressChanged(ZKSeekBar *pSeekBar, int progress);
  44. virtual int getListItemCount(const ZKListView *pListView) const;
  45. virtual void obtainListItemData(ZKListView *pListView, ZKListView::ZKListItem *pListItem, int index);
  46. virtual void onItemClick(ZKListView *pListView, int index, int subItemIndex);
  47. virtual void onSlideItemClick(ZKSlideWindow *pSlideWindow, int index);
  48. virtual bool onTouchEvent(const MotionEvent &ev);
  49. virtual void onTextChanged(ZKTextView *pTextView, const string &text);
  50. void rigesterActivityTimer();
  51. virtual void onVideoPlayerMessage(ZKVideoView *pVideoView, int msg);
  52. void videoLoopPlayback(ZKVideoView *pVideoView, int msg, size_t callbackTabIndex);
  53. void startVideoLoopPlayback();
  54. void stopVideoLoopPlayback();
  55. bool parseVideoFileList(const char *pFileListPath, std::vector<string>& mediaFileList);
  56. int removeCharFromString(string& nString, char c);
  57. /**
  58. * 注册定时器
  59. */
  60. void registerUserTimer(int id, int time);
  61. /**
  62. * 取消定时器
  63. */
  64. void unregisterUserTimer(int id);
  65. /**
  66. * 重置定时器
  67. */
  68. void resetUserTimer(int id, int time);
  69. protected:
  70. /*TAG:PROTECTED_FUNCTION*/
  71. virtual const char* getAppName() const;
  72. private:
  73. /*TAG:PRIVATE_VARIABLE*/
  74. int mVideoLoopIndex;
  75. int mVideoLoopErrorCount;
  76. };
  77. #endif