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

59 lines
1.5 KiB
C++

#ifndef TJD_UI_APP_BUSINESSCARD_ADAPTER_H
#define TJD_UI_APP_BUSINESSCARD_ADAPTER_H
#include "TjdUiAppBusinesscardPresenter.h"
#include "TjdUiComponentList.h"
#include "components/abstract_adapter.h"
#include "components/ui_image_view.h"
#include "components/ui_label.h"
#include "components/ui_label_button.h"
#include "components/ui_toggle_button.h"
#include "components/ui_view.h"
#include "components/ui_view_group.h"
#include "components/ui_qrcode.h"
#include "gfx_utils/list.h"
#include "image_info.h"
#include "string"
#include "sys_typedef.h"
#include "ui_label_ext.h"
#include "components/tjd_ui_transform_list_group.h"
namespace TJD {
enum BusinessCardType
{
BUSINESSCARD_TYPE_NORMAL = 0,
BUSINESSCARD_TYPE_HIDE,
BUSINESSCARD_TYPE_MAX
};
struct BusinessCardCaseInfo
{
BusinessCardItemIndex index;
BusinessCardType type;
OHOS::ImageInfo *imgInfo;
uint16_t nameId;
OHOS::ImageInfo *ifBoundsImgInfo;
qrcode_type_t ifBoundsImgIndex;
};
class BusinessCardCaseItemView : public ItemConstructor<BusinessCardCaseInfo>
{
public:
explicit BusinessCardCaseItemView(const BusinessCardCaseInfo &info);
~BusinessCardCaseItemView();
// void UpdateView(BusinessCardCaseInfo &info);
void RefreshItem(const BusinessCardCaseInfo &itemInfo, int16_t index);
BusinessCardCaseItemView * GetItemView() { return this; }
bool OnClickEvent(const OHOS::ClickEvent &event);
private:
std::string tempName_;
OHOS::UIImageView icon_;
OHOS::UILabelExt name_;
OHOS::UIImageView boundIcon_;
};
} // namespace TJD
#endif