54 lines
1.4 KiB
C++
54 lines
1.4 KiB
C++
#ifndef TJD_UI_APP_STOPWATCH_ADAPTER_H
|
|
#define TJD_UI_APP_STOPWATCH_ADAPTER_H
|
|
|
|
#include "TjdUiAppStopwatchPresenter.h"
|
|
#include "TjdUiComponentList.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_toggle_button.h"
|
|
#include "components/ui_view.h"
|
|
#include "components/ui_view_group.h"
|
|
#include "gfx_utils/list.h"
|
|
#include "image_info.h"
|
|
#include "string"
|
|
|
|
namespace TJD {
|
|
|
|
struct StopwatchCaseInfo {
|
|
std::string timeNum;
|
|
};
|
|
|
|
class StopwatchCaseItemView : public TjdUIListView
|
|
{
|
|
public:
|
|
explicit StopwatchCaseItemView(StopwatchCaseInfo &info);
|
|
~StopwatchCaseItemView() override;
|
|
void UpdateView(StopwatchCaseInfo &info);
|
|
StopwatchCaseItemView *GetItemView() { return this; }
|
|
bool OnClickEvent(const OHOS::ClickEvent &event) override;
|
|
|
|
private:
|
|
OHOS::UIView highBgView;
|
|
OHOS::UIView lowBgView;
|
|
OHOS::UIViewGroup normalView;
|
|
OHOS::UILabel text_;
|
|
};
|
|
|
|
class TjdUiAppStopwatchAdapter : public OHOS::AbstractAdapter
|
|
{
|
|
public:
|
|
TjdUiAppStopwatchAdapter() {}
|
|
~TjdUiAppStopwatchAdapter();
|
|
OHOS::UIView *GetView(OHOS::UIView *inView, int16_t index) override;
|
|
uint16_t GetCount() override;
|
|
|
|
private:
|
|
StopwatchCaseItemView *itemView_{nullptr};
|
|
};
|
|
|
|
} // namespace TJD
|
|
|
|
#endif |