67 lines
1.5 KiB
C++
67 lines
1.5 KiB
C++
#ifndef TJD_UI_APP_WALLET_ADAPTER_H
|
|
#define TJD_UI_APP_WALLET_ADAPTER_H
|
|
|
|
#include "TjdUiAppWalletPresenter.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"
|
|
|
|
namespace TJD {
|
|
|
|
enum WalletType
|
|
{
|
|
WALLET_TYPE_NORMAL = 0,
|
|
WALLET_TYPE_HIDE,
|
|
WALLET_TYPE_MAX
|
|
};
|
|
|
|
struct WalletCaseInfo
|
|
{
|
|
WalletItemIndex index;
|
|
WalletType type;
|
|
OHOS::ImageInfo *imgInfo;
|
|
const char *name;
|
|
OHOS::ImageInfo *boundInfo;
|
|
qrcode_type_t qrcodeType;
|
|
};
|
|
|
|
class WalletCaseItemView : public TjdUIListView
|
|
{
|
|
public:
|
|
explicit WalletCaseItemView(WalletCaseInfo &info);
|
|
~WalletCaseItemView() override;
|
|
void UpdateView(WalletCaseInfo &info);
|
|
WalletCaseItemView * GetItemView() { return this; }
|
|
bool OnClickEvent(const OHOS::ClickEvent &event) override;
|
|
|
|
private:
|
|
OHOS::UIImageView icon_;
|
|
OHOS::UILabel name_;
|
|
OHOS::UIImageView boundIcon_;
|
|
};
|
|
|
|
class TjdUiAppWalletAdapter : public OHOS::AbstractAdapter
|
|
{
|
|
public:
|
|
TjdUiAppWalletAdapter() {}
|
|
~TjdUiAppWalletAdapter();
|
|
OHOS::UIView *GetView(OHOS::UIView *inView, int16_t index) override;
|
|
uint16_t GetCount() override;
|
|
|
|
private:
|
|
WalletCaseItemView *itemView_{nullptr};
|
|
};
|
|
|
|
} // namespace TJD
|
|
|
|
#endif |