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

83 lines
2.5 KiB
C++

/*----------------------------------------------------------------------------
* Copyright (c) TJD Technologies Co., Ltd. 2024. All rights reserved.
*
* Description:
*
* Author: wuchangxin
*
* Create: 2024-6-27
*--------------------------------------------------------------------------*/
#ifndef TJDUI_APP_STRESS_H
#define TJDUI_APP_STRESS_H
#include "TjdUiAppStressPresenter.h"
#include "View.h"
#include "components/ui_chart.h"
#include "components/ui_image_view.h"
#include "components/ui_label.h"
#include "components/ui_list.h"
#include "components/ui_scroll_view.h"
#include "components/ui_slider.h"
#include "components/ui_swipe_view_nested.h"
#include "sql_fit.h"
#include "ui_label_ext.h"
#include "ui_swipe_view.h"
namespace TJD {
class TjdUiAppStressPresenter;
class TjdUiAppStressView : public OHOS::View<TjdUiAppStressPresenter>, public OHOS::UIViewGroup
{
public:
TjdUiAppStressView();
~TjdUiAppStressView();
static TjdUiAppStressView *GetInstance(void);
void InitStressList();
void OnStart() override;
void OnStop() override;
OHOS::UISlider *sliderHigh_ = nullptr;
OHOS::UISlider *sliderMiddle_ = nullptr;
OHOS::UISlider *sliderNormal_ = nullptr;
OHOS::UISlider *sliderRelax_ = nullptr;
void StressProgressUpdate(void);
private:
OHOS::UISwipeViewNested *swipeContainer_ = nullptr;
// StressMainViewInit
OHOS::UIViewGroup *stressContainer_ = nullptr;
OHOS::UILabelExt *labelTitle = nullptr;
OHOS::UILabel *labelHigh = nullptr;
OHOS::UILabel *labelLow = nullptr;
OHOS::UIImageView *imageBg = nullptr;
OHOS::UIImageView *imageHigh = nullptr;
OHOS::UIImageView *imageLow = nullptr;
OHOS::UIImageView *imagePullUp = nullptr;
// StressDataViewInit
OHOS::UIViewGroup *dataContainer_ = nullptr;
OHOS::UILabelExt *textTitle = nullptr;
OHOS::UILabelExt *textHigh = nullptr;
OHOS::UILabelExt *textMiddle = nullptr;
OHOS::UILabelExt *textNormal = nullptr;
OHOS::UILabelExt *textRelax = nullptr;
OHOS::UILabel *dataHigh = nullptr;
OHOS::UILabel *dataMiddle = nullptr;
OHOS::UILabel *dataNormal = nullptr;
OHOS::UILabel *dataRelax = nullptr;
OHOS::UISwipeView::OnSwipeListener *onSwipeListener_{nullptr};
OHOS::UIView::OnDragListener *OnDragListener_{nullptr};
OHOS::UIChartDataSerial *dataSerial_ = nullptr;
OHOS::UIChartPolyline *uiChart1_ = nullptr;
void StressMainViewInit(void);
void StressDataViewInit(void);
void StressDataUpdate(void);
};
} // namespace TJD
#endif