/*---------------------------------------------------------------------------- * Copyright (c) TJD Technologies Co., Ltd. 2024. All rights reserved. * * Description: TjdUiAppMainPageWeather.h * * Author: luziquan@ss-tjd.com * * Create: 2024-12-27 *--------------------------------------------------------------------------*/ #ifndef TJD_UI_APP_MAIN_PAGE_WEATHER_H #define TJD_UI_APP_MAIN_PAGE_WEATHER_H #include "components/ui_card_page.h" #include "components/ui_image_animator.h" #include "components/ui_image_view.h" #include "components/ui_label.h" #include "components/ui_view_group.h" #include "ui_label_ext.h" #include namespace TJD { struct WeatherInfoRes { int startResId; int size; std::string path; }; class TjdUiAppMainPageWeather : public OHOS::UICardPage { public: TjdUiAppMainPageWeather(); virtual ~TjdUiAppMainPageWeather(); void PreLoad(void) override; void UnLoad(void) override; void ScrollEnd(bool isActive) override; void AnimatorResLoadSuccess(void); std::unique_ptr &GetAnimatorInfoArray(void) { return animatorInfoArray_; } private: void InitView(void); void UpdateValue(void); bool viewiInitStatus{false}; WeatherInfoRes curInfo_; OHOS::UIViewGroup *container_{nullptr}; OHOS::UIImageAnimatorView *bgAnimator_{nullptr}; OHOS::UIImageView *bgStatic_{nullptr}; OHOS::UIImageView *localPosIcon_{nullptr}; OHOS::UILabel *localPos_{nullptr}; OHOS::UILabel *currentTemp_{nullptr}; OHOS::UIImageView *minTempIcon_{nullptr}; OHOS::UILabel *minTemp_{nullptr}; OHOS::UIImageView *maxTempIcon_{nullptr}; OHOS::UILabel *maxTemp_{nullptr}; OHOS::UIImageView *windIcon_{nullptr}; OHOS::UILabel *wind_{nullptr}; OHOS::UIView *leftLine_{nullptr}; OHOS::UIImageView *weatherIcon_{nullptr}; OHOS::UILabelExt *weather_{nullptr}; OHOS::UIView *rightLine_{nullptr}; OHOS::UIImageView *humidityIcon_{nullptr}; OHOS::UILabel *humidity_{nullptr}; std::unique_ptr animatorInfoArray_; std::unique_ptr weartherTypeRes_{nullptr}; uint16_t weartherType_; }; } // namespace TJD #endif