JonYang 1 долоо хоног өмнө
parent
commit
ff175f23c8

+ 5 - 0
View/die-bonder-ui/MainWnd.cpp

@@ -32,6 +32,11 @@ void MainWnd::on_tabProductionBtn_clicked()
     SwitchToConfig(&OriginalWnd::switchToProductionConfig);
 }
 
+void MainWnd::on_tabMessageBtn_clicked()
+{
+    SwitchToConfig(&OriginalWnd::switchMsgConfig);
+}
+
 void MainWnd::on_tabHomeBtn_clicked()
 {
     SwitchToConfig(&OriginalWnd::switchToHomeConfig);

+ 1 - 0
View/die-bonder-ui/MainWnd.h

@@ -76,6 +76,7 @@ private slots:
     void on_pushButton_clicked();
 
     void on_tabProductionBtn_clicked();
+    void on_tabMessageBtn_clicked();
 
     void on_tabProgramBtn_clicked();
 

+ 10 - 3
View/die-bonder-ui/OriginalWnd/ChartsAndCamerasWnd.cpp

@@ -77,7 +77,7 @@ ChartsAndCamerasWnd::ChartsAndCamerasWnd(QWidget* parent) :
     connect(timer, &QTimer::timeout, this, &ChartsAndCamerasWnd::setColor);
     timer->start(100);
     m_timerMaterial = new QTimer(this);
-    connect(m_timerMaterial, &QTimer::timeout, this, &ChartsAndCamerasWnd::UpdateMaterialByTimer);
+   // connect(m_timerMaterial, &QTimer::timeout, this, &ChartsAndCamerasWnd::UpdateMaterialByTimer);
     m_pCViewInterface = ns_module::CViewInterface::GetInstance();
 }
 
@@ -242,7 +242,14 @@ void ChartsAndCamerasWnd::on_CheckBox_clicked()
     }
 }
 #endif
-
+// 初始化静态成员
+ChartsAndCamerasWnd* ChartsAndCamerasWnd::m_instance = nullptr;
+ChartsAndCamerasWnd* ChartsAndCamerasWnd::GetInstance() {
+    if (!m_instance) {
+        m_instance = new ChartsAndCamerasWnd();
+    }
+    return m_instance;
+}
 void ChartsAndCamerasWnd::initFrom() 
 {
     m_allGroup.clear();
@@ -591,7 +598,7 @@ void ChartsAndCamerasWnd::initWidget() {
         BindImageOrMaterial(m_nMaterialIndex);
 
     }
-    //m_timerMaterial->start(10000);
+    m_timerMaterial->start(10000);
 }
 
 void ChartsAndCamerasWnd::saveInfoOfLast() {

+ 3 - 0
View/die-bonder-ui/OriginalWnd/ChartsAndCamerasWnd.h

@@ -26,6 +26,8 @@ public:
     explicit ChartsAndCamerasWnd(QWidget* parent = nullptr);
     ~ChartsAndCamerasWnd();
 
+    // 获取唯一实例的静态方法
+    static ChartsAndCamerasWnd* GetInstance();
 
     void initFrom();
     void updateMaterialWidget(int materialWndType, int groupId);
@@ -160,6 +162,7 @@ private:
     const int                       m_nMaterialIndex = 2;
     QTimer* m_timerMaterial;
     ns_module::CViewInterface* m_pCViewInterface;
+    static ChartsAndCamerasWnd* m_instance; // 声明静态实例指针
 
 };
 

+ 2 - 2
View/die-bonder-ui/OriginalWnd/DbTreeViewManager.cpp

@@ -271,7 +271,7 @@ void DbTreeViewManager::initializeTree(QString name, const int &userPrivilege)
         CustomizeWndCall(m_pProgrammPage);
 
     }
-    else if (name == "Diagnosis")  //TODO:yang 推荐后续定制页面都使用我这个
+    else if (name == "Msg")  //TODO:yang 推荐后续定制页面都使用我这个
     {
         m_pDiagnosisPage = new DiagnosisPage();
         CustomizeWndCall(m_pDiagnosisPage);
@@ -1061,7 +1061,7 @@ void DbTreeViewManager::updateButtonsVisibility()
 {
     if (m_currentConfigName == "Home" || 
         m_currentConfigName == "Programme" ||
-        m_currentConfigName=="Diagnosis")
+        m_currentConfigName=="Msg")
     {
         // Home 界面,隐藏所有按钮
         ButtonBack->hide();

+ 10 - 5
View/die-bonder-ui/OriginalWnd/MainAndSecondaryCamerasWnd.cpp

@@ -30,7 +30,7 @@ MainAndSecondaryCamerasWnd::MainAndSecondaryCamerasWnd(QWidget* parent)
     m_veCurrentSelectGroup_R.isBond = false;
     m_veCurrentSelectGroup_L.isBond = false;
     m_timerMaterial = new QTimer(this);
-    connect(m_timerMaterial, &QTimer::timeout, this, &MainAndSecondaryCamerasWnd::UpdateMaterialByTimer);
+   // connect(m_timerMaterial, &QTimer::timeout, this, &MainAndSecondaryCamerasWnd::UpdateMaterialByTimer);
     m_pCViewInterface = ns_module::CViewInterface::GetInstance();
 }
 
@@ -203,6 +203,14 @@ void MainAndSecondaryCamerasWnd::InitPage()
         //}
     }
 }
+// 初始化静态成员
+MainAndSecondaryCamerasWnd* MainAndSecondaryCamerasWnd::m_instance = nullptr;
+MainAndSecondaryCamerasWnd* MainAndSecondaryCamerasWnd::GetInstance() {
+    if (!m_instance) {
+        m_instance = new MainAndSecondaryCamerasWnd();
+    }
+    return m_instance;
+}
 
 void MainAndSecondaryCamerasWnd::CameraConnectUpdateImageFun(int nIndex, Group* widget, bool isUnCameraBind /*= false*/)
 {
@@ -293,15 +301,12 @@ void MainAndSecondaryCamerasWnd::initLeftAndRightWidget() {
                 ui->viewwidgetgroup_R->setEnableControls(true);
                 BindImageOrMaterial(m_nLastLeft, m_nMaterialIndex);
                 ui->viewwidgetgroup_L->setEnableControls(false);
-
             }
             else {
                 BindImageOrMaterial(m_nCurrentRight, m_nMaterialIndex);
                 ui->viewwidgetgroup_R->setEnableControls(false);
                 BindImageOrMaterial(m_nLastLeft, m_nImageIndex);
                 ui->viewwidgetgroup_L->setEnableControls(true);
-                QPixmap pixmap_L = ui->viewwidgetgroup_L->getCurrentComboBoxPixmap(currentLeftComboBoxIndex);
-                GetGroupImageShowSignalsTo_L(pixmap_L);
                 
             }
 
@@ -352,7 +357,7 @@ void MainAndSecondaryCamerasWnd::initLeftAndRightWidget() {
 
         }
     }
