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

53 lines
1.2 KiB
C++

#ifndef TJD_UI_APP_LEFUN_AI_ADAPTER_H
#define TJD_UI_APP_LEFUN_AI_ADAPTER_H
#include "components/abstract_adapter.h"
#include "components/ui_image_view.h"
#include "components/ui_label.h"
#include "components/ui_label_button.h"
#include "components/ui_qrcode.h"
#include "components/ui_scroll_view.h"
#include "components/ui_toggle_button.h"
#include "components/ui_view.h"
#include "components/ui_view_group.h"
#include "gfx_utils/list.h"
#include "string"
#include <list>
namespace TJD {
struct HistoryItemInfo
{
std::string question;
std::string answer;
};
class HistoryListItemView : public OHOS::UIViewGroup
{
public:
explicit HistoryListItemView();
~HistoryListItemView(){RemoveAll();};
void UpdateInfo(HistoryItemInfo &info);
private:
OHOS::UILabel question_;
OHOS::UILabel answer_;
};
class TjdUiAppLefunAiAdapter : public OHOS::AbstractAdapter
{
public:
TjdUiAppLefunAiAdapter() {}
~TjdUiAppLefunAiAdapter();
OHOS::UIView *GetView(OHOS::UIView *inView, int16_t index) override;
uint16_t GetCount() override;
void ClearItem(void);
private:
HistoryListItemView *itemView_ = nullptr;
};
} // namespace TJD
#endif