mcu_hi3321_watch/tjd/ui/app/wf_select/TjdUiWatchFaceView.h
2025-05-26 20:15:20 +08:00

66 lines
1.9 KiB
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*----------------------------------------------------------------------------
* Copyright (c) TJD Technologies Co., Ltd. 2024. All rights reserved.
*
* Description:
*
* Author: huangshuyi
*
* Create: 2024-7
*--------------------------------------------------------------------------*/
#ifndef TJDUI_WATCH_FACE_VIEW_H
#define TJDUI_WATCH_FACE_VIEW_H
#include "TjdUiWatchFaceAdapter.h"
#include "TjdUiWatchFacePresenter.h"
#include "View.h"
#include "components/root_view.h"
#include "components/tjd_ui_custom_roller_view.h"
#include "components/ui_coverflow_view.h"
#include "components/ui_coverflow_view2.h"
#include <list>
#include <vector>
#include <string>
#include <vector>
namespace TJD {
class TjdUiWatchFacePresenter;
class TjdUiWatchFaceView : public OHOS::View<TjdUiWatchFacePresenter>
{
public:
struct WfImageInfo
{
std::string name; //滚筒名字标识
std::string path; //全路径
int fileOffset; // 0:多文件通过resid读<0单文件通过resid读 >0从文件系统根据名字读
uint32_t fileImgId; //
uint32_t wfId;
uint32_t wfType; //表盘背景资源类型:=0,UIKIT位图格式=1jpg图片=2视频。
OHOS::ImageInfo *imgInfo;
uint8_t *imgData = nullptr;
};
TjdUiWatchFaceView();
virtual ~TjdUiWatchFaceView();
static TjdUiWatchFaceView *GetInstance(void);
void OnStart() override;
void OnStop() override;
uint32_t GetCurCoverflowItemWfId(void);
std::vector<WfImageInfo> &GetWfImageList(void) { return wfImageList; }
void SetUpCoverflowView(void);
private:
std::vector<WatchFaceCoverflowItemView *> coverflowItemList_;
void LoadDialInfo(void);
OHOS::ImageInfo *GetImageInfo(uint8_t index);
class WfRollerViewListener;
OHOS::UICoverFlowView2 *coverflow2_{nullptr};
std::vector<WfImageInfo> wfImageList;
};
} // namespace TJD
#endif // MAIN_VIEW_SAMPLE_H