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

44 lines
1.3 KiB
C++

/*
* Copyright (c) CompanyNameMagicTag 2021-2021. All rights reserved.
* Description: BluetoothItem view
* Author:
* Create: 2021-10-13
*/
#ifndef BLUETOOTH_ITEM_VIEW_H
#define BLUETOOTH_ITEM_VIEW_H
#include "components/ui_label.h"
#include "components/ui_view_group.h"
#include "components/ui_image_view.h"
#include "components/ui_label_button.h"
#include "components/ui_image_animator.h"
#include "BluetoothModel.h"
#include "UiConfig.h"
#define BLUETOOTH_CONNECT_IMAGE_NUM 8
namespace OHOS {
class BluetoothItemView : public UIViewGroup {
public:
explicit BluetoothItemView();
~BluetoothItemView() override;
void SetItemInfo(const BluetoothCaseInfo& itemInfo, bool isCaseList);
BluetoothCaseInfo *GetItemInfo(void);
void SetConnectionstatus(const BluetoothCaseInfo& infoData);
void SetUpChild();
void ConnectAnimatorStart(void);
void ConnectAnimatorStop(void);
bool IsConnectAnimator(void);
private:
ImageAnimatorInfo connectImageInfo[BLUETOOTH_CONNECT_IMAGE_NUM];
UIImageView image;
UIButton button;
UILabel connectStateLabel;
UILabel namelabel;
UIImageAnimatorView connectionAnimator;
BluetoothCaseInfo itemInfo_{};
void BtConnectImageAnimator();
};
}
#endif