mcu_hi3321_watch/tjd/ui/app/findphone/TjdUiAppFindPhonePresenter.h
2025-05-26 20:15:20 +08:00

49 lines
1.7 KiB
C++

#ifndef TJD_UI_APP_FINDPHONE_PRESENTER_H
#define TJD_UI_APP_FINDPHONE_PRESENTER_H
#include "NativeAbility.h"
#include "Presenter.h"
#include "TjdUiAppIds.h"
#include "TjdUiTaskListener.h"
#include "TjdUiScreenDrag.h"
#include "ble_api.h"
#include "components/ui_slider.h"
#include "components/ui_view.h"
#include "graphic_service.h"
#include "graphic_timer.h"
#include "sql_bt.h"
#include <string>
namespace TJD {
#define FINDPHONE_START_ID "Findphonestart_"
#define FINDPHONE_PAUSE_ID "Findphonepause_"
#define FINDPHONE_COVER_ID "Findphonecover_"
#define FINDPHONE_FAIL_ID "Findphonefail_"
class TjdUiAppFindPhoneView;
class TjdUiAppFindPhonePresenter : public OHOS::Presenter<TjdUiAppFindPhoneView>,
public TjdUiTaskListener,
public OHOS::UIView::OnClickListener,
public OHOS::RootView::OnKeyActListener,
public TjdUiScreenDragListener
{
public:
TjdUiAppFindPhonePresenter();
virtual ~TjdUiAppFindPhonePresenter();
static TjdUiAppFindPhonePresenter *GetInstance(void);
virtual void Notify() override;
void OnStart() override;
void OnPause() override;
void OnResume() override;
void OnStop() override;
void ViewExitEvent(OHOS::UIView &view);
bool OnClick(OHOS::UIView &view, const OHOS::ClickEvent &event);
void ScreenDragEventCallback(OHOS::UIView &view, const OHOS::DragEvent &event) override { ViewExitEvent(view); }
bool OnKeyAct(OHOS::UIView &view, const OHOS::KeyEvent &event) override;
private:
int16_t num1{0};
bool backFlag{false};
bool bleFlag{false};
};
} // namespace TJD
#endif