From baa677b9eb5cd6948079a3df0748e5fa6f6e97eb Mon Sep 17 00:00:00 2001 From: cheng Date: Fri, 16 Aug 2024 14:39:14 +0800 Subject: [PATCH] =?utf8?q?=E5=8D=A0=E4=BD=8D=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../application/wearable/fd230app/CMakeLists.txt | 7 +++++++ .../fd230app/nativelauncher/include/AppViewIDs.h | 1 + .../nativelauncher/include/NativeLauncher.h | 2 +- .../fd230app/nativelauncher/include/UiConfig.h | 2 +- .../nativelauncher/src/NativeLauncher.cpp | 15 +++++++++++++++ .../nativeui/applist/src/ApplistModel.cpp | 1 + 6 files changed, 26 insertions(+), 2 deletions(-) diff --git a/code/sdk/application/wearable/fd230app/CMakeLists.txt b/code/sdk/application/wearable/fd230app/CMakeLists.txt index f5d2e1fc5..03a066668 100644 --- a/code/sdk/application/wearable/fd230app/CMakeLists.txt +++ b/code/sdk/application/wearable/fd230app/CMakeLists.txt @@ -131,6 +131,8 @@ set(PRIVATE_HEADER ${ROOT_DIR}/open_source/openharmony/foundation/multimedia/utils/include ${ROOT_DIR}/open_source/openharmony/utils/native/lite/include ${ROOT_DIR}/open_source/openharmony/utils/native/lite/kv_store/innerkits + + # ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/schedule/include ) set(SOURCES @@ -739,6 +741,11 @@ set(SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/goal/src/goalhint.cpp ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/goal/src/goalControlView.cpp + # #schedule + # ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/schedule/src/ScheduleView.cpp + # ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/schedule/src/SchedulePresenter.cpp + # ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/schedule/src/ScheduleModel.cpp + # ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/schedule/src/ScheduleListAdapter.cpp ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/calculator/src/CalculatorView.cpp ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/calculator/src/CalculatorPresenter.cpp diff --git a/code/sdk/application/wearable/fd230app/nativelauncher/include/AppViewIDs.h b/code/sdk/application/wearable/fd230app/nativelauncher/include/AppViewIDs.h index 1df389f0d..966215de5 100644 --- a/code/sdk/application/wearable/fd230app/nativelauncher/include/AppViewIDs.h +++ b/code/sdk/application/wearable/fd230app/nativelauncher/include/AppViewIDs.h @@ -129,6 +129,7 @@ typedef enum : uint16_t VIEW_TEST, // 测试 VIEW_GOAL, // 每日目标 VIEW_CALCULATOR, // 计算器 + VIEW_SCHEDULE, // schedule /* -------------------------------------------------------------------------- */ #ifdef SUPPORT_ALIPAY_SEC VIEW_MAIN_ALIPAY, diff --git a/code/sdk/application/wearable/fd230app/nativelauncher/include/NativeLauncher.h b/code/sdk/application/wearable/fd230app/nativelauncher/include/NativeLauncher.h index 536a7718e..8b305b9df 100644 --- a/code/sdk/application/wearable/fd230app/nativelauncher/include/NativeLauncher.h +++ b/code/sdk/application/wearable/fd230app/nativelauncher/include/NativeLauncher.h @@ -118,7 +118,7 @@ namespace OHOS void InitDialingMethodSlice(void); /* -------------------------------------------------------------------------- */ void InitCalculatorSlice(void); - + // void InitScheduleSlice(void); void InittestSlice(void); private: diff --git a/code/sdk/application/wearable/fd230app/nativelauncher/include/UiConfig.h b/code/sdk/application/wearable/fd230app/nativelauncher/include/UiConfig.h index ea506c5e2..72aee9e48 100644 --- a/code/sdk/application/wearable/fd230app/nativelauncher/include/UiConfig.h +++ b/code/sdk/application/wearable/fd230app/nativelauncher/include/UiConfig.h @@ -313,7 +313,7 @@ namespace OHOS static constexpr const char *PNG_APPLIST_SLEEP_IMAGE = APP_LIST_PATH "/sleeping.bin"; // 睡眠 static constexpr const char *PNG_APPLIST_INFORMATION_IMAGE = APP_LIST_PATH "/information.bin"; // 计算器 static constexpr const char *PNG_APPLIST_MUSIC_IMAGE = APP_LIST_PATH "/music.bin"; // 音乐 - + static constexpr const char *PNG_APPLIST_SCHEDULE_IMAGE = APP_LIST_PATH "/schedule.bin"; // AppList hexagon icon static constexpr const char *PNG_APPLIST_DEFAULT_IMG = APP_RES_PATH "/regular_hexagon.bin"; static constexpr const char *PNG_APPLIST_NOTSETUSE_IMG = APP_RES_PATH "/regular_hexagon_inverse.bin"; diff --git a/code/sdk/application/wearable/fd230app/nativelauncher/src/NativeLauncher.cpp b/code/sdk/application/wearable/fd230app/nativelauncher/src/NativeLauncher.cpp index f11b6da63..e75cddde2 100644 --- a/code/sdk/application/wearable/fd230app/nativelauncher/src/NativeLauncher.cpp +++ b/code/sdk/application/wearable/fd230app/nativelauncher/src/NativeLauncher.cpp @@ -258,6 +258,8 @@ #include "traing/training_card/include/TraingCardPresenter.h" #include "traing/training_card/include/TraingCardView.h" /* -------------------------------------------------------------------------- */ +// #include "schedule/include/SchedulePresenter.h" + #ifdef SUPPORT_ALIPAY_SEC #include "AlipayMainView.h" #include "AlipayPresenter.h" @@ -402,6 +404,7 @@ namespace OHOS /* -------------------------------------------------------------------------- */ /*智能助手*/ {VIEW_OFFLINEVOICE, &NativeLauncher::InitOfflineVoice}, + // {VIEW_SCHEDULE, &NativeLauncher::InitScheduleSlice}, #ifdef SUPPORT_ALIPAY_SEC {VIEW_MAIN_ALIPAY, &NativeLauncher::InitMainAlipaySlice}, @@ -1478,4 +1481,16 @@ namespace OHOS NativeAbility::GetInstance().AddSliceProxy(VIEW_SET_DIAL_STYLE, setDialStyleView); } + // void NativeLauncher::InitScheduleSlice(void) + // { + // WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "NativeLauncher::InitScheduleSlice"); + // SliceProxy * t_View = new AbilitySliceProxy; + // if (nullptr == t_View) + // { + // WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "View is nullptr"); + // return; + // } + // NativeAbility::GetInstance().AddSliceProxy(VIEW_SCHEDULE, t_View); + // } + } diff --git a/code/sdk/application/wearable/fd230app/nativeui/applist/src/ApplistModel.cpp b/code/sdk/application/wearable/fd230app/nativeui/applist/src/ApplistModel.cpp index f3caa03d7..7a6bdd1f9 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/applist/src/ApplistModel.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/applist/src/ApplistModel.cpp @@ -87,6 +87,7 @@ namespace OHOS {VIEW_SLEEP, PNG_APPLIST_SLEEP_IMAGE, PNG_APPLIST_SLEEP_IMAGE, PNG_APPLIST_DEFAULT_IMG, "睡眠", STR_SLEEP, nullptr}, // {VIEW_MUSIC_PLAYER, PNG_APPLIST_MUSIC_IMAGE, PNG_APPLIST_MUSIC_IMAGE, PNG_APPLIST_DEFAULT_IMG, "音乐播放器", STR_MUSIC, nullptr}, {VIEW_OFFLINEVOICE, PNG_APPLIST_VOCASSIST_IMAGE, PNG_APPLIST_VOCASSIST_IMAGE, PNG_APPLIST_DEFAULT_IMG, "语音助手", STR_VOICE_ASSISTANT, nullptr}, + // {VIEW_SCHEDULE, PNG_APPLIST_SCHEDULE_IMAGE, PNG_APPLIST_SCHEDULE_IMAGE, PNG_APPLIST_DEFAULT_IMG, "schedule", STR_SCHEDULE, nullptr}, {VIEW_SETTING, PNG_APPLIST_SETTING_IMAGE, PNG_APPLIST_SETTING_IMAGE, PNG_APPLIST_DEFAULT_IMG, "设置", STR_SETTINGS, nullptr}, #if 0 /*屏蔽Slice*/ -- 2.17.1