271bb7bd87dc3ad1beff80006c00a053bc98887a
[mirrors/FD230.git] /
1 /***
2  * @Author: Caisking 3449750381@qq.com
3  * @Date: 2024-03-19 17:37:18
4  * @LastEditors: Caisking 3449750381@qq.com
5  * @LastEditTime: 2024-03-29 19:23:56
6  * @FilePath: /sdk/application/wearable/fd230app/nativeui/traing/training_list_limit/include/TraingOtherPresenter.h
7  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
8  */
9
10 #ifndef _TraingOther_PRESENTER_H
11 #define _TraingOther_PRESENTER_H
12
13 #include "key/include/KeyInputListener.h"
14 #include "Presenter.h"
15 #include "TraingOtherView.h"
16
17 namespace OHOS
18 {
19     class TraingOtherView;
20     class TraingOtherModel;
21     class TraingOtherPresenter : public Presenter<TraingOtherView>,
22                                  public UIView::OnClickListener,
23                                  public RootView::OnKeyActListener,
24                                  public UIView::OnDragListener
25     {
26     public:
27         TraingOtherPresenter();
28         virtual ~TraingOtherPresenter();
29
30         void OnStart() override;
31         void OnStop() override;
32
33         static TraingOtherPresenter *GetInstance();
34
35     private:
36         // 因为继承了OnClickener,所以有OnClick属性,至于参数,原函数也这样直接继承;
37         bool OnClick(UIView &view, const ClickEvent &event) override;
38         bool OnDrag(UIView &view, const DragEvent &event) override;
39         bool OnDragEnd(UIView &view, const DragEvent &event) override;
40         bool OnKeyAct(UIView &view, const KeyEvent &event) override; // 增加按键事件
41
42         TraingOtherModel *p_TraingOtherModel{nullptr};
43     };
44 } // namespace OHOS
45
46 #endif // SLEEPDETAIL_PRESENTER_H