-    m_timerMaterial->start(1000);
+    m_timerMaterial->start(10000);
 }
 
 void MainAndSecondaryCamerasWnd::BindImageOrMaterial(int location, int index) 

+ 3 - 1
View/die-bonder-ui/OriginalWnd/MainAndSecondaryCamerasWnd.h

@@ -22,7 +22,8 @@ public:
     explicit MainAndSecondaryCamerasWnd(QWidget *parent = nullptr);
 
     ~MainAndSecondaryCamerasWnd();
-
+    // 获取唯一实例的静态方法
+    static MainAndSecondaryCamerasWnd* GetInstance();
     void initFrom();
 
     void InitPage();
@@ -182,6 +183,7 @@ private:
     const int           m_nMaterialIndex = 2;
     QTimer*             m_timerMaterial;
     ns_module::CViewInterface* m_pCViewInterface;
+    static MainAndSecondaryCamerasWnd* m_instance; // 声明静态实例指针
 
 };
 

+ 14 - 18
View/die-bonder-ui/OriginalWnd/OriginalWnd.cpp

@@ -34,7 +34,7 @@ OriginalWnd::OriginalWnd(QWidget* parent, CameraBind* pCameraBind)
     }
     else
     {
-       // setChineseMode(this);
+        // setChineseMode(this);
     }
 
     InitForm();
@@ -49,7 +49,7 @@ OriginalWnd::~OriginalWnd()
 
 void OriginalWnd::CameraBindInit(CameraBind* pCameraBind)
 {
-    m_pCameraBind= pCameraBind;
+    m_pCameraBind = pCameraBind;
 }
 
 void OriginalWnd::RegFun()
@@ -76,6 +76,11 @@ void OriginalWnd::SwitchToConfig(const QString& name, int configId, int menuArra
     }
 }
 
+void OriginalWnd::switchMsgConfig()
+{
+    SwitchToConfig("Msg", 1, 0, false);
+}
+
 void OriginalWnd::switchToHomeConfig()
 {
     SwitchToConfig("Home", 1, 0, false);
@@ -146,6 +151,7 @@ void OriginalWnd::InitForm()
 
 void OriginalWnd::InitTreeViewManager()
 {
+    //TODO: 不行的话直接m_pCameraBind 传递当前指针,这样不会存在释放问题
     m_pdbTreeViewManager.reset(new DbTreeViewManager(ui->menuFunctionsSwitchWidget, this));
     connect(m_pdbTreeViewManager.get(), &DbTreeViewManager::RunFunSignals, this, &OriginalWnd::JRunFunSlots);
 
@@ -175,7 +181,7 @@ void OriginalWnd::Del()
 void OriginalWnd::RunOrStopSwitch()
 {
     // 目前样式切换需要调整
-    if (m_isDisabled) 
+    if (m_isDisabled)
     {
         // 当按钮处于禁用状态时,执行停止操作并启用按钮
         QString styleSheet = "QToolButton { background: #4AB832; color: #FFFFFF; }"
@@ -185,7 +191,7 @@ void OriginalWnd::RunOrStopSwitch()
         ui->startButton->setStyleSheet(styleSheet);
         m_pCameraBind->JRunAutoBond();
     }
-    else 
+    else
     {
         // 当按钮处于启用状态时,执行开始操作并禁用按钮
         QString styleSheet = "QToolButton:disabled { color: #808080; background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #F8FBFF, stop: 1 #E7ECF3); }";
@@ -217,7 +223,7 @@ bool OriginalWnd::eventFilter(QObject* obj, QEvent* event)
                     parent->addWidget(login);
                     parent->setCurrentIndex(parent->indexOf(login));
 
-                    
+
                 }
             }
         }
@@ -235,7 +241,7 @@ void OriginalWnd::timerEvent(QTimerEvent* event)
 
 void OriginalWnd::resizeEvent(QResizeEvent* event)
 {
-    if (m_pLogStateSidebar) 
+    if (m_pLogStateSidebar)
     {
         m_pLogStateSidebar->resize(m_pLogStateSidebar->width(), height());
     }
@@ -260,11 +266,11 @@ void OriginalWnd::on_SingleImageButton_clicked()
 
 void OriginalWnd::on_LogStatBut_clicked()
 {
-    if (m_pLogStateSidebar->isExpanded()) 
+    if (m_pLogStateSidebar->isExpanded())
     {
         m_pLogStateSidebar->HideSidebar();
     }
-    else 
+    else
     {
         m_pLogStateSidebar->ShowSidebar();
     }
@@ -324,34 +330,24 @@ void OriginalWnd::CreateSwitchMainPage(int nlastIndex /*= -1*/)
     }
 
     // 切换窗口
-     
     switch (nlastIndex)
     {
     case EN_WND_SWITCH::ChartsAnd:
     {
         ChartsAndCamerasWnd* chartsAndCamerasWnd = new ChartsAndCamerasWnd;
         SwitchMainPage(chartsAndCamerasWnd, ui->ChartButton);
-        //chartsAndCamerasWnd->TimerMaterialStart();
-        //mainAndSecondaryCamerasWnd->TimerMaterialStop();
-        //singleCameraOperationWnd->TimerMaterialStop();
     }
     break;
     case EN_WND_SWITCH::MainAndSecondary:
     {
         MainAndSecondaryCamerasWnd* mainAndSecondaryCamerasWnd = new MainAndSecondaryCamerasWnd;
         SwitchMainPage(mainAndSecondaryCamerasWnd, ui->DoubleImageButton);
-        //mainAndSecondaryCamerasWnd->TimerMaterialStart();
-        //chartsAndCamerasWnd->TimerMaterialStop();
-        //singleCameraOperationWnd->TimerMaterialStop();
     }
     break;
     case EN_WND_SWITCH::SingleCameraOperation:
     {
         SingleCameraOperationWnd* singleCameraOperationWnd = new SingleCameraOperationWnd;
         SwitchMainPage(singleCameraOperationWnd, ui->SingleImageButton);
-        //singleCameraOperationWnd->TimerMaterialStart();
-        //chartsAndCamerasWnd->TimerMaterialStop();
-        //mainAndSecondaryCamerasWnd->TimerMaterialStop();
     }
     break;
     default:

+ 1 - 0
View/die-bonder-ui/OriginalWnd/OriginalWnd.h

@@ -58,6 +58,7 @@ public:
     void SwitchToConfig(const QString& name, int configId, int menuArrayIndex, bool isMenuArray = true);
 
     // 切换不同配置
+    void switchMsgConfig();
     void switchToHomeConfig();
     void switchToProductionConfig();
     void switchToDiagnosisConfig();

+ 10 - 2
View/die-bonder-ui/OriginalWnd/SingleCameraOperationWnd.cpp

@@ -19,7 +19,7 @@ SingleCameraOperationWnd::SingleCameraOperationWnd(QWidget* parent)
 
     initFrom();
     m_timerMaterial = new QTimer(this);
-    connect(m_timerMaterial, &QTimer::timeout, this, &SingleCameraOperationWnd::UpdateMaterialByTimer);
+    //connect(m_timerMaterial, &QTimer::timeout, this, &SingleCameraOperationWnd::UpdateMaterialByTimer);
     m_pCViewInterface = ns_module::CViewInterface::GetInstance();
 }
 
@@ -150,6 +150,14 @@ void SingleCameraOperationWnd::initFrom()
 
     }
 }
