mcu_hi3321_watch/application/wearable/nativeapp/nativeui/connectnewphone/include/ConnectPhoneView.h
2025-05-26 20:15:20 +08:00

38 lines
1.3 KiB
C++

/*
* Copyright (c) CompanyNameMagicTag 2022-2022. All rights reserved.
* Description: Connect Phone View
* Create: 2022-01-19
*/
#ifndef CONNECT_PHONE_VIEW_H
#define CONNECT_PHONE_VIEW_H
#include "View.h"
#include "ConnectPhonePresenter.h"
#include "ConnectSelectView.h"
#include "AppGroupView.h"
namespace OHOS {
constexpr int16_t NUM_CONNECT_PHONE_CONTAINER = 2;
class ConnectPhonePresenter;
class ConnectPhoneView : public View<ConnectPhonePresenter> {
public:
ConnectPhoneView();
~ConnectPhoneView() override;
static ConnectPhoneView *GetInstance();
void OnStart() override;
void ChangeView(int16_t hideView, int16_t showView);
private:
bool ChangeConnectSelectView(int16_t hideView, int16_t thisView);
bool ChangeConnectOpenView(int16_t hideView, int16_t thisView);
bool CheckViewParam(int16_t hideView, int16_t showView);
ConnectSelectView *connectSelectView{nullptr};
ConnectOpenView *connectOpenView{nullptr};
UIViewGroup *container[NUM_CONNECT_PHONE_CONTAINER]{nullptr};
typedef bool (ConnectPhoneView::*PreprosssChangeView)(int16_t hideView, int16_t thisView);
PreprosssChangeView preProcessView[NUM_CONNECT_PHONE_CONTAINER];
};
} // namespace OHOS
#endif // DISCONNECT_PHONE_VIEW_H