49 lines
1.5 KiB
C++
49 lines
1.5 KiB
C++
/*----------------------------------------------------------------------------
|
|
* Copyright (c) TJD Technologies Co., Ltd. 2024. All rights reserved.
|
|
*
|
|
* Description:
|
|
*
|
|
* Author: huangshuyi
|
|
*
|
|
* Create: 2024-7
|
|
*--------------------------------------------------------------------------*/
|
|
|
|
#ifndef TJDUI_WATCH_FACE_PRESENTER_H
|
|
#define TJDUI_WATCH_FACE_PRESENTER_H
|
|
|
|
#include "Presenter.h"
|
|
#include "TjdUiTaskListener.h"
|
|
#include "components/root_view.h"
|
|
#include "components/ui_coverflow_view.h"
|
|
#include "components/ui_roller_view.h"
|
|
|
|
namespace TJD {
|
|
class TjdUiWatchFaceView;
|
|
class TjdUiWatchFacePresenter : public OHOS::Presenter<TjdUiWatchFaceView>,
|
|
public OHOS::UIView::OnClickListener,
|
|
public OHOS::RootView::OnKeyActListener,
|
|
public OHOS::UICoverflowView::OnCoverflowScrollListener,
|
|
public TjdUiTaskListener
|
|
{
|
|
public:
|
|
TjdUiWatchFacePresenter();
|
|
virtual ~TjdUiWatchFacePresenter();
|
|
static TjdUiWatchFacePresenter *GetInstance(void);
|
|
|
|
void OnStart() override;
|
|
void OnStop() override;
|
|
void Notify(void) override{};
|
|
void OnTickEvent() override;
|
|
bool OnClick(OHOS::UIView &view, const OHOS::ClickEvent &event) override;
|
|
bool OnKeyAct(OHOS::UIView &view, const OHOS::KeyEvent &event) override;
|
|
bool OnScroll() override;
|
|
void SelectCurWatchFace(void);
|
|
void ResetTimer(void);
|
|
|
|
private:
|
|
uint64_t startTime{0};
|
|
};
|
|
}
|
|
|
|
#endif // MAIN_PRESENTER_H
|