+// 初始化静态成员
+SingleCameraOperationWnd* SingleCameraOperationWnd::m_instance = nullptr;
+SingleCameraOperationWnd* SingleCameraOperationWnd::GetInstance() {
+    if (!m_instance) {
+        m_instance = new SingleCameraOperationWnd();
+    }
+    return m_instance;
+}
 
 void SingleCameraOperationWnd::closeEvent(QCloseEvent* event) {
     // 保存滑块状态
@@ -432,7 +440,7 @@ void SingleCameraOperationWnd::initWidget() {
         BindImageOrMaterial(m_nMaterialIndex);
 
     }
-    //m_timerMaterial->start(10000);
+    m_timerMaterial->start(10000);
 
 }
 

+ 4 - 0
View/die-bonder-ui/OriginalWnd/SingleCameraOperationWnd.h

@@ -26,6 +26,9 @@ public:
     explicit SingleCameraOperationWnd(QWidget* parent = nullptr);
     ~SingleCameraOperationWnd();
 
+    // 获取唯一实例的静态方法
+    static SingleCameraOperationWnd* GetInstance();
+
     void initFrom();
     void closeEvent(QCloseEvent* event) override;
 
@@ -122,6 +125,7 @@ private:
     const int                       m_nMaterialIndex = 2;
     QTimer* m_timerMaterial;
     ns_module::CViewInterface* m_pCViewInterface;
+    static SingleCameraOperationWnd* m_instance; // 声明静态实例指针
 };
 
 #endif // SINGLECAMERAOPERATIONWND_H

+ 74 - 18
View/die-bonder-ui/Src/BondMatrixProgramPage.cpp

