49 lines
1.2 KiB
C++
49 lines
1.2 KiB
C++
/*----------------------------------------------------------------------------
|
|
* Copyright (c) TJD Technologies Co., Ltd. 2024. All rights reserved.
|
|
*
|
|
* Description:
|
|
*
|
|
* Author: liangjianfei
|
|
*
|
|
* Create: 2024-5
|
|
*--------------------------------------------------------------------------*/
|
|
|
|
#ifndef APP_ITEM_VIEW_H
|
|
#define APP_ITEM_VIEW_H
|
|
|
|
#include "TjdUiAppStartUpModel.h"
|
|
#include "components/ui_image_view.h"
|
|
#include "components/ui_label.h"
|
|
#include "components/ui_view_group.h"
|
|
#include "components/tjd_ui_transform_list_group.h"
|
|
#include "graphic_timer.h"
|
|
|
|
namespace TJD {
|
|
|
|
struct StartUpItemInfo
|
|
{
|
|
uint8_t index;
|
|
std::string name;
|
|
};
|
|
|
|
class StartUpItemView : public ItemConstructor<StartUpItemInfo>
|
|
{
|
|
public:
|
|
StartUpItemView(const StartUpItemInfo &itemInfo);
|
|
virtual ~StartUpItemView() { RemoveAll(); }
|
|
void RefreshItem(const StartUpItemInfo &itemInfo, int16_t index);
|
|
bool OnClickEvent(const OHOS::ClickEvent &event);
|
|
OHOS::UIImageView *GetSelectIcon() { return &selectIcon_; }
|
|
|
|
private:
|
|
OHOS::UILabel name_;
|
|
OHOS::UIImageView selectIcon_;
|
|
OHOS::ImageInfo *selectRes_{nullptr};
|
|
OHOS::ImageInfo *unSelectRes_{nullptr};
|
|
};
|
|
|
|
|
|
} // namespace TJD
|
|
|
|
#endif
|