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

81 lines
2.7 KiB
C++

/*----------------------------------------------------------------------------
* Copyright (c) TJD Technologies Co., Ltd. 2024. All rights reserved.
*
* Description:
*
* Author: liangjianfei
*
* Create: 2024-5
*--------------------------------------------------------------------------*/
#ifndef TJD_UI_APP_STARTUP_VIEW_H
#define TJD_UI_APP_STARTUP_VIEW_H
#include "View.h"
#include "components/root_view.h"
#include "components/ui_view_group.h"
#include "components/ui_swipe_view.h"
#include "components/ui_scroll_view.h"
#include "components/ui_qrcode.h"
#include "components/ui_label.h"
#include "components/ui_list.h"
#include "components/ui_image_view.h"
#include "ohos_types.h"
#include "TjdUiAppStartUpItemView.h"
#include "TjdUiAppStartUpPresenter.h"
#include "drag_event.h"
#include "graphic_timer.h"
namespace TJD {
class TjdStartUpPresenter;
class TjdStartUpView : public OHOS::View<TjdStartUpPresenter>{
public:
TjdStartUpView();
virtual ~TjdStartUpView();
static TjdStartUpView *GetInstance();
virtual void OnStart() override;
virtual void OnStop() override;
void InitViewData(void);
OHOS::UIViewGroup *GetSelectContainer(void) { return selectContainer_; }
OHOS::UISwipeView *GetDetailContainer(void) { return detailContainer_; }
OHOS::UIViewGroup *GetLinkOKContainer(void) { return linkOKContainer_; }
OHOS::UIQrcode *GetStartUpUIQrcode(void) { return qrcode_; }
void ChangedView(StartUpView view, StartUpView hideView);
bool ShowSelectView(StartUpView hideView);
bool ShowDetailView(StartUpView hideView);
bool ShowlinkOKView(StartUpView hideView);
StartUpView currentPage = SELECT_VIEW;
private:
typedef bool (TjdStartUpView::*StartUpChangeView)(StartUpView);
OHOS::UIViewGroup *SelectContainerInit(void);
OHOS::UIViewGroup *DetailContainerInit(void);
OHOS::UIViewGroup *LinkOKContainerInit(void);
StartUpChangeView viewMapper_[STARTUPVIEW_MAX] = {
&TjdStartUpView::ShowSelectView,
&TjdStartUpView::ShowDetailView,
&TjdStartUpView::ShowlinkOKView
};
OHOS::UIViewGroup *allContainer_{nullptr};
OHOS::UIViewGroup *selectContainer_{nullptr};
OHOS::UISwipeView *detailContainer_{nullptr};
OHOS::UIViewGroup *linkOKContainer_{nullptr};
OHOS::UIViewGroup *groupList_[StartUpView::STARTUPVIEW_MAX]{nullptr};
OHOS::UIQrcode *qrcode_{nullptr};
OHOS::UILabel *labelMac_{nullptr};
TjdUITransformListGroupAdapter<StartUpItemInfo, StartUpItemView, std::list<StartUpItemInfo>> *languageAdapter_{
nullptr};
std::list<StartUpItemInfo> languageInfoList_;
TjdUITransformListGroup *languageList_{nullptr};
};
}
#endif // TjdStartUp_VIEW_H