110 lines
2.9 KiB
C++
110 lines
2.9 KiB
C++
/*----------------------------------------------------------------------------
|
|
* Copyright (c) TJD Technologies Co., Ltd. 2025. All rights reserved.
|
|
*
|
|
* Description: TjdUiAppListItemView.h
|
|
*
|
|
* Author: luziquan@ss-tjd.com
|
|
*
|
|
* Create: 2025-02-12
|
|
*--------------------------------------------------------------------------*/
|
|
|
|
#ifndef TJD_UI_APP_LIST_ITEM_VIEW_H
|
|
#define TJD_UI_APP_LIST_ITEM_VIEW_H
|
|
|
|
#include "TjdUiAppIds.h"
|
|
#include "TjdUiAppListModel.h"
|
|
#include "TjdUiImageView.h"
|
|
#include "TjdUiLabelView.h"
|
|
#include "components/ui_image_view.h"
|
|
#include "components/ui_transform_group.h"
|
|
#include "components/ui_view_group.h"
|
|
|
|
namespace TJD {
|
|
|
|
class AppListItemView : public OHOS::UIViewGroup
|
|
{
|
|
public:
|
|
explicit AppListItemView();
|
|
~AppListItemView() override;
|
|
void SetItemInfo(const TjdAppItem &itemInfo);
|
|
TjdUiAppViewId GetViewId();
|
|
const char *GetAppUid();
|
|
void SetUpChild();
|
|
void SelectedChange();
|
|
void Reset();
|
|
TjdUiImageView &GetIcon() { return icon_; }
|
|
TjdUiLabelView &GetLabel() { return label_; }
|
|
|
|
private:
|
|
AppListItemView(const AppListItemView &);
|
|
AppListItemView &operator=(const AppListItemView &);
|
|
|
|
TjdUiImageView icon_;
|
|
TjdUiLabelView label_;
|
|
TjdAppItem itemInfo_ = {};
|
|
};
|
|
|
|
class HexagonsItemView : public OHOS::UIImageView
|
|
{
|
|
public:
|
|
explicit HexagonsItemView();
|
|
~HexagonsItemView();
|
|
void SetItemInfo(const TjdAppItem &itemInfo);
|
|
TjdUiAppViewId GetViewId();
|
|
const char *GetAppUid();
|
|
|
|
private:
|
|
HexagonsItemView(const HexagonsItemView &);
|
|
HexagonsItemView &operator=(const HexagonsItemView &);
|
|
TjdAppItem itemInfo_ = {};
|
|
};
|
|
|
|
class WaterfallItemView : public OHOS::UIImageView
|
|
{
|
|
public:
|
|
explicit WaterfallItemView() {}
|
|
~WaterfallItemView() {}
|
|
void SetItemInfo(const TjdAppItem &itemInfo);
|
|
TjdUiAppViewId GetViewId();
|
|
const char *GetAppUid();
|
|
|
|
private:
|
|
WaterfallItemView(const WaterfallItemView &);
|
|
WaterfallItemView &operator=(const WaterfallItemView &);
|
|
TjdAppItem itemInfo_ = {};
|
|
};
|
|
|
|
class SphereItemView : public OHOS::UITransformGroup
|
|
{
|
|
public:
|
|
explicit SphereItemView();
|
|
~SphereItemView();
|
|
void SetItemInfo(const TjdAppItem &itemInfo);
|
|
TjdUiAppViewId GetViewId();
|
|
const char *GetAppUid();
|
|
void SetOnClickListener(OHOS::UIView::OnClickListener* onClickListener);
|
|
private:
|
|
SphereItemView(const SphereItemView &);
|
|
SphereItemView &operator=(const SphereItemView &);
|
|
OHOS::UIImageView icon_;
|
|
TjdAppItem itemInfo_ = {};
|
|
};
|
|
|
|
class GridItemView : public OHOS::UIImageView
|
|
{
|
|
public:
|
|
explicit GridItemView() {}
|
|
~GridItemView() {}
|
|
void SetItemInfo(const TjdAppItem &itemInfo);
|
|
TjdUiAppViewId GetViewId();
|
|
const char *GetAppUid();
|
|
|
|
private:
|
|
GridItemView(const GridItemView &);
|
|
GridItemView &operator=(const GridItemView &);
|
|
TjdAppItem itemInfo_ = {};
|
|
};
|
|
|
|
} // namespace TJD
|
|
|
|
#endif // TJD_UI_APP_LIST_ITEM_VIEW_H
|