91 lines
2.4 KiB
C++
91 lines
2.4 KiB
C++
/*----------------------------------------------------------------------------
|
|
* Copyright (c) TJD Technologies Co., Ltd. 2024. All rights reserved.
|
|
*
|
|
* Description:
|
|
*
|
|
* Author: huangshuyi
|
|
*
|
|
* Create: 2024-8
|
|
*--------------------------------------------------------------------------*/
|
|
|
|
|
|
|
|
#include <string>
|
|
#include <iostream>
|
|
#include "View.h"
|
|
#include "components/root_view.h"
|
|
#include "ChangeSliceListener.h"
|
|
#include "TjdUiFemaleHealthPresenter.h"
|
|
#include "TjdUiAppMainView.h"
|
|
#include "TjdUiAppIds.h"
|
|
#include "NativeAbility.h"
|
|
#include "TransitionType.h"
|
|
#include "dock/input_device.h"
|
|
#include "sys_config.h"
|
|
#include "TjdUiScreenManage.h"
|
|
#include "TjdUiRegisterManager.h"
|
|
|
|
using namespace OHOS;
|
|
namespace TJD {
|
|
|
|
// TJD_REGIST_NATIVE_MENU(TJD_APP_VIEW_FEMALE, TjdUiFemaleHealthView, TjdUiFemaleHealthPresenter, IMG_MENU_LIST_MENU_PHYSIOLOGY, STR_ID_25);
|
|
|
|
#define ENABLE_PRINT_INFO 1
|
|
#if ENABLE_PRINT_INFO
|
|
#define static_print_info(...) sys_ui_log_i(__VA_ARGS__) //一般信息打印宏控制
|
|
#define static_print_warn(...) sys_ui_log_w(__VA_ARGS__) //警告信息打印一般常开
|
|
#define static_print_error(...) sys_ui_log_e(__VA_ARGS__) //错误信息打印一般常开
|
|
#define static_print_debug(...) sys_ui_log_d(__VA_ARGS__)
|
|
#else
|
|
#define static_print_info(...)
|
|
#define static_print_warn(...)
|
|
#define static_print_error(...)
|
|
#define static_print_debug(...)
|
|
#endif
|
|
|
|
|
|
static TjdUiFemaleHealthPresenter *g_pFemaleHealthPresenter = nullptr;
|
|
|
|
TjdUiFemaleHealthPresenter::TjdUiFemaleHealthPresenter()
|
|
{
|
|
g_pFemaleHealthPresenter = this;
|
|
}
|
|
|
|
TjdUiFemaleHealthPresenter::~TjdUiFemaleHealthPresenter()
|
|
{
|
|
g_pFemaleHealthPresenter = nullptr;
|
|
}
|
|
|
|
TjdUiFemaleHealthPresenter *TjdUiFemaleHealthPresenter::GetInstance(void)
|
|
{
|
|
return g_pFemaleHealthPresenter;
|
|
}
|
|
|
|
void TjdUiFemaleHealthPresenter::OnStart()
|
|
{
|
|
TjdUiCommonOnKeyListener::GetInstance()->SetOnKeyActListener(this, KeyModelType::APP_KEY_TYPE);
|
|
}
|
|
|
|
void TjdUiFemaleHealthPresenter::OnStop()
|
|
{
|
|
TjdUiCommonOnKeyListener::GetInstance()->ClearOnKeyActListener(KeyModelType::APP_KEY_TYPE);
|
|
}
|
|
|
|
bool TjdUiFemaleHealthPresenter::OnClick(UIView &view, const ClickEvent &event)
|
|
{
|
|
|
|
return true;
|
|
}
|
|
|
|
bool TjdUiFemaleHealthPresenter::OnKeyAct(UIView& view, const KeyEvent& event)
|
|
{
|
|
if(!TjdUiCommonOnKeyListener::CheckIsExitEvent(event)) {
|
|
return true;
|
|
}
|
|
OHOS::NativeAbility::GetInstance().ChangePreSlice();
|
|
return true;
|
|
}
|
|
|
|
} // namespace OHOS
|
|
|