51 lines
1.6 KiB
C++
51 lines
1.6 KiB
C++
/*----------------------------------------------------------------------------
|
|
* Copyright (c) TJD Technologies Co., Ltd. 2024. All rights reserved.
|
|
*
|
|
* Description:
|
|
*
|
|
* Author: wuchangxin
|
|
*
|
|
* Create: 2024-8-24
|
|
*--------------------------------------------------------------------------*/
|
|
#ifndef TJD_UI_APP_TIMER_PRESENTER_H
|
|
#define TJD_UI_APP_TIMER_PRESENTER_H
|
|
|
|
#include "Presenter.h"
|
|
#include "TjdUiScreenDrag.h"
|
|
#include "components/root_view.h"
|
|
#include "components/ui_slider.h"
|
|
#include "components/ui_view.h"
|
|
#include "graphic_timer.h"
|
|
#include <string>
|
|
|
|
namespace TJD {
|
|
|
|
class TjdUiAppTimerView;
|
|
class TjdUiAppTimerPresenter : public OHOS::Presenter<TjdUiAppTimerView>,
|
|
public OHOS::UIView::OnClickListener,
|
|
public TjdUiScreenDragListener,
|
|
public OHOS::RootView::OnKeyActListener
|
|
{
|
|
public:
|
|
TjdUiAppTimerPresenter();
|
|
virtual ~TjdUiAppTimerPresenter();
|
|
static TjdUiAppTimerPresenter &GetInstance(void);
|
|
void OnStart() override;
|
|
void OnPause() override;
|
|
void OnResume() override;
|
|
void OnStop() override;
|
|
bool OnClick(OHOS::UIView &view, const OHOS::ClickEvent &event) override;
|
|
void ScreenDragEventCallback(OHOS::UIView &view, const OHOS::DragEvent &event) override { ViewExitEvent(true); }
|
|
bool OnKeyAct(OHOS::UIView &view, const OHOS::KeyEvent &event);
|
|
void OnClickTrans(OHOS::UIView &view);
|
|
bool IsChinese();
|
|
void ViewExitEvent(bool isSwipe);
|
|
|
|
private:
|
|
bool initFlag_{false};
|
|
bool isExit_{true};
|
|
};
|
|
|
|
} // namespace TJD
|
|
|
|
#endif |