70 lines
1.8 KiB
C++
70 lines
1.8 KiB
C++
/*----------------------------------------------------------------------------
|
|
* Copyright (c) TJD Technologies Co., Ltd. 2025. All rights reserved.
|
|
*
|
|
* Description: TjdUiAppPhoneAdapter.h
|
|
*
|
|
* Author: luziquan@ss-tjd.com
|
|
*
|
|
* Create: 2025-04-01
|
|
*--------------------------------------------------------------------------*/
|
|
|
|
#ifndef TJD_UI_APP_PHONE_ADAPTER_H
|
|
#define TJD_UI_APP_PHONE_ADAPTER_H
|
|
|
|
#include "components/tjd_ui_transform_list_group.h"
|
|
#include "components/ui_image_view.h"
|
|
|
|
namespace TJD {
|
|
|
|
struct PhoneListItemInfo
|
|
{
|
|
uint8_t index;
|
|
std::string name;
|
|
std::string number;
|
|
OHOS::ImageInfo *imageInfo;
|
|
};
|
|
|
|
class PhoneMainItemView : public ItemConstructor<PhoneListItemInfo>
|
|
{
|
|
public:
|
|
PhoneMainItemView(const PhoneListItemInfo &itemInfo);
|
|
virtual ~PhoneMainItemView() { RemoveAll(); }
|
|
void RefreshItem(const PhoneListItemInfo &itemInfo, int16_t index);
|
|
bool OnClickEvent(const OHOS::ClickEvent &event);
|
|
|
|
private:
|
|
OHOS::UIImageView icon_;
|
|
OHOS::UILabel name_;
|
|
};
|
|
|
|
class PhoneCallLogItemView : public ItemConstructor<PhoneListItemInfo>
|
|
{
|
|
public:
|
|
PhoneCallLogItemView(const PhoneListItemInfo &itemInfo);
|
|
virtual ~PhoneCallLogItemView() { RemoveAll(); }
|
|
void RefreshItem(const PhoneListItemInfo &itemInfo, int16_t index);
|
|
bool OnClickEvent(const OHOS::ClickEvent &event);
|
|
|
|
private:
|
|
OHOS::UIImageView icon_;
|
|
OHOS::UILabel name_;
|
|
OHOS::UILabel number_;
|
|
};
|
|
|
|
class PhoneContactItemView : public ItemConstructor<PhoneListItemInfo>
|
|
{
|
|
public:
|
|
PhoneContactItemView(const PhoneListItemInfo &itemInfo);
|
|
virtual ~PhoneContactItemView() { RemoveAll(); }
|
|
void RefreshItem(const PhoneListItemInfo &itemInfo, int16_t index);
|
|
bool OnClickEvent(const OHOS::ClickEvent &event);
|
|
|
|
private:
|
|
OHOS::UIImageView icon_;
|
|
OHOS::UILabel name_;
|
|
OHOS::UILabel number_;
|
|
};
|
|
|
|
} // namespace TJD
|
|
|
|
#endif |