修改背景图片,删除重复图片
authorxue <2144439972@qq.com>
Wed, 18 Jun 2025 04:02:38 +0000 (12:02 +0800)
committerxue <2144439972@qq.com>
Wed, 18 Jun 2025 04:02:38 +0000 (12:02 +0800)
code/sdk/application/wearable/fd230app/nativeui/bloodpressure/include/BPResultAnalysisView.h
code/sdk/application/wearable/fd230app/nativeui/bloodpressure/include/BPSecUnderCalibrationView.h
code/sdk/application/wearable/fd230app/nativeui/bloodpressure/include/BPUnderCalibrationView.h
code/sdk/application/wearable/fd230app/nativeui/bloodpressure/include/BPValueView.h
code/sdk/application/wearable/fd230app/nativeui/bloodpressure/src/BPResultAnalysisView.cpp
code/sdk/application/wearable/fd230app/nativeui/bloodpressure/src/BPSecUnderCalibrationView.cpp
code/sdk/application/wearable/fd230app/nativeui/bloodpressure/src/BPUnderCalibrationView.cpp
code/sdk/application/wearable/fd230app/nativeui/bloodpressure/src/BPValueView.cpp
code/sdk/build/config/target_config/brandy/mk_fs_image/w9/fs/user/res/BPCalibration/calibration_background.bin [deleted file]
code/sdk/build/config/target_config/brandy/mk_fs_image/w9/fs/user/res/BPCalibration/result_background.bin [deleted file]

index 76eb50d..991b787 100644 (file)
@@ -24,6 +24,7 @@ namespace OHOS
 
     private:
         UIImageView *background = nullptr;
+        UIImageView *lineground = nullptr;
         UILabelExt *calibrationLabel = nullptr;
         UILabelExt *mindLabel = nullptr;
         UIViewGroup *group{nullptr};
index 16d3928..cda4a31 100644 (file)
@@ -28,6 +28,7 @@ namespace OHOS
 
     private:
         UIImageView *background = nullptr;
+        UIImageView *lineground = nullptr;
         UILabelExt *calibrationLabel = nullptr;
         UILabelExt *remindLabel = nullptr;
         UILabelExt *timeLabel = nullptr;
index c6ada08..35c9a2c 100644 (file)
@@ -18,22 +18,21 @@ namespace OHOS
         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};
     };
 }
index f241463..7b4cd80 100644 (file)
 #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;
index ce4776b..86fd47c 100644 (file)
@@ -14,7 +14,8 @@
 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");
@@ -32,7 +33,7 @@ namespace OHOS
     }
     void BPResultAnalysisView::DeInit()
     {
-        if(group)
+        if (group)
         {
             group->RemoveAll();
             delete group;
@@ -43,11 +44,21 @@ namespace OHOS
             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;
+        }
     }
 
     /***
@@ -56,9 +67,9 @@ namespace OHOS
      */
     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());
         /*初始化检测时间*/
@@ -74,9 +85,15 @@ namespace OHOS
     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;
     }
     /***
@@ -96,14 +113,14 @@ namespace OHOS
         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;
     }
-    
+
 }
index 39e7b9d..d1282dd 100644 (file)
@@ -16,7 +16,8 @@
 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");
@@ -34,42 +35,47 @@ namespace OHOS
     }
     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());
         }
@@ -81,14 +87,14 @@ namespace OHOS
      */
     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);
@@ -103,10 +109,15 @@ namespace OHOS
     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;
     }
     /***
@@ -126,16 +137,16 @@ namespace OHOS
         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;
     }
-    
+
 }
index 8604b36..6014982 100644 (file)
@@ -16,7 +16,8 @@
 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");
@@ -34,42 +35,47 @@ namespace OHOS
     }
     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());
         }
@@ -81,7 +87,7 @@ namespace OHOS
      */
     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);
@@ -89,7 +95,7 @@ namespace OHOS
         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);
@@ -104,10 +110,15 @@ namespace OHOS
     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;
     }
     /***
@@ -127,16 +138,16 @@ namespace OHOS
         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;
     }
-    
+
 }
index a8b030d..3e86196 100644 (file)
@@ -14,7 +14,7 @@
 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";
     
@@ -89,10 +89,7 @@ namespace OHOS
             DBPRight = nullptr;
         }
     }
-    /* -------------------------------------------------------------------------- */
-    void BPValueView::UpSPO2Text()
-    {
-    }
+
     /* -------------------------------------------------------------------------- */
     /***
      * @description:
@@ -101,7 +98,7 @@ namespace OHOS
     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());
         // 设置按键监听
@@ -135,7 +132,7 @@ namespace OHOS
     bool BPValueView::Initbackground()
     {
         background = new UIImageView();
-        background->SetPosition(0, 0, 466, 466);
+        background->SetPosition(0, 62, 466,342);
         background->SetSrc(BPBACKPATH);
 
         SBPLeft = new UIImageView();
diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/w9/fs/user/res/BPCalibration/calibration_background.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/w9/fs/user/res/BPCalibration/calibration_background.bin
deleted file mode 100644 (file)
index 9374d85..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:7f413b424c2826ca775c08fb7e66f1969ac01da6f25d5eda26efd59b94e05871
-size 146040
diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/w9/fs/user/res/BPCalibration/result_background.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/w9/fs/user/res/BPCalibration/result_background.bin
deleted file mode 100644 (file)
index b457303..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:8ce35e01036380add97913331115316cda15a5b2c14e3a1d26dc3f54632c2957
-size 146040