private:
UIImageView *background = nullptr;
+ UIImageView *lineground = nullptr;
UILabelExt *calibrationLabel = nullptr;
UILabelExt *mindLabel = nullptr;
UIViewGroup *group{nullptr};
private:
UIImageView *background = nullptr;
+ UIImageView *lineground = nullptr;
UILabelExt *calibrationLabel = nullptr;
UILabelExt *remindLabel = nullptr;
UILabelExt *timeLabel = nullptr;
BPUnderCalibrationView();
~BPUnderCalibrationView();
static BPUnderCalibrationView *GetInstance();
- UIViewGroup * BPUnderCalibrationInit();
+ UIViewGroup *BPUnderCalibrationInit();
void DeInit();
bool AddButton();
bool InitLable();
bool Initbackground();
-
-
void UpdateTimeText(int data);
private:
UIImageView *background = nullptr;
+ UIImageView *lineground = nullptr;
UILabelExt *calibrationLabel = nullptr;
UILabelExt *remindLabel = nullptr;
UILabelExt *timeLabel = nullptr;
- UILabel*timenumLabel = nullptr;
+ UILabel *timenumLabel = nullptr;
UIViewGroup *group{nullptr};
};
}
#include "components/ui_scroll_view.h"
#include "components/ui_label_button_ext.h"
-
-
namespace OHOS
{
-
+ static constexpr const char *VALUECHECKBUTTON = "valuecheckButton"; // 校准按钮
class BPValueView
{
public:
BPValueView();
~BPValueView();
static BPValueView *GetInstance();
- UIViewGroup * BPValueInit();
+ UIViewGroup *BPValueInit();
void DeInit();
bool AddButton();
bool InitLable();
bool Initbackground();
- void UpSPO2Text(void);
private:
UIImageView *background = nullptr;
namespace OHOS
{
static BPResultAnalysisView *g_pBPResultAnalysisView{nullptr};
- static const char *BPBACKPATH = "/user/res/BPResultAnalysis/result_background.bin";
+ static const char *BPBACKPATH = "/user/res/BPCalibration//W.bin";
+ static const char *BPLINEPATH = "/user/res/BPCalibration//Q.bin";
BPResultAnalysisView::BPResultAnalysisView()
{
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "BPResultAnalysisView::BPResultAnalysisView");
}
void BPResultAnalysisView::DeInit()
{
- if(group)
+ if (group)
{
group->RemoveAll();
delete group;
delete background;
background = nullptr;
}
+ if (lineground != nullptr)
+ {
+ delete lineground;
+ lineground = nullptr;
+ }
if (calibrationLabel != nullptr)
{
delete calibrationLabel;
calibrationLabel = nullptr;
}
+ if (mindLabel != nullptr)
+ {
+ delete mindLabel;
+ mindLabel = nullptr;
+ }
}
/***
*/
bool BPResultAnalysisView::InitLable()
{
-
- InitLabel(calibrationLabel, 73, 40, 300, 45, "calibration", "结果分析中", DEFAULT_VECTOR_FONT_FILENAME, 40);
- InitLabel(mindLabel,63, 278, 360, 35, "mindLabel", "分析中请勿退出,过程中尽量保持静止,呼吸均匀平衡", DEFAULT_VECTOR_FONT_FILENAME, 40);
+
+ InitLabel(calibrationLabel, 73, 40, 300, 45, "calibration", "结果分析中", DEFAULT_VECTOR_FONT_FILENAME, 36);
+ InitLabel(mindLabel, 63, 136, 360, 70, "mindLabel", "分析中请勿退出,过程中尽量保持静止,呼吸均匀平衡", DEFAULT_VECTOR_FONT_FILENAME, 30);
mindLabel->SetLineBreakMode(UILabel::LINE_BREAK_WRAP);
mindLabel->SetTextColor(Color::Red());
/*初始化检测时间*/
bool BPResultAnalysisView::Initbackground()
{
background = new UIImageView();
- background->SetPosition(0, 0, 466, 466);
+ background->SetPosition(0, 62, 466, 342);
background->SetSrc(BPBACKPATH);
+
+ lineground = new UIImageView();
+ lineground->SetPosition(55, 218, 356, 161);
+ lineground->SetSrc(BPLINEPATH);
+
group->Add(background);
+ group->Add(lineground);
return true;
}
/***
if (!Initbackground())
{
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "Initbackground error!");
- return nullptr;
+ return nullptr;
};
if (!InitLable())
{
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "InitLable error!");
- return nullptr;
+ return nullptr;
};
return group;
}
-
+
}
namespace OHOS
{
static BPSecUnderCalibrationView *g_pBPSecUnderCalibrationView{nullptr};
- static const char *BPBACKPATH = "/user/res/BPCalibration/calibration_background.bin";
+ static const char *BPBACKPATH = "/user/res/BPCalibration//W.bin";
+ static const char *BPLINEPATH = "/user/res/BPCalibration//Q.bin";
BPSecUnderCalibrationView::BPSecUnderCalibrationView()
{
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "BPSecUnderCalibrationView::BPSecUnderCalibrationView");
}
void BPSecUnderCalibrationView::DeInit()
{
- if(group)
+ if (group)
{
group->RemoveAll();
delete group;
group = nullptr;
}
if (background != nullptr)
- {
- delete background;
- background = nullptr;
- }
- if (calibrationLabel != nullptr)
- {
- delete calibrationLabel;
- calibrationLabel = nullptr;
- }
- if(remindLabel != nullptr)
- {
- delete remindLabel;
- remindLabel = nullptr;
- }
- if(timeLabel != nullptr)
- {
- delete timeLabel;
- timeLabel = nullptr;
- }
- if(timenumLabel != nullptr)
- {
- delete timenumLabel;
- timenumLabel = nullptr;
- }
+ {
+ delete background;
+ background = nullptr;
+ }
+ if (lineground != nullptr)
+ {
+ delete lineground;
+ lineground = nullptr;
+ }
+ if (calibrationLabel != nullptr)
+ {
+ delete calibrationLabel;
+ calibrationLabel = nullptr;
+ }
+ if (remindLabel != nullptr)
+ {
+ delete remindLabel;
+ remindLabel = nullptr;
+ }
+ if (timeLabel != nullptr)
+ {
+ delete timeLabel;
+ timeLabel = nullptr;
+ }
+ if (timenumLabel != nullptr)
+ {
+ delete timenumLabel;
+ timenumLabel = nullptr;
+ }
}
/* -------------------------------------------------------------------------- */
void BPSecUnderCalibrationView::UpdateTimeText(int data)
{
- if(timenumLabel != nullptr && data >= 0 && data <= BP_CHECK_TIME_MAX)
+ if (timenumLabel != nullptr && data >= 0 && data <= BP_CHECK_TIME_MAX)
{
timenumLabel->SetText(std::to_string(data).c_str());
}
*/
bool BPSecUnderCalibrationView::InitLable()
{
-
+
InitLabel(calibrationLabel, 83, 32, 300, 40, "calibration", "校准中...", DEFAULT_VECTOR_FONT_FILENAME, 35);
InitLabel(remindLabel, 63, 278, 360, 35, "remind", "二轮校准中,过程中尽量保持静止,呼吸均匀平衡", DEFAULT_VECTOR_FONT_FILENAME, 30);
remindLabel->SetLineBreakMode(UILabel::LINE_BREAK_WRAP);
remindLabel->SetTextColor(Color::Red());
InitLabel(timeLabel, 165, 400, 300, 35, "timeLabel", "秒", DEFAULT_VECTOR_FONT_FILENAME, 30);
InitUILabel(timenumLabel, 133, 300, 200, 200, "timenumLabel", "30", DEFAULT_VECTOR_FONT_FILENAME, 100);
-
+
group->Add(calibrationLabel);
group->Add(remindLabel);
group->Add(timeLabel);
bool BPSecUnderCalibrationView::Initbackground()
{
background = new UIImageView();
- background->SetPosition(0, 0, 466, 466);
+ background->SetPosition(0, 62, 466, 342);
background->SetSrc(BPBACKPATH);
+ lineground = new UIImageView();
+ lineground->SetPosition(49, 95, 356, 161);
+ lineground->SetSrc(BPLINEPATH);
+
group->Add(background);
+ group->Add(lineground);
return true;
}
/***
if (!Initbackground())
{
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "Initbackground error!");
- return nullptr;
+ return nullptr;
};
if (!InitLable())
{
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "InitLable error!");
- return nullptr;
+ return nullptr;
};
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "bool BPSecUnderCalibrationView::InitView()");
return group;
}
-
+
}
namespace OHOS
{
static BPUnderCalibrationView *g_pBPUnderCalibrationView{nullptr};
- static const char *BPBACKPATH = "/user/res/BPCalibration/calibration_background.bin";
+ static const char *BPBACKPATH = "/user/res/BPCalibration//W.bin";
+ static const char *BPLINEPATH = "/user/res/BPCalibration//Q.bin";
BPUnderCalibrationView::BPUnderCalibrationView()
{
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "BPUnderCalibrationView::BPUnderCalibrationView");
}
void BPUnderCalibrationView::DeInit()
{
- if(group)
+ if (group)
{
group->RemoveAll();
delete group;
group = nullptr;
}
if (background != nullptr)
- {
- delete background;
- background = nullptr;
- }
- if (calibrationLabel != nullptr)
- {
- delete calibrationLabel;
- calibrationLabel = nullptr;
- }
- if(remindLabel != nullptr)
- {
- delete remindLabel;
- remindLabel = nullptr;
- }
- if(timeLabel != nullptr)
- {
- delete timeLabel;
- timeLabel = nullptr;
- }
- if(timenumLabel != nullptr)
- {
- delete timenumLabel;
- timenumLabel = nullptr;
- }
+ {
+ delete background;
+ background = nullptr;
+ }
+ if (lineground != nullptr)
+ {
+ delete lineground;
+ lineground = nullptr;
+ }
+ if (calibrationLabel != nullptr)
+ {
+ delete calibrationLabel;
+ calibrationLabel = nullptr;
+ }
+ if (remindLabel != nullptr)
+ {
+ delete remindLabel;
+ remindLabel = nullptr;
+ }
+ if (timeLabel != nullptr)
+ {
+ delete timeLabel;
+ timeLabel = nullptr;
+ }
+ if (timenumLabel != nullptr)
+ {
+ delete timenumLabel;
+ timenumLabel = nullptr;
+ }
}
/* -------------------------------------------------------------------------- */
void BPUnderCalibrationView::UpdateTimeText(int data)
{
- if(timenumLabel != nullptr && data >= 0 && data <= BP_CHECK_TIME_MAX)
+ if (timenumLabel != nullptr && data >= 0 && data <= BP_CHECK_TIME_MAX)
{
timenumLabel->SetText(std::to_string(data).c_str());
}
*/
bool BPUnderCalibrationView::InitLable()
{
-
+
InitLabel(calibrationLabel, 83, 32, 300, 40, "calibration", "校准中...", DEFAULT_VECTOR_FONT_FILENAME, 35);
InitLabel(remindLabel, 63, 278, 360, 35, "remind", "首轮校准中,过程中尽量保持静止,呼吸均匀平衡", DEFAULT_VECTOR_FONT_FILENAME, 30);
remindLabel->SetLineBreakMode(UILabel::LINE_BREAK_WRAP);
InitLabel(timeLabel, 165, 400, 300, 35, "timeLabel", "秒", DEFAULT_VECTOR_FONT_FILENAME, 30);
InitUILabel(timenumLabel, 133, 300, 200, 200, "timenumLabel", "30", DEFAULT_VECTOR_FONT_FILENAME, 100);
-
+
group->Add(calibrationLabel);
group->Add(remindLabel);
group->Add(timeLabel);
bool BPUnderCalibrationView::Initbackground()
{
background = new UIImageView();
- background->SetPosition(0, 0, 466, 466);
+ background->SetPosition(0, 62, 466, 342);
background->SetSrc(BPBACKPATH);
+ lineground = new UIImageView();
+ lineground->SetPosition(49, 95, 356, 161);
+ lineground->SetSrc(BPLINEPATH);
+
group->Add(background);
+ group->Add(lineground);
return true;
}
/***
if (!Initbackground())
{
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "Initbackground error!");
- return nullptr;
+ return nullptr;
};
if (!InitLable())
{
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "InitLable error!");
- return nullptr;
+ return nullptr;
};
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "bool BPUnderCalibrationView::InitView()");
return group;
}
-
+
}
namespace OHOS
{
static BPValueView *g_pBPValueView{nullptr};
- static const char *BPBACKPATH = "/user/res/BPCalibration/calibration_background.bin";
+ static const char *BPBACKPATH = "/user/res/BPCalibration/W.bin";
static const char *LEFTPATH = "/user/res/BPCalibration/decrease_button.bin";
static const char *RIGHTPATH = "/user/res/BPCalibration/increase_button.bin";
DBPRight = nullptr;
}
}
- /* -------------------------------------------------------------------------- */
- void BPValueView::UpSPO2Text()
- {
- }
+
/* -------------------------------------------------------------------------- */
/***
* @description:
bool BPValueView::AddButton()
{
InitLabelButton(valuecheckButton, 125, 365, 217, 63, "value_check", "确认", 35);
- valuecheckButton->SetViewId("value_check");
+ valuecheckButton->SetViewId(VALUECHECKBUTTON);
valuecheckButton->SetStyle(STYLE_BACKGROUND_COLOR, 0xff191919); // 设置按键颜色
valuecheckButton->SetTextColor(Color::Red());
// 设置按键监听
bool BPValueView::Initbackground()
{
background = new UIImageView();
- background->SetPosition(0, 0, 466, 466);
+ background->SetPosition(0, 62, 466,342);
background->SetSrc(BPBACKPATH);
SBPLeft = new UIImageView();
+++ /dev/null
-version https://git-lfs.github.com/spec/v1
-oid sha256:7f413b424c2826ca775c08fb7e66f1969ac01da6f25d5eda26efd59b94e05871
-size 146040
+++ /dev/null
-version https://git-lfs.github.com/spec/v1
-oid sha256:8ce35e01036380add97913331115316cda15a5b2c14e3a1d26dc3f54632c2957
-size 146040