2 * @Author: luozheng 1732036298@qq.com
3 * @Date: 2024-04-25 11:49:58
4 * @LastEditors: luozheng 1732036298@qq.com
5 * @LastEditTime: 2024-05-06 15:00:23
6 * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/classicbluetooth/include/BluetoothServiceOptionsView.h
9 #ifndef BLUETOOTH_SERVICE_OPTIONS_VIEW_H
10 #define BLUETOOTH_SERVICE_OPTIONS_VIEW_H
14 #include "components/root_view.h"
15 #include "components/ui_scroll_view.h"
16 #include "components/ui_label_ext.h"
17 #include "components/ui_button.h"
18 #include "components/ui_image_view.h"
19 #include "components/ui_toggle_button.h"
20 #include "aivoice/include/AiVoiceConnectingView.h"
24 class BluetoothServiceOptionsPresenter;
25 class BluetoothServiceOptionsView : public View<BluetoothServiceOptionsPresenter>
34 int16_t fontSize; // 字体大小
35 int16_t lineHeigh; // 行高
36 //const char *text; // 文本
38 uint8_t lineBreakMode; // 断行模式。
47 } BluetoothServiceOptionsView_state;
49 BluetoothServiceOptionsView();
50 virtual ~BluetoothServiceOptionsView();
51 static BluetoothServiceOptionsView *GetInstance(void);
52 void BluetoothServiceOptionsViewInit(void);
54 UIToggleButton *GetHFP_ToggleButton(void);
55 UIToggleButton *GetA2DP_ToggleButton(void);
56 void show_connecting_view(bool data);
57 void Button_UPdata(void);
58 bool init_connect_timer(uint8_t type);
59 bool get_connectview_Visible(void);
61 virtual void OnStart() override;
62 virtual void OnStop() override;
65 bool SetUpBlueToothScrollView(void);
66 UILabelExt *SetBluetoothServiceOptionsViewLabel(LabelConfig &labelconfig);
67 bool SetUpBlueToothLabel(void);
68 bool SetUpBlueToothToggleButton(void);
69 bool SetUpBlueToothImageView(void);
70 UIScrollView *BlueToothScrollView = nullptr;
71 UILabelExt *Title = nullptr;
72 UILabelExt *HFP_Label{nullptr};
73 UILabelExt *A2DP_Label{nullptr};
74 UIImageView *HFP_Image{nullptr};
75 UIImageView *A2DP_Image{nullptr};
76 UIToggleButton *HFP_ToggleButton{nullptr}; // HFP
77 UIToggleButton *A2DP_ToggleButton{nullptr}; // A2DP
78 UIScrollView * connectingScrollView{nullptr};
79 AiVoiceConnectingView* p_AiVoiceConnectingView{nullptr};
81 bool initViewStatus{false};