70 lines
3.0 KiB
C++
70 lines
3.0 KiB
C++
/*
|
||
* Copyright (c) CompanyNameMagicTag 2021-2021. All rights reserved.
|
||
* Description: MainBluetooth view
|
||
* Author:
|
||
* Create: 2021-10-13
|
||
*/
|
||
#ifndef MAIN_BLUETOOTH_VIEW_H
|
||
#define MAIN_BLUETOOTH_VIEW_H
|
||
|
||
#include "View.h"
|
||
#include "UiConfig.h"
|
||
#include "ChangeSliceListener.h"
|
||
#include "BluetoothPresenter.h"
|
||
#include "BluetoothCaseListAdapter.h"
|
||
#include "BluetoothEarListView.h"
|
||
#include "BluetoothEarPhoneView.h"
|
||
#include "BluetoothOptionsView.h"
|
||
#include "BluetoothReconnectView.h"
|
||
#include "TipsConnFailMessageView.h"
|
||
#include "TipsSuccMessageView.h"
|
||
#include "TipsFailMessageView.h"
|
||
#include "BluetoothDeviceListView.h"
|
||
#include "BluetoothItemView.h"
|
||
|
||
namespace OHOS {
|
||
constexpr int16_t NUM_CONTAINER = 9; // NUM_CONTAINER :蓝牙耳机连接的9个界面容器
|
||
|
||
class BluetoothPresenter;
|
||
class MainBluetoothView;
|
||
|
||
class MainBluetoothView : public View<BluetoothPresenter> {
|
||
public:
|
||
MainBluetoothView();
|
||
~MainBluetoothView() override;
|
||
|
||
void OnStart() override;
|
||
void DropView(UIView& view);
|
||
void ChangeView(int16_t hideView, int16_t showView);
|
||
static MainBluetoothView *GetInstance(void);
|
||
|
||
private:
|
||
bool ChangeBluetoothDeviceListView(int16_t hideView, int16_t thisView);
|
||
bool ChangeTipsFailMessageView(int16_t hideView, int16_t thisView);
|
||
bool ChangeTipsConnFailMessageView(int16_t hideView, int16_t thisView);
|
||
bool ChangeTipsSuccMessageView(int16_t hideView, int16_t thisView);
|
||
bool ChangeBluetoothEarPhoneView(int16_t hideView, int16_t thisView);
|
||
bool ChangeBluetoothEarListView(int16_t hideView, int16_t thisView);
|
||
bool ChangeBluetoothView(int16_t hideView, int16_t thisView);
|
||
bool ChangeBluetoothOptionsView(int16_t hideView, int16_t thisView);
|
||
bool ChangeBluetoothReconnectView(int16_t hideView, int16_t thisView);
|
||
bool CheckViewParam(int16_t hideView, int16_t showView);
|
||
void CorrespondingJump(int16_t hideView);
|
||
void ResetEarListView(int16_t hideView);
|
||
void ChangeSettingView();
|
||
void DropEarPhoneView();
|
||
void DropEarListView();
|
||
BluetoothEarListView *bluetoothEarListView{nullptr}; // 耳机连接界面
|
||
BluetoothEarPhoneView *bluetoothEarPhoneView{nullptr}; // 搜索界面
|
||
BluetoothOptionsView *bluetoothOptionsView{nullptr}; // 连接状态界面
|
||
BluetoothReconnectView *bluetoothReconnectView{nullptr}; // 重新连接界面
|
||
TipsConnFailMessageView *tipsConnFailMessageView{nullptr}; // 连接失败界面
|
||
TipsSuccMessageView *tipsSuccMessageView{nullptr}; // 连接成功界面
|
||
TipsFailMessageView *tipsFailMessageView{nullptr}; // 未搜索到蓝牙耳机界面
|
||
BluetoothDeviceListView *bluetoothDeviceListView{nullptr}; // 蓝牙已连接设备界面
|
||
UIViewGroup *container[NUM_CONTAINER]{nullptr}; // NUM_CONTAINER :蓝牙耳机连接的9个界面容器
|
||
typedef bool (MainBluetoothView::*PreprosssChangeView)(int16_t hideView, int16_t thisView);
|
||
PreprosssChangeView preProcessView[NUM_CONTAINER];
|
||
};
|
||
} // namespace OHOS
|
||
#endif // MAIN_BLUETOOTH_VIEW_H
|