@@ -57,6 +57,8 @@ BondMatrixProgramPage::BondMatrixProgramPage(QWidget* parent) :
 
 	connect(ui.pushButtonSave, &QPushButton::clicked, this, [=] {
 		MatrixChangeEvent();
+		CBondMatrix* pBondMatrix = CResources::GetInstance()->GetBondMatrix();
+		pBondMatrix->LoadMatrix(BOND_DIR::OrderAndS);
 		});
 
 	connect(ui.pushButtonAddOutMatrix, &QPushButton::clicked, this, [=]() {
@@ -90,7 +92,7 @@ BondMatrixProgramPage::BondMatrixProgramPage(QWidget* parent) :
 		newMatrix.BondMatrixId = newBondMatrixID;
 		newMatrix.BondMatrixRow = 0;
 		newMatrix.BondMatrixCol = 0;
-		newMatrix.strModuleName = "UltraHead";
+		newMatrix.strModuleName = "BondHead";
 		newMatrix.iModuleId = MODULE_LIST::BondHead;
 		int newVectorIndex = m_vectBondMatrixs.size();
 
@@ -105,10 +107,21 @@ BondMatrixProgramPage::BondMatrixProgramPage(QWidget* parent) :
 	connect(ui.pushButtonSavePara, &QPushButton::clicked, this, [=] {
 		MatrixChangeEvent();
 		ParamChangeEvent();
+		CBondMatrix* pBondMatrix = CResources::GetInstance()->GetBondMatrix();
+		pBondMatrix->LoadMatrix(BOND_DIR::OrderAndS);
 		});
 	connect(ui.pushButtonSaveParaAs, &QPushButton::clicked, this, [=] {
 		ParamSaveAsEvent();
+		CBondMatrix* pBondMatrix = CResources::GetInstance()->GetBondMatrix();
+		pBondMatrix->LoadMatrix(BOND_DIR::OrderAndS);
 		});
+
+
+	connect(ui.comboBoxCurrentPara, SIGNAL(currentIndexChanged(int)), this, SLOT(onComboBoxIndexChanged(int)));
+	//connect(ui.comboBoxCurrentPara, SIGNAL(showPopup()), this, SLOT(onComboBoxPopup()));
+	//connect(ui.comboBoxCurrentPara, &QComboBox::showPopup, this, &BondMatrixProgramPage::onComboBoxPopup);
+	ui.comboBoxCurrentPara->installEventFilter(this);
+
 	//参数
 	connect(ui.comboBoxDieSource, QOverload<int>::of(&QComboBox::currentIndexChanged), this, [=](int index) {
 		if (index == 0)
@@ -460,6 +473,7 @@ XY_DOUBLE_STRUCT BondMatrixProgramPage::BondGetAxisPosition(std::string ModuleTy
 
 	return pos;
 }
+
 void BondMatrixProgramPage::AddOutMatrixPage(int vectorIndex, PROGRAM_BOND_MATRIX_STRUCT matrixData, std::vector<PROGRAM_POINT_MATRIX_STRUCT> vecSubMatrix)
 {
 	int matrixNum = m_mapSubMatrixControls.size();
@@ -499,7 +513,7 @@ void BondMatrixProgramPage::AddOutMatrixPage(int vectorIndex, PROGRAM_BOND_MATRI
 	// Add matrix title
 	QLabel* labelTitle = new QLabel(outWidget);
 	labelTitle->setObjectName(QString::fromUtf8("labelTitle"));
-	labelTitle->setText(tr("Bond Matrix ") + QString::number(vectorIndex));
+	labelTitle->setText(tr("Bond Matrix ") + QString::number(vectorIndex+1));
 	labelTitle->setStyleSheet("color: #6A78FF;height: 30px");
 	matrixGridLayout->addWidget(labelTitle, 0, 0, 1, 1);
 	vecControls.push_back(labelTitle);
@@ -549,7 +563,7 @@ void BondMatrixProgramPage::AddOutMatrixPage(int vectorIndex, PROGRAM_BOND_MATRI
 		}
 
 		subMatrix.MatrixId = newSubMatrixID;
-		subMatrix.strModuleName = "UltraHead";
+		subMatrix.strModuleName = "BondHead";
 		subMatrix.iModuleId = MODULE_LIST::BondHead;
 		subMatrix.MatrixRow = 0;
 		subMatrix.MatrixCol = 0;
@@ -587,7 +601,7 @@ void BondMatrixProgramPage::AddOutMatrixPage(int vectorIndex, PROGRAM_BOND_MATRI
 		}
 
 		//删除缓存数据
-		m_vectBondMatrixs.erase(m_vectBondMatrixs.begin() + vectorIndex);
+		m_vectBondMatrixs.erase(m_vectBondMatrixs.begin() + index);
 		//m_mapBondMatrixToSubMatrices.remove(vectorIndex);  // Remove mapping between BondMatrix and its SubMatrices
 		delete outWidget;
 		});
@@ -642,7 +656,7 @@ void BondMatrixProgramPage::AddOutMatrixPage(int vectorIndex, PROGRAM_BOND_MATRI
 	matrixGridLayout->addWidget(buttonLeftTop, 4, 3, 1, 1);  // Position the button next to LeftTopPos
 
 	connect(buttonLeftTop, &QPushButton::clicked, this, [=]() {
-		XY_DOUBLE_STRUCT position = BondGetAxisPosition("BondMatrix", m_vectBondMatrixs[vectorIndex].LeftTopPoint);
+		XY_DOUBLE_STRUCT position = BondGetAxisPosition("BondHead", m_vectBondMatrixs[vectorIndex].LeftTopPoint);
 		doubleSpinBoxLeftTopX->setValue(position.x);
 		doubleSpinBoxLeftTopY->setValue(position.y);
 		});
@@ -671,7 +685,7 @@ void BondMatrixProgramPage::AddOutMatrixPage(int vectorIndex, PROGRAM_BOND_MATRI
 	matrixGridLayout->addWidget(buttonRightTop, 5, 3, 1, 1);  // Position the button next to RightTopPos
 
 	connect(buttonRightTop, &QPushButton::clicked, this, [=]() {
-		XY_DOUBLE_STRUCT position = BondGetAxisPosition("BondMatrix", m_vectBondMatrixs[vectorIndex].RightTopPoint);
+		XY_DOUBLE_STRUCT position = BondGetAxisPosition("BondHead", m_vectBondMatrixs[vectorIndex].RightTopPoint);
 		doubleSpinBoxRightTopX->setValue(position.x);
 		doubleSpinBoxRightTopY->setValue(position.y);
 		});
@@ -700,7 +714,7 @@ void BondMatrixProgramPage::AddOutMatrixPage(int vectorIndex, PROGRAM_BOND_MATRI
 	matrixGridLayout->addWidget(buttonRightButtom, 6, 3, 1, 1);  // Position the button next to RightBottomPos
 
 	connect(buttonRightButtom, &QPushButton::clicked, this, [=]() {
-		XY_DOUBLE_STRUCT position = BondGetAxisPosition("BondMatrix", m_vectBondMatrixs[vectorIndex].RightBottomPoint);
+		XY_DOUBLE_STRUCT position = BondGetAxisPosition("BondHead", m_vectBondMatrixs[vectorIndex].RightBottomPoint);
 		doubleSpinBoxRightButtomX->setValue(position.x);
 		doubleSpinBoxRightButtomY->setValue(position.y);
 		});
@@ -747,6 +761,7 @@ void BondMatrixProgramPage::AddOutMatrixPage(int vectorIndex, PROGRAM_BOND_MATRI
 		// 添加项并使用 setData 存储 iInfoId 作为附加数据
 		comboBoxParagramSet->addItem(itemText, bondMatrix.iInfoId);
 	}
+	comboBoxParagramSet->setCurrentIndex(m_vectBondMatrixs[vectorIndex].BondInfoId-1);
 
 	// 将下拉框添加到布局中
 	matrixGridLayout->addWidget(comboBoxParagramSet, 8, 1, 1, 1);
@@ -755,8 +770,9 @@ void BondMatrixProgramPage::AddOutMatrixPage(int vectorIndex, PROGRAM_BOND_MATRI
 	vecControls.push_back(comboBoxParagramSet);
 	// 连接 QComboBox 的信号和槽
 	connect(comboBoxParagramSet, SIGNAL(currentIndexChanged(int)), this, SLOT(onComboBoxIndexChanged(int)));
-	connect(comboBoxParagramSet, SIGNAL(showPopup()), this, SLOT(onComboBoxPopup()));
-
+	//connect(, SIGNAL(showPopup()), this, SLOT(onComboBoxPopup()));
+	//connect(comboBoxParagramSet, &QComboBox::showPopup, this, &BondMatrixProgramPage::onComboBoxPopup);
+	comboBoxParagramSet->installEventFilter(this);
 
 	QPushButton* buttonParagram = new QPushButton("ShowParagram", this);
 	//buttonParagram->setFixedWidth(62);  // Set the same width for the button
@@ -848,12 +864,14 @@ void BondMatrixProgramPage::AddOutMatrixPage(int vectorIndex, PROGRAM_BOND_MATRI
 		});
 }
 
-void BondMatrixProgramPage::onComboBoxPopup() {
+void BondMatrixProgramPage::onComboBoxPopup(QComboBox* comboBox) {
 	// 获取当前的 QComboBox
-	QComboBox* comboBox = qobject_cast<QComboBox*>(sender());
+	//QComboBox* comboBox = qobject_cast<QComboBox*>(sender());
 	if (!comboBox) {
 		return;
 	}
+	int currentIndex = comboBox->currentIndex();  // 获取当前选中的索引
+	QVariant currentData = comboBox->currentData();  // 获取当前选中的附加数据(例如 iInfoId)
 
 	// 清空下拉框中的所有项
 	comboBox->clear();
@@ -866,6 +884,11 @@ void BondMatrixProgramPage::onComboBoxPopup() {
 		// 将 iInfoId 添加到下拉框
 		comboBox->addItem(itemText, bondMatrix.iInfoId);
 	}
+	// 恢复原来的选中项
+	// 通过 index 恢复选中项
+	if (currentIndex >= 0 && currentIndex < comboBox->count()) {
+		comboBox->setCurrentIndex(currentIndex);
+	}
 }
 
 //// 槽函数:每次下拉框弹出时刷新内容
@@ -1074,7 +1097,7 @@ void BondMatrixProgramPage::AddMatrixPage(int vectorIndex, int subVectorIndex, P
 	subGridLayout->addWidget(buttonLeftTop, 4, 3, 1, 1);  // 添加按钮到4行3列
 
 	connect(buttonLeftTop, &QPushButton::clicked, this, [=]() {
-		XY_DOUBLE_STRUCT position = BondGetAxisPosition("UltraHead", m_vectBondMatrixs[subVectorIndex].LeftTopPoint);
+		XY_DOUBLE_STRUCT position = BondGetAxisPosition("BondHead", m_vecSubMatrixs[subVectorIndex].LeftTopPoint);
 		doubleSpinBoxLeftTopX->setValue(position.x);  // 更新 X 轴
 		doubleSpinBoxLeftTopY->setValue(position.y);  // 更新 Y 轴
 		});
@@ -1085,7 +1108,7 @@ void BondMatrixProgramPage::AddMatrixPage(int vectorIndex, int subVectorIndex, P
 	subGridLayout->addWidget(buttonRightTop, 5, 3, 1, 1);  // 添加按钮到5行3列
 
 	connect(buttonRightTop, &QPushButton::clicked, this, [=]() {
-		XY_DOUBLE_STRUCT position = BondGetAxisPosition("UltraHead", m_vectBondMatrixs[subVectorIndex].RightTopPoint);
+		XY_DOUBLE_STRUCT position = BondGetAxisPosition("BondHead", m_vecSubMatrixs[subVectorIndex].RightTopPoint);
 		doubleSpinBoxRightTopX->setValue(position.x);  // 更新 X 轴
 		doubleSpinBoxRightTopY->setValue(position.y);  // 更新 Y 轴
 		});
@@ -1096,7 +1119,7 @@ void BondMatrixProgramPage::AddMatrixPage(int vectorIndex, int subVectorIndex, P
 	subGridLayout->addWidget(buttonRightButtom, 6, 3, 1, 1);  // 添加按钮到6行3列
 
 	connect(buttonRightButtom, &QPushButton::clicked, this, [=]() {
-		XY_DOUBLE_STRUCT position = BondGetAxisPosition("UltraHead", m_vectBondMatrixs[subVectorIndex].RightBottomPoint);
+		XY_DOUBLE_STRUCT position = BondGetAxisPosition("BondHead", m_vecSubMatrixs[subVectorIndex].RightBottomPoint);
 		doubleSpinBoxRightButtomX->setValue(position.x);  // 更新 X 轴
 		doubleSpinBoxRightButtomY->setValue(position.y);  // 更新 Y 轴
 		});
@@ -1171,11 +1194,18 @@ void BondMatrixProgramPage::AddMatrixPage(int vectorIndex, int subVectorIndex, P
 
 
 bool BondMatrixProgramPage::eventFilter(QObject* obj, QEvent* event) {
-	if (event->type() == QEvent::MouseButtonPress)
-	{
+	// 捕获鼠标点击事件(QEvent::MouseButtonPress)
+	if (event->type() == QEvent::MouseButtonPress) {
+		auto* comboBox = qobject_cast<QComboBox*>(obj);
+		if (comboBox) {
+			// 当 QComboBox 被点击时执行 onComboBoxPopup()
+			onComboBoxPopup(comboBox);
+			return false; // 拦截事件,防止进一步传播
+		}
+
+		// 处理 QLineEdit 的点击事件
 		auto* lineEdit = qobject_cast<QLineEdit*>(obj);
-		if (lineEdit)
-		{
+		if (lineEdit) {
 			int index = lineEdit->property("vectorIndex").toInt();  // 当前矩阵索引
 			int parentIndex = lineEdit->property("parentMatrixIndex").toInt();  // 父矩阵索引
 
@@ -1183,6 +1213,8 @@ bool BondMatrixProgramPage::eventFilter(QObject* obj, QEvent* event) {
 			return true; // 拦截事件
 		}
 	}
+
+
 	return QWidget::eventFilter(obj, event);
 }
 
@@ -1275,6 +1307,17 @@ int BondMatrixProgramPage::ParamSaveAsEvent()
 	m_manageDB->GetCProduct()->AddBondParam(m_curBondParam, iBondParamId);
 	int iInfoId;
 	m_manageDB->GetCProduct()->AddBondInfoData(m_curBondInfo, iInfoId);
+
+	ns_db::BOND_INFO_STRUCT newBondInfo;
+	m_manageDB->GetCProduct()->GetBondInfoData(iInfoId, newBondInfo);
+	m_vecBondInfoData.push_back(newBondInfo);// = m_manageDB->GetCProduct()->GetAllBondInfoData();
+	// 填充 QComboBox
+	ui.comboBoxCurrentPara->clear();
+	for (const auto& bondMatrix : m_vecBondInfoData) {
+		QString itemText = QString::number(bondMatrix.iInfoId);
+		ui.comboBoxCurrentPara->addItem(itemText, bondMatrix.iInfoId);
+	}
+	ui.comboBoxCurrentPara->setCurrentIndex(iInfoId-1);
 	return iInfoId;
 }
 void BondMatrixProgramPage::ParamChangeEvent()
@@ -1446,6 +1489,18 @@ void BondMatrixProgramPage::initPage()
 	{
 		return;
 	}
+
+	// 清空下拉框中的所有项
+	ui.comboBoxCurrentPara->clear();
+
+	// 重新填充下拉框选项,并更新 QMap 中的绑定关系
+	for (const auto& bondMatrix : m_vecBondInfoData) {
+		// 显示编号 iInfoId
+		QString itemText = QString::number(bondMatrix.iInfoId);
+
+		// 将 iInfoId 添加到下拉框
+		ui.comboBoxCurrentPara->addItem(itemText, bondMatrix.iInfoId);
+	}
 	UpdateShowBondInfoData(m_vectBondMatrixs[0].BondInfoId);
 	////pBondMatrix->GetPintInfoByIndex(0, m_curPointInfo);
 	//m_manageDB->GetCProduct()->GetBondInfoData(m_vectBondMatrixs[0].BondInfoId, m_curBondInfo);
@@ -1467,6 +1522,7 @@ void BondMatrixProgramPage::UpdateShowBondInfoData(UINT iInfoId) {
 	m_manageDB->GetCProduct()->GetBondParam(m_curBondInfo.iCalibPickParamId, m_curCalibPickParam);
 	m_manageDB->GetCProduct()->GetBondParam(m_curBondInfo.iBondParamId, m_curBondParam);
 
+	ui.comboBoxCurrentPara->setCurrentIndex(iInfoId-1);
 	//显示界面参数
 	UpdatePageParam();
 }

+ 1 - 1
View/die-bonder-ui/Src/BondMatrixProgramPage.h

@@ -63,7 +63,7 @@ private slots:
 
 	void UpdateShowBondInfoData(UINT iInfoId);
 	void onComboBoxIndexChanged(int index);
-	void onComboBoxPopup();
+	void onComboBoxPopup(QComboBox* comboBox);
 
 private:
 	Ui::BondMatrixProgramPageClass ui;

+ 4 - 1
View/die-bonder-ui/Src/BondMatrixProgramPage.ui

@@ -102,7 +102,7 @@
      <rect>
       <x>0</x>
       <y>0</y>
-      <width>412</width>
+      <width>408</width>
       <height>1282</height>
      </rect>
     </property>
@@ -700,6 +700,9 @@
     </rect>
    </property>
    <layout class="QHBoxLayout" name="horizontalLayout_2">
+    <item>
+     <widget class="QComboBox" name="comboBoxCurrentPara"/>
+    </item>
     <item>
      <spacer name="horizontalSpacer_2">
       <property name="orientation">

+ 4 - 3
View/die-bonder-ui/Src/DiagnosisPage/DiagnosisPage.cpp

@@ -24,7 +24,7 @@ void DiagnosisPage::Init()
     ui.axisListTree->setHeaderHidden(true);
     ui.axisListTree->setEditTriggers(QAbstractItemView::NoEditTriggers);
 
-    ns_module::CViewInterface* pCViewInterface = ns_module::CViewInterface::GetInstance();
+    QSharedPointer<ns_module::CViewInterface> pCViewInterface(ns_module::CViewInterface::GetInstance());
 
     if (pCViewInterface)
     {
@@ -324,8 +324,7 @@ void DiagnosisPage::on_axisListTree_doubleClicked(const QModelIndex& index)
                 QString strMode = QString::fromLocal8Bit(a->GetAxisName().c_str());
                 if (strMode == currentItem)
                 {
-                    //m_pCurrOpenCAxis.reset(a);
-                    m_pCurrOpenCAxis = a;
+                    m_pCurrOpenCAxis.reset(a);
 
                     SwitchOperationAxisPage(true);
                     break;
@@ -342,10 +341,12 @@ void DiagnosisPage::on_xAxisDisable_clicked()
     {
         m_pCurrOpenCAxis->AxisOff();
         strText = tr("Enable", "¿ªÊ¹ÄÜ");
+        m_IsDriveEnabled = false;
     }
     else
     {
         m_pCurrOpenCAxis->AxisOn();
+        m_IsDriveEnabled = true;
     }
 
     ui.xAxisDisable->setText(strText);

+ 1 - 1
View/die-bonder-ui/Src/DiagnosisPage/DiagnosisPage.h

@@ -82,7 +82,7 @@ private:
     /**当前轴指针
      */
     //std::unique_ptr<CAxis>  m_pCurrOpenCAxis;
-    CAxis*                  m_pCurrOpenCAxis = nullptr;
+    QSharedPointer<CAxis>   m_pCurrOpenCAxis;
 
     /**使能
      */

+ 45 - 6
View/die-bonder-ui/Src/ProgrammPage.cpp

@@ -5,6 +5,9 @@ ProgrammPage::ProgrammPage(QWidget *parent)
 {
 	ui.setupUi(this);
 
+	// 连接选项卡切换信号
+	connect(ui.tabWidget, &QTabWidget::currentChanged, this, &ProgrammPage::onTabChanged);
+
 	initPage();
 }
 
@@ -16,13 +19,49 @@ ProgrammPage::~ProgrammPage()
 
 void ProgrammPage::initPage()
 {
+
 	this->setAttribute(Qt::WA_DeleteOnClose);
 
-	m_BondMatrixProgramPage = new BondMatrixProgramPage(this);
-	m_pWaffleProgrammPage	= new WaffleProgramPage(this);
-	m_WaferProgramPage		= new WaferProgramPage(this);
+    onTabChanged(0);
+
+	//m_BondMatrixProgramPage = new BondMatrixProgramPage(this);
+	//m_pWaffleProgrammPage	= new WaffleProgramPage(this);
+	//m_WaferProgramPage		= new WaferProgramPage(this);
+
+	//ui.verticalLayoutBondMatrix->addWidget(m_BondMatrixProgramPage);
+	//ui.verticalLayoutWaffleMatrix->addWidget(m_pWaffleProgrammPage);
+	//ui.verticalLayoutWaferMatrix->addWidget(m_WaferProgramPage);
+}
+
+void ProgrammPage::onTabChanged(int index)
+{
+    switch (index)
+    {
+        case 0: // Bond Matrix 页面
+            if (!m_BondMatrixProgramPage)
+            {
+                qDebug() << "创建 BondMatrixProgramPage";
+                m_BondMatrixProgramPage = new BondMatrixProgramPage(this);
+                ui.verticalLayoutBondMatrix->addWidget(m_BondMatrixProgramPage);
+            }
+            break;
+
+        case 1: // Wafer 页面
+            if (!m_WaferProgramPage)
+            {
+                qDebug() << "创建 WaferProgramPage";
+                m_WaferProgramPage = new WaferProgramPage(this);
+                ui.verticalLayoutWaferMatrix->addWidget(m_WaferProgramPage);
+            }
+            break;
 
-	ui.verticalLayoutBondMatrix->addWidget(m_BondMatrixProgramPage);
-	ui.verticalLayoutWaffleMatrix->addWidget(m_pWaffleProgrammPage);
-	ui.verticalLayoutWaferMatrix->addWidget(m_WaferProgramPage);
+        case 2: // Waffle 页面
+            if (!m_pWaffleProgrammPage)
+            {
+                qDebug() << "创建 WaffleProgramPage";
+                m_pWaffleProgrammPage = new WaffleProgramPage(this);
+                ui.verticalLayoutWaffleMatrix->addWidget(m_pWaffleProgrammPage);
+            }
+            break;
+    }
 }

+ 2 - 0
View/die-bonder-ui/Src/ProgrammPage.h

@@ -26,6 +26,8 @@ public:
 private:
 	void initPage();
 
+	void onTabChanged(int index);
+
 private:
 	Ui::ProgrammPageClass ui;
 

+ 17 - 2
View/die-bonder-ui/Src/WaferProgramPage.cpp

@@ -36,6 +36,8 @@ WaferProgramPage::WaferProgramPage(QWidget* parent)
     connect(ui.pushButtonSave, &QPushButton::clicked, this, [=]() {
         m_pProduct->SetAllWaferMatrix(m_vecWaferMatrix);
         CProduct* _Product = m_manageDB->GetCProduct();
+        CWaferMatrix* pMatrix = CResources::GetInstance()->GetWaferMatrix();
+        pMatrix->LoadMatrix(MATRIX_SEARCH_DIR::DIR_S);
         });
 
     connect(ui.pushButtonAdd, &QPushButton::clicked, this, [=]() {
@@ -247,7 +249,7 @@ void WaferProgramPage::AddMatrixPage(int vectorIndex, _PROGRAM_WAFER_MATRIX_STRU
 
     connect(buttonRightTop, &QPushButton::clicked, this, [=]() {
         // 获取+更新位置
-        XY_DOUBLE_STRUCT position = WaferGetAxisPosition("WaferTable", m_vecWaferMatrix[vectorIndex].LeftTopPoint);
+        XY_DOUBLE_STRUCT position = WaferGetAxisPosition("WaferTable", m_vecWaferMatrix[vectorIndex].RightTopPoint);
 
         // 更新 DoubleSpinBox 的值
         doubleSpinBoxRightTopX->setValue(position.x);  // 更新 X 轴
@@ -281,7 +283,7 @@ void WaferProgramPage::AddMatrixPage(int vectorIndex, _PROGRAM_WAFER_MATRIX_STRU
 
     connect(buttonRightButtom, &QPushButton::clicked, this, [=]() {
         // 获取+更新位置
-        XY_DOUBLE_STRUCT position = WaferGetAxisPosition("WaferTable", m_vecWaferMatrix[vectorIndex].LeftTopPoint);
+        XY_DOUBLE_STRUCT position = WaferGetAxisPosition("WaferTable", m_vecWaferMatrix[vectorIndex].RightBottomPoint);
 
         // 更新 DoubleSpinBox 的值
         doubleSpinBoxRightButtomX->setValue(position.x);  // 更新 X 轴
@@ -311,8 +313,21 @@ void WaferProgramPage::AddMatrixPage(int vectorIndex, _PROGRAM_WAFER_MATRIX_STRU
     line->setStyleSheet("background-color: #C7CAEB;");
     outMatrixGridLayout->addWidget(line);
 
+    QSpacerItem* spacer = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
+
+    // 移除弹簧
+    for (int i = 0; i < ui.verticalLayout->count(); ++i) {
+        if (ui.verticalLayout->itemAt(i)->spacerItem()) {
+            // 找到并移除弹簧
+            ui.verticalLayout->removeItem(ui.verticalLayout->itemAt(i));
+            break;
+        }
+    }
     ui.verticalLayout->addWidget(groupBox);
 
+    // 重新添加弹簧到布局的最下方
+    ui.verticalLayout->addItem(spacer);
+
     m_mapWaferGroupBoxIndex.insert(groupBox, vectorIndex);
 
     // 连接信号和槽

+ 23 - 12
View/die-bonder-ui/Src/WaffleProgramPage.cpp

@@ -47,7 +47,8 @@ WaffleProgramPage::WaffleProgramPage(QWidget* parent)
     connect(ui.pushButtonSave, &QPushButton::clicked, this, [=]() {
         m_pProduct->SetAllWaffleMatrix(m_vecWaffleMatrix);
         m_pProduct->SetAllWaffleDieMatrix(m_vecSubWaffleMatrix);
-
+		CWafflePackMatrix* pMatrix = CResources::GetInstance()->GetWafflePackMatrix();
+		pMatrix->LoadMatrix(MATRIX_SEARCH_DIR::DIR_S);
 		CProduct* _Product = m_manageDB->GetCProduct();
         });
 
@@ -135,8 +136,8 @@ void WaffleProgramPage::AddMatrixPage(int vectorIndex, PROGRAM_WAFFLE_MATRIX_STR
 	boxGridLayout->setObjectName(QString::fromUtf8("Box GridLayout"));
 
 	QHBoxLayout* buttonLayout = new QHBoxLayout();
-	QSpacerItem* item = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
-	buttonLayout->addSpacerItem(item);
+	/*QSpacerItem* item = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
+	buttonLayout->addSpacerItem(item);*/
 
 	//QPushButton* pushButtonAddOutMatrix = new QPushButton();
 	//pushButtonAddOutMatrix->setObjectName(QString::fromUtf8("button Add"));
@@ -156,7 +157,7 @@ void WaffleProgramPage::AddMatrixPage(int vectorIndex, PROGRAM_WAFFLE_MATRIX_STR
 
 	QLabel* labelTitle = new QLabel(outWidget);
 	labelTitle->setObjectName(QString::fromUtf8("labelTitle"));
-	labelTitle->setText(tr("Matrix ") + QString::number(vectorIndex));
+	labelTitle->setText(tr("Matrix ") + QString::number(vectorIndex+1));
 	labelTitle->setStyleSheet("color: #6A78FF;height: 30px");
 	matrixGridLayout->addWidget(labelTitle, 0, 0, 1, 1);
 	vecControls.push_back(labelTitle);
@@ -316,7 +317,7 @@ void WaffleProgramPage::AddMatrixPage(int vectorIndex, PROGRAM_WAFFLE_MATRIX_STR
 	buttonRightTop->setFixedWidth(62);  // Set the same width for the button
 	matrixGridLayout->addWidget(buttonRightTop, 5, 3, 1, 1);  // Position the button next to RightTopPos
 	connect(buttonRightTop, &QPushButton::clicked, this, [=]() {
-		XY_DOUBLE_STRUCT position = WaffleGetAxisPosition("WaffleHead", m_vecWaffleMatrix[vectorIndex].LeftTopPoint);
+		XY_DOUBLE_STRUCT position = WaffleGetAxisPosition("WaffleHead", m_vecWaffleMatrix[vectorIndex].RightTopPoint);
 		doubleSpinBoxRightTopX->setValue(position.x);  // Update X axis
 		doubleSpinBoxRightTopY->setValue(position.y);  // Update Y axis
 		});
@@ -343,7 +344,7 @@ void WaffleProgramPage::AddMatrixPage(int vectorIndex, PROGRAM_WAFFLE_MATRIX_STR
 	buttonRightButtom->setFixedWidth(62);  // Set the same width for the button
 	matrixGridLayout->addWidget(buttonRightButtom, 6, 3, 1, 1);  // Position the button next to RightBottomPos
 	connect(buttonRightButtom, &QPushButton::clicked, this, [=]() {
-		XY_DOUBLE_STRUCT position = WaffleGetAxisPosition("WaffleHead", m_vecWaffleMatrix[vectorIndex].LeftTopPoint);
+		XY_DOUBLE_STRUCT position = WaffleGetAxisPosition("WaffleHead", m_vecWaffleMatrix[vectorIndex].RightBottomPoint);
 		doubleSpinBoxRightButtomX->setValue(position.x);  // Update X axis
 		doubleSpinBoxRightButtomY->setValue(position.y);  // Update Y axis
 		});
@@ -379,8 +380,21 @@ void WaffleProgramPage::AddMatrixPage(int vectorIndex, PROGRAM_WAFFLE_MATRIX_STR
 
 	outWidget->setLayout(outMatrixGridLayout);
 
+	QSpacerItem* spacer = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
+
+	// 移除弹簧
+	for (int i = 0; i < ui.verticalLayout->count(); ++i) {
+		if (ui.verticalLayout->itemAt(i)->spacerItem()) {
+			// 找到并移除弹簧
+			ui.verticalLayout->removeItem(ui.verticalLayout->itemAt(i));
+			break;
+		}
+	}
 	ui.verticalLayout->addWidget(outWidget);
 
+	// 重新添加弹簧到布局的最下方
+	ui.verticalLayout->addItem(spacer);
+
 	m_mapOutWidgetIndex.insert(outWidget, vectorIndex);
 
 	for (int j = 0; j < matrixData.VecDieMatrixId.size(); j++)
@@ -394,9 +408,6 @@ void WaffleProgramPage::AddMatrixPage(int vectorIndex, PROGRAM_WAFFLE_MATRIX_STR
 		}
 	}
 
-	QSpacerItem* vSpacer = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
-	ui.verticalLayout->addItem(vSpacer);
-
 	//for (int i = 0; i = vecSubMatrix.size(); i++)
 	//{
 	//	AddSubMatrixPage(i, vecSubMatrix[i], outMatrixGridLayout);
@@ -617,7 +628,7 @@ void WaffleProgramPage::AddSubMatrixPage(int vectorIndex, int subVectorIndex, PR
 	subGridLayout->addWidget(buttonLeftTop, 4, 3, 1, 1);  // 添加按钮到4行3列
 
 	connect(buttonLeftTop, &QPushButton::clicked, this, [=]() {
-		XY_DOUBLE_STRUCT position = WaffleGetAxisPosition("WaffleHead", m_vecWaffleMatrix[subVectorIndex].LeftTopPoint);
+		XY_DOUBLE_STRUCT position = WaffleGetAxisPosition("WaffleHead", m_vecSubWaffleMatrix[subVectorIndex].LeftTopPoint);
 		doubleSpinBoxLeftTopX->setValue(position.x);  // 更新 X 轴
 		doubleSpinBoxLeftTopY->setValue(position.y);  // 更新 Y 轴
 		});
@@ -628,7 +639,7 @@ void WaffleProgramPage::AddSubMatrixPage(int vectorIndex, int subVectorIndex, PR
 	subGridLayout->addWidget(buttonRightTop, 5, 3, 1, 1);  // 添加按钮到5行3列
 
 	connect(buttonRightTop, &QPushButton::clicked, this, [=]() {
-		XY_DOUBLE_STRUCT position = WaffleGetAxisPosition("WaffleHead", m_vecWaffleMatrix[subVectorIndex].RightTopPoint);
+		XY_DOUBLE_STRUCT position = WaffleGetAxisPosition("WaffleHead", m_vecSubWaffleMatrix[subVectorIndex].RightTopPoint);
 		doubleSpinBoxRightTopX->setValue(position.x);  // 更新 X 轴
 		doubleSpinBoxRightTopY->setValue(position.y);  // 更新 Y 轴
 		});
@@ -639,7 +650,7 @@ void WaffleProgramPage::AddSubMatrixPage(int vectorIndex, int subVectorIndex, PR
 	subGridLayout->addWidget(buttonRightButtom, 6, 3, 1, 1);  // 添加按钮到6行3列
 
 	connect(buttonRightButtom, &QPushButton::clicked, this, [=]() {
-		XY_DOUBLE_STRUCT position = WaffleGetAxisPosition("WaffleHead", m_vecWaffleMatrix[subVectorIndex].RightBottomPoint);
+		XY_DOUBLE_STRUCT position = WaffleGetAxisPosition("WaffleHead", m_vecSubWaffleMatrix[subVectorIndex].RightBottomPoint);
 		doubleSpinBoxRightButtomX->setValue(position.x);  // 更新 X 轴
 		doubleSpinBoxRightButtomY->setValue(position.y);  // 更新 Y 轴
 		});