64 lines
1.8 KiB
C++
64 lines
1.8 KiB
C++
/*----------------------------------------------------------------------------
|
||
* 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 "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 "components/ui_label_ext.h"
|
||
#include <list>
|
||
#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位图格式;=1,jpg图片;=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);
|
||
void SetUpCoverflowView(void);
|
||
void CoverflowViewScroll(void);
|
||
|
||
private:
|
||
void LoadDialInfo(void);
|
||
OHOS::ImageInfo *GetImageInfo(uint8_t index);
|
||
OHOS::UICoverflowView coverflow2_;
|
||
OHOS::UILabelExt label_;
|
||
std::vector<WfImageInfo> wfImageList;
|
||
uint8_t lastIndex_;
|
||
};
|
||
|
||
} // namespace TJD
|
||
|
||
#endif // MAIN_VIEW_SAMPLE_H
|