#ifndef TJDUI_APP_WALLET_VIEW_H #define TJDUI_APP_WALLET_VIEW_H #include "TjdUiAppWalletAdapter.h" #include "TjdUiAppWalletPresenter.h" #include "View.h" #include "components/ui_button.h" #include "components/ui_image_view.h" #include "components/ui_label.h" #include "components/ui_list.h" #include "components/ui_qrcode.h" #include "components/ui_scroll_view.h" #include "components/ui_view_group.h" #include // #include "TjdUiAppSettingPage.h" #include "components/ui_scroll_view_nested.h" #include "sql_bt.h" #include "sys_typedef.h" #include "ui_label_ext.h" bool sql_bt_get_qrcode_show_flag(void); bool sql_bt_get_qrcode_exist(qrcode_type_t type); int8_t sql_bt_get_qrcode_info(qrcode_type_t type, char *info, uint16_t *len); namespace TJD { typedef bool (TjdUiAppWalletView::*WalletChangeView)(WalletView hideView); class WalletUIScrollView : public OHOS::UIScrollViewNested { public: WalletUIScrollView() {} ~WalletUIScrollView() {} bool OnDragStartEvent(const OHOS::DragEvent &event) override; bool OnDragEvent(const OHOS::DragEvent &event) override; bool OnDragEndEvent(const OHOS::DragEvent &event) override; private: bool isOnStart_{false}; }; class TjdUiAppWalletPresenter; class TjdUiAppWalletView : public OHOS::View, public OHOS::UIScrollView { public: TjdUiAppWalletView(); ~TjdUiAppWalletView(); static TjdUiAppWalletView *GetInstance(void); void InitWalletList(); void OnStart() override; void OnStop() override; void ChooseWalletItem(WalletItemIndex index); void InitWalletItemView(WalletItemIndex index); void ChangedView(WalletView view, WalletView hideView); static WalletView currentViewIndex_; OHOS::List &GetWalletItemList() { return *walletItemList_; } private: // void InitSettingItemView(WalletItemIndex index); WalletUIScrollView *containerAll_{nullptr}; OHOS::UIScrollView *groupList_[WalletView::MAXTHVIEW]{nullptr}; // UIView::OnClickListener *onClickListener_{nullptr}; // UIView::OnDragListener *OnDragListener_{nullptr}; OHOS::UIScrollView *listView_{nullptr}; OHOS::UIScrollView *tipView_{nullptr}; OHOS::UIScrollView *cardView_{nullptr}; OHOS::UILabelExt *lblTitle_{nullptr}; // OHOS::UILabel *lblTitle_listView{nullptr}; OHOS::UILabelExt *lblTip_{nullptr}; OHOS::UILabelExt lblTip_cardView; OHOS::UIImageView *imgReturn_{nullptr}; OHOS::UIImageView *imgReturn_cardView{nullptr}; OHOS::ImageInfo *imgInfo{nullptr}; OHOS::UIQrcode *qrcode_{nullptr}; TjdUiAppWalletAdapter *walletListAdapter_{nullptr}; OHOS::UIList *walletList_{nullptr}; // SettingItemViewBase *itemView_[WALLET_MAX_INDEX]{nullptr}; WalletItemIndex currentWalletIItem_{WALLET_MAX_INDEX}; OHOS::List *walletItemList_{nullptr}; OHOS::ImageInfo *imgItemInfo[WALLET_MAX_INDEX]; OHOS::UIScrollView *InitTipView(); OHOS::UIScrollView *InitListView(); OHOS::UIScrollView *InitCardView(); bool ShowTipView(WalletView hideView); bool ShowListView(WalletView hideView); bool ShowCardView(WalletView hideView); // OHOS::List *settingItemList_{nullptr}; WalletChangeView viewMapper_[MAXTHVIEW] = { &TjdUiAppWalletView::ShowTipView, &TjdUiAppWalletView::ShowListView, &TjdUiAppWalletView::ShowCardView, }; }; } // namespace TJD #endif