From: luozheng <1732036298@qq.com> Date: Mon, 8 Apr 2024 10:47:14 +0000 (+0800) Subject: 添加天气Model X-Git-Tag: release_V1.2.70_20241020_135402~1200^2~20 X-Git-Url: http://git.snicker.com.cn/?a=commitdiff_plain;h=9689cc7cce47cc3ece99a903b9a978cdf29c70e0;p=mirrors%2FFD230.git 添加天气Model --- diff --git a/code/sdk/application/wearable/fd230app/CMakeLists.txt b/code/sdk/application/wearable/fd230app/CMakeLists.txt index 7da84c61a..fca48d5ea 100644 --- a/code/sdk/application/wearable/fd230app/CMakeLists.txt +++ b/code/sdk/application/wearable/fd230app/CMakeLists.txt @@ -322,6 +322,7 @@ set(SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/weather/src/GetWeatherDataErrorView.cpp ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/weather/src/WeatherControlView.cpp ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/weather/src/WeatherView.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/weather/src/WeatherModel.cpp #系统 ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/system/src/SystemPresenter.cpp diff --git a/code/sdk/application/wearable/fd230app/nativeui/weather/include/WeatherModel.h b/code/sdk/application/wearable/fd230app/nativeui/weather/include/WeatherModel.h new file mode 100644 index 000000000..c0cdf226a --- /dev/null +++ b/code/sdk/application/wearable/fd230app/nativeui/weather/include/WeatherModel.h @@ -0,0 +1,28 @@ +/* + * @Author: luozheng 1732036298@qq.com + * @Date: 2024-04-08 18:40:20 + * @LastEditors: luozheng 1732036298@qq.com + * @LastEditTime: 2024-04-08 18:43:28 + * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/weather/include/WeatherModel.h + */ +#ifndef WEATHER_MODEL_H +#define WEATHER_MODEL_H + +#include "wearable_log.h" +namespace OHOS +{ + class WeatherModel + { + public: + static WeatherModel &GetInstance(void); + + private: + WeatherModel(); + WeatherModel(const WeatherModel &) = delete; + WeatherModel &operator=(const WeatherModel &) = delete; + virtual ~WeatherModel(); + }; + +} + +#endif \ No newline at end of file diff --git a/code/sdk/application/wearable/fd230app/nativeui/weather/src/WeatherModel.cpp b/code/sdk/application/wearable/fd230app/nativeui/weather/src/WeatherModel.cpp new file mode 100644 index 000000000..f09e621a5 --- /dev/null +++ b/code/sdk/application/wearable/fd230app/nativeui/weather/src/WeatherModel.cpp @@ -0,0 +1,28 @@ +/* + * @Author: luozheng 1732036298@qq.com + * @Date: 2024-04-08 18:40:09 + * @LastEditors: luozheng 1732036298@qq.com + * @LastEditTime: 2024-04-08 18:44:06 + * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/weather/src/WeatherModel.cpp + */ +#include "weather/include/WeatherModel.h" + +namespace OHOS +{ + WeatherModel::WeatherModel() + { + WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "WeatherModel::WeatherModel"); + } + + WeatherModel::~WeatherModel() + { + WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "WeatherModel::~WeatherModel"); + } + + WeatherModel &WeatherModel::GetInstance() + { + static WeatherModel instance; + return instance; + } + +} \ No newline at end of file