|
@@ -115,6 +115,30 @@ XY_DOUBLE_STRUCT WaffleProgramPage::WaffleGetAxisPosition(std::string ModuleType
|
|
|
m_pProgramCViewInterface->GetViewMotion()->GetAxisPosition(ModuleType, "X", pos.x);
|
|
|
m_pProgramCViewInterface->GetViewMotion()->GetAxisPosition(ModuleType, "Y", pos.y);
|
|
|
|
|
|
+ m_pProgramCViewInterface->GetViewMotion()->ModuleMoveTo(ModuleType, "X", pos.x);
|
|
|
+ m_pProgramCViewInterface->GetViewMotion()->ModuleMoveTo(ModuleType, "Y", pos.y);
|
|
|
+
|
|
|
+ return pos;
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+XY_DOUBLE_STRUCT WaffleProgramPage::WaffleMoveToXYAxisPosition(std::string ModuleType, XY_DOUBLE_STRUCT& pos)
|
|
|
+{
|
|
|
+ if (m_pProgramCViewInterface == nullptr)
|
|
|
+ {
|
|
|
+ XY_DOUBLE_STRUCT errorPt = pos; // 可以根据需要返回一个错误状态
|
|
|
+
|
|
|
+ // 弹出消息框显示位置
|
|
|
+ QString positionString = QString("Unable to retrieve axis position for module type: %1").arg(QString::fromStdString(ModuleType));
|
|
|
+ QMessageBox::information(this, "Axis Position Error", positionString);
|
|
|
+
|
|
|
+
|
|
|
+ return errorPt;
|
|
|
+ }
|
|
|
+
|
|
|
+ m_pProgramCViewInterface->GetViewMotion()->ModuleMoveTo(ModuleType, "X", pos.x);
|
|
|
+ m_pProgramCViewInterface->GetViewMotion()->ModuleMoveTo(ModuleType, "Y", pos.y);
|
|
|
+
|
|
|
return pos;
|
|
|
}
|
|
|
|
|
@@ -166,7 +190,7 @@ void WaffleProgramPage::AddMatrixPage(int vectorIndex, PROGRAM_WAFFLE_MATRIX_STR
|
|
|
QPushButton* pushButtonAdd = new QPushButton(outWidget);
|
|
|
pushButtonAdd->setObjectName(QString::fromUtf8("button Add"));
|
|
|
pushButtonAdd->setText(tr("Add sub Matrix"));
|
|
|
- matrixGridLayout->addWidget(pushButtonAdd, 0, 2, 1, 2);
|
|
|
+ matrixGridLayout->addWidget(pushButtonAdd, 0, 2, 1, 3);
|
|
|
pushButtonAdd->setProperty("type", "default");
|
|
|
|
|
|
connect(pushButtonAdd, &QPushButton::clicked, this, [=]() {
|
|
@@ -252,7 +276,7 @@ void WaffleProgramPage::AddMatrixPage(int vectorIndex, PROGRAM_WAFFLE_MATRIX_STR
|
|
|
|
|
|
SpinBox* spinBoxRow = new SpinBox(outWidget);
|
|
|
spinBoxRow->setObjectName(QString::fromUtf8("spinBoxRow"));
|
|
|
- spinBoxRow->setFixedWidth(100); // Set fixed width to 100
|
|
|
+ spinBoxRow->setFixedWidth(95); // Set fixed width to 95
|
|
|
matrixGridLayout->addWidget(spinBoxRow, 2, 1, 1, 1);
|
|
|
vecControls.push_back(spinBoxRow);
|
|
|
|
|
@@ -264,7 +288,7 @@ void WaffleProgramPage::AddMatrixPage(int vectorIndex, PROGRAM_WAFFLE_MATRIX_STR
|
|
|
|
|
|
SpinBox* spinBoxCol = new SpinBox(outWidget);
|
|
|
spinBoxCol->setObjectName(QString::fromUtf8("spinBoxCol"));
|
|
|
- spinBoxCol->setFixedWidth(100); // Set fixed width to 100
|
|
|
+ spinBoxCol->setFixedWidth(95); // Set fixed width to 95
|
|
|
matrixGridLayout->addWidget(spinBoxCol, 2, 2, 1, 1);
|
|
|
vecControls.push_back(spinBoxCol);
|
|
|
|
|
@@ -276,24 +300,34 @@ void WaffleProgramPage::AddMatrixPage(int vectorIndex, PROGRAM_WAFFLE_MATRIX_STR
|
|
|
|
|
|
DoubleSpinBox* doubleSpinBoxLeftTopX = new DoubleSpinBox(outWidget);
|
|
|
doubleSpinBoxLeftTopX->setObjectName(QString::fromUtf8("doubleSpinBoxLeftTopX"));
|
|
|
- doubleSpinBoxLeftTopX->setFixedWidth(100); // Set fixed width to 100
|
|
|
+ doubleSpinBoxLeftTopX->setFixedWidth(95); // Set fixed width to 95
|
|
|
matrixGridLayout->addWidget(doubleSpinBoxLeftTopX, 4, 1, 1, 1);
|
|
|
vecControls.push_back(doubleSpinBoxLeftTopX);
|
|
|
|
|
|
DoubleSpinBox* doubleSpinBoxLeftTopY = new DoubleSpinBox(outWidget);
|
|
|
doubleSpinBoxLeftTopY->setObjectName(QString::fromUtf8("doubleSpinBoxLeftTopY"));
|
|
|
- doubleSpinBoxLeftTopY->setFixedWidth(100); // Set fixed width to 100
|
|
|
+ doubleSpinBoxLeftTopY->setFixedWidth(95); // Set fixed width to 95
|
|
|
matrixGridLayout->addWidget(doubleSpinBoxLeftTopY, 4, 2, 1, 1);
|
|
|
vecControls.push_back(doubleSpinBoxLeftTopY);
|
|
|
|
|
|
- QPushButton* buttonLeftTop = new QPushButton("Get Pos", this);
|
|
|
- buttonLeftTop->setFixedWidth(62); // Set the same width for the button
|
|
|
+ QPushButton* buttonLeftTop = new QPushButton("GP", this);
|
|
|
+ buttonLeftTop->setFixedWidth(30); // Set the same width for the button
|
|
|
matrixGridLayout->addWidget(buttonLeftTop, 4, 3, 1, 1); // Position the button next to LeftTopPos
|
|
|
connect(buttonLeftTop, &QPushButton::clicked, this, [=]() {
|
|
|
XY_DOUBLE_STRUCT position = WaffleGetAxisPosition("WaffleHead", m_vecWaffleMatrix[vectorIndex].LeftTopPoint);
|
|
|
doubleSpinBoxLeftTopX->setValue(position.x); // Update X axis
|
|
|
doubleSpinBoxLeftTopY->setValue(position.y); // Update Y axis
|
|
|
});
|
|
|
+ //MoveTo
|
|
|
+ QPushButton* buttonMoveToLeftTop = new QPushButton("MT", this);
|
|
|
+ buttonMoveToLeftTop->setFixedWidth(30); // Set the same width for the button
|
|
|
+ matrixGridLayout->addWidget(buttonMoveToLeftTop, 4, 4, 1, 1); // Position the button next to LeftTopPos
|
|
|
+ connect(buttonMoveToLeftTop, &QPushButton::clicked, this, [=]() {
|
|
|
+ XY_DOUBLE_STRUCT position = WaffleMoveToXYAxisPosition("WaffleHead", m_vecWaffleMatrix[vectorIndex].LeftTopPoint);
|
|
|
+ //doubleSpinBoxLeftTopX->setValue(position.x); // Update X axis
|
|
|
+ //doubleSpinBoxLeftTopY->setValue(position.y); // Update Y axis
|
|
|
+ });
|
|
|
+
|
|
|
|
|
|
QLabel* labelRightTopPos = new QLabel(outWidget);
|
|
|
labelRightTopPos->setObjectName(QString::fromUtf8("labelRightTopPos"));
|
|
@@ -303,18 +337,18 @@ void WaffleProgramPage::AddMatrixPage(int vectorIndex, PROGRAM_WAFFLE_MATRIX_STR
|
|
|
|
|
|
DoubleSpinBox* doubleSpinBoxRightTopX = new DoubleSpinBox(outWidget);
|
|
|
doubleSpinBoxRightTopX->setObjectName(QString::fromUtf8("doubleSpinBoxRightTopX"));
|
|
|
- doubleSpinBoxRightTopX->setFixedWidth(100); // Set fixed width to 100
|
|
|
+ doubleSpinBoxRightTopX->setFixedWidth(95); // Set fixed width to 95
|
|
|
matrixGridLayout->addWidget(doubleSpinBoxRightTopX, 5, 1, 1, 1);
|
|
|
vecControls.push_back(doubleSpinBoxRightTopX);
|
|
|
|
|
|
DoubleSpinBox* doubleSpinBoxRightTopY = new DoubleSpinBox(outWidget);
|
|
|
doubleSpinBoxRightTopY->setObjectName(QString::fromUtf8("doubleSpinBoxRightTopY"));
|
|
|
- doubleSpinBoxRightTopY->setFixedWidth(100); // Set fixed width to 100
|
|
|
+ doubleSpinBoxRightTopY->setFixedWidth(95); // Set fixed width to 95
|
|
|
matrixGridLayout->addWidget(doubleSpinBoxRightTopY, 5, 2, 1, 1);
|
|
|
vecControls.push_back(doubleSpinBoxRightTopY);
|
|
|
|
|
|
- QPushButton* buttonRightTop = new QPushButton("Get Pos", this);
|
|
|
- buttonRightTop->setFixedWidth(62); // Set the same width for the button
|
|
|
+ QPushButton* buttonRightTop = new QPushButton("GP", this);
|
|
|
+ buttonRightTop->setFixedWidth(30); // 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].RightTopPoint);
|
|
@@ -322,6 +356,14 @@ void WaffleProgramPage::AddMatrixPage(int vectorIndex, PROGRAM_WAFFLE_MATRIX_STR
|
|
|
doubleSpinBoxRightTopY->setValue(position.y); // Update Y axis
|
|
|
});
|
|
|
|
|
|
+ //MoveTo
|
|
|
+ QPushButton* buttonMoveRightTop = new QPushButton("MT", this);
|
|
|
+ buttonMoveRightTop->setFixedWidth(30); // Set the same width for the button
|
|
|
+ matrixGridLayout->addWidget(buttonMoveRightTop, 5, 4, 1, 1); // Position the button next to LeftTopPos
|
|
|
+ connect(buttonMoveRightTop, &QPushButton::clicked, this, [=]() {
|
|
|
+ XY_DOUBLE_STRUCT position = WaffleMoveToXYAxisPosition("WaffleHead", m_vecWaffleMatrix[vectorIndex].RightTopPoint);
|
|
|
+ });
|
|
|
+
|
|
|
QLabel* labelRightButtomPos = new QLabel(outWidget);
|
|
|
labelRightButtomPos->setObjectName(QString::fromUtf8("labelRightButtomPos"));
|
|
|
labelRightButtomPos->setText(tr("Right Buttom pos"));
|
|
@@ -330,18 +372,18 @@ void WaffleProgramPage::AddMatrixPage(int vectorIndex, PROGRAM_WAFFLE_MATRIX_STR
|
|
|
|
|
|
DoubleSpinBox* doubleSpinBoxRightButtomX = new DoubleSpinBox(outWidget);
|
|
|
doubleSpinBoxRightButtomX->setObjectName(QString::fromUtf8("doubleSpinBoxRightButtomX"));
|
|
|
- doubleSpinBoxRightButtomX->setFixedWidth(100); // Set fixed width to 100
|
|
|
+ doubleSpinBoxRightButtomX->setFixedWidth(95); // Set fixed width to 95
|
|
|
matrixGridLayout->addWidget(doubleSpinBoxRightButtomX, 6, 1, 1, 1);
|
|
|
vecControls.push_back(doubleSpinBoxRightButtomX);
|
|
|
|
|
|
DoubleSpinBox* doubleSpinBoxRightButtomY = new DoubleSpinBox(outWidget);
|
|
|
doubleSpinBoxRightButtomY->setObjectName(QString::fromUtf8("doubleSpinBoxRightButtomY"));
|
|
|
- doubleSpinBoxRightButtomY->setFixedWidth(100); // Set fixed width to 100
|
|
|
+ doubleSpinBoxRightButtomY->setFixedWidth(95); // Set fixed width to 95
|
|
|
matrixGridLayout->addWidget(doubleSpinBoxRightButtomY, 6, 2, 1, 1);
|
|
|
vecControls.push_back(doubleSpinBoxRightTopX);
|
|
|
|
|
|
- QPushButton* buttonRightButtom = new QPushButton("Get Pos", this);
|
|
|
- buttonRightButtom->setFixedWidth(62); // Set the same width for the button
|
|
|
+ QPushButton* buttonRightButtom = new QPushButton("GP", this);
|
|
|
+ buttonRightButtom->setFixedWidth(30); // 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].RightBottomPoint);
|
|
@@ -349,6 +391,14 @@ void WaffleProgramPage::AddMatrixPage(int vectorIndex, PROGRAM_WAFFLE_MATRIX_STR
|
|
|
doubleSpinBoxRightButtomY->setValue(position.y); // Update Y axis
|
|
|
});
|
|
|
|
|
|
+ //MoveTo
|
|
|
+ QPushButton* buttonMoveRightButtom = new QPushButton("MT", this);
|
|
|
+ buttonMoveRightButtom->setFixedWidth(30); // Set the same width for the button
|
|
|
+ matrixGridLayout->addWidget(buttonMoveRightButtom, 6, 4, 1, 1); // Position the button next to LeftTopPos
|
|
|
+ connect(buttonMoveRightButtom, &QPushButton::clicked, this, [=]() {
|
|
|
+ XY_DOUBLE_STRUCT position = WaffleMoveToXYAxisPosition("WaffleHead", m_vecWaffleMatrix[vectorIndex].RightBottomPoint);
|
|
|
+ });
|
|
|
+
|
|
|
QLabel* labelNoBondPts = new QLabel(outWidget);
|
|
|
labelNoBondPts->setObjectName(QString::fromUtf8("labelNoBondPts"));
|
|
|
labelNoBondPts->setText(tr("No Bond Points"));
|
|
@@ -357,7 +407,7 @@ void WaffleProgramPage::AddMatrixPage(int vectorIndex, PROGRAM_WAFFLE_MATRIX_STR
|
|
|
|
|
|
QLineEdit* lineEditNoBondPts = new QLineEdit(outWidget);
|
|
|
lineEditNoBondPts->setObjectName(QString::fromUtf8("lineEditNoBondPts"));
|
|
|
- matrixGridLayout->addWidget(lineEditNoBondPts, 7, 1, 1, 3);
|
|
|
+ matrixGridLayout->addWidget(lineEditNoBondPts, 7, 1, 1, 4);
|
|
|
vecControls.push_back(lineEditNoBondPts);
|
|
|
|
|
|
lineEditNoBondPts->setReadOnly(true);
|
|
@@ -485,7 +535,7 @@ void WaffleProgramPage::AddSubMatrixPage(int vectorIndex, int subVectorIndex, PR
|
|
|
QPushButton* pushButtonDelete = new QPushButton(subWidget);
|
|
|
pushButtonDelete->setObjectName(QString::fromUtf8("button delete"));
|
|
|
pushButtonDelete->setText(tr("Delete"));
|
|
|
- subGridLayout->addWidget(pushButtonDelete, 0, 3, 1, 1);
|
|
|
+ subGridLayout->addWidget(pushButtonDelete, 0, 3, 1, 2);
|
|
|
|
|
|
connect(pushButtonDelete, &QPushButton::clicked, this, [=]() {
|
|
|
|
|
@@ -554,15 +604,15 @@ void WaffleProgramPage::AddSubMatrixPage(int vectorIndex, int subVectorIndex, PR
|
|
|
|
|
|
DoubleSpinBox* doubleSpinBoxLeftTopX = new DoubleSpinBox(subWidget);
|
|
|
doubleSpinBoxLeftTopX->setObjectName(QString::fromUtf8("doubleSpinBoxLeftTopX"));
|
|
|
- doubleSpinBoxLeftTopX->setFixedWidth(100); // Set fixed width to 100
|
|
|
- doubleSpinBoxLeftTopX->setFixedWidth(100); // Set fixed width to 100
|
|
|
+ doubleSpinBoxLeftTopX->setFixedWidth(95); // Set fixed width to 95
|
|
|
+ doubleSpinBoxLeftTopX->setFixedWidth(95); // Set fixed width to 95
|
|
|
subGridLayout->addWidget(doubleSpinBoxLeftTopX, 4, 1, 1, 1);
|
|
|
vecControls.push_back(doubleSpinBoxLeftTopX);
|
|
|
|
|
|
DoubleSpinBox* doubleSpinBoxLeftTopY = new DoubleSpinBox(subWidget);
|
|
|
doubleSpinBoxLeftTopY->setObjectName(QString::fromUtf8("doubleSpinBoxLeftTopY"));
|
|
|
- doubleSpinBoxLeftTopY->setFixedWidth(100); // Set fixed width to 100
|
|
|
- doubleSpinBoxLeftTopY->setFixedWidth(100); // Set fixed width to 100
|
|
|
+ doubleSpinBoxLeftTopY->setFixedWidth(95); // Set fixed width to 95
|
|
|
+ doubleSpinBoxLeftTopY->setFixedWidth(95); // Set fixed width to 95
|
|
|
subGridLayout->addWidget(doubleSpinBoxLeftTopY, 4, 2, 1, 1);
|
|
|
vecControls.push_back(doubleSpinBoxLeftTopY);
|
|
|
|
|
@@ -574,13 +624,13 @@ void WaffleProgramPage::AddSubMatrixPage(int vectorIndex, int subVectorIndex, PR
|
|
|
|
|
|
DoubleSpinBox* doubleSpinBoxRightTopX = new DoubleSpinBox(subWidget);
|
|
|
doubleSpinBoxRightTopX->setObjectName(QString::fromUtf8("doubleSpinBoxRightTopX"));
|
|
|
- doubleSpinBoxRightTopX->setFixedWidth(100); // Set fixed width to 100
|
|
|
+ doubleSpinBoxRightTopX->setFixedWidth(95); // Set fixed width to 95
|
|
|
subGridLayout->addWidget(doubleSpinBoxRightTopX, 5, 1, 1, 1);
|
|
|
vecControls.push_back(doubleSpinBoxRightTopX);
|
|
|
|
|
|
DoubleSpinBox* doubleSpinBoxRightTopY = new DoubleSpinBox(subWidget);
|
|
|
doubleSpinBoxRightTopY->setObjectName(QString::fromUtf8("doubleSpinBoxRightTopY"));
|
|
|
- doubleSpinBoxRightTopY->setFixedWidth(100); // Set fixed width to 100
|
|
|
+ doubleSpinBoxRightTopY->setFixedWidth(95); // Set fixed width to 95
|
|
|
subGridLayout->addWidget(doubleSpinBoxRightTopY, 5, 2, 1, 1);
|
|
|
vecControls.push_back(doubleSpinBoxRightTopY);
|
|
|
|
|
@@ -592,13 +642,13 @@ void WaffleProgramPage::AddSubMatrixPage(int vectorIndex, int subVectorIndex, PR
|
|
|
|
|
|
DoubleSpinBox* doubleSpinBoxRightButtomX = new DoubleSpinBox(subWidget);
|
|
|
doubleSpinBoxRightButtomX->setObjectName(QString::fromUtf8("doubleSpinBoxRightButtomX"));
|
|
|
- doubleSpinBoxRightButtomX->setFixedWidth(100); // Set fixed width to 100
|
|
|
+ doubleSpinBoxRightButtomX->setFixedWidth(95); // Set fixed width to 95
|
|
|
subGridLayout->addWidget(doubleSpinBoxRightButtomX, 6, 1, 1, 1);
|
|
|
vecControls.push_back(doubleSpinBoxRightButtomX);
|
|
|
|
|
|
DoubleSpinBox* doubleSpinBoxRightButtomY = new DoubleSpinBox(subWidget);
|
|
|
doubleSpinBoxRightButtomY->setObjectName(QString::fromUtf8("doubleSpinBoxRightButtomY"));
|
|
|
- doubleSpinBoxRightButtomY->setFixedWidth(100); // Set fixed width to 100
|
|
|
+ doubleSpinBoxRightButtomY->setFixedWidth(95); // Set fixed width to 95
|
|
|
subGridLayout->addWidget(doubleSpinBoxRightButtomY, 6, 2, 1, 1);
|
|
|
vecControls.push_back(doubleSpinBoxRightTopX);
|
|
|
|
|
@@ -623,8 +673,8 @@ void WaffleProgramPage::AddSubMatrixPage(int vectorIndex, int subVectorIndex, PR
|
|
|
vecControls.push_back(lineEditNoBondPts);
|
|
|
|
|
|
// Left Top Position X and Y
|
|
|
- QPushButton* buttonLeftTop = new QPushButton("Get Pos", subWidget);
|
|
|
- buttonLeftTop->setFixedWidth(62); // 设置固定宽度
|
|
|
+ QPushButton* buttonLeftTop = new QPushButton("GP", subWidget);
|
|
|
+ buttonLeftTop->setFixedWidth(30); // 设置固定宽度
|
|
|
subGridLayout->addWidget(buttonLeftTop, 4, 3, 1, 1); // 添加按钮到4行3列
|
|
|
|
|
|
connect(buttonLeftTop, &QPushButton::clicked, this, [=]() {
|
|
@@ -633,9 +683,17 @@ void WaffleProgramPage::AddSubMatrixPage(int vectorIndex, int subVectorIndex, PR
|
|
|
doubleSpinBoxLeftTopY->setValue(position.y); // 更新 Y 轴
|
|
|
});
|
|
|
|
|
|
+ //MoveTo
|
|
|
+ QPushButton* buttonMoveLeftTop = new QPushButton("MT", subWidget);
|
|
|
+ buttonMoveLeftTop->setFixedWidth(30); // Set the same width for the button
|
|
|
+ subGridLayout->addWidget(buttonMoveLeftTop, 4, 4, 1, 1); // Position the button next to LeftTopPos
|
|
|
+ connect(buttonMoveLeftTop, &QPushButton::clicked, this, [=]() {
|
|
|
+ XY_DOUBLE_STRUCT position = WaffleMoveToXYAxisPosition("WaffleHead", m_vecWaffleMatrix[subVectorIndex].LeftTopPoint);
|
|
|
+ });
|
|
|
+
|
|
|
// Right Top Position X and Y
|
|
|
- QPushButton* buttonRightTop = new QPushButton("Get Pos", subWidget);
|
|
|
- buttonRightTop->setFixedWidth(62); // 设置固定宽度
|
|
|
+ QPushButton* buttonRightTop = new QPushButton("GP", subWidget);
|
|
|
+ buttonRightTop->setFixedWidth(30); // 设置固定宽度
|
|
|
subGridLayout->addWidget(buttonRightTop, 5, 3, 1, 1); // 添加按钮到5行3列
|
|
|
|
|
|
connect(buttonRightTop, &QPushButton::clicked, this, [=]() {
|
|
@@ -644,9 +702,17 @@ void WaffleProgramPage::AddSubMatrixPage(int vectorIndex, int subVectorIndex, PR
|
|
|
doubleSpinBoxRightTopY->setValue(position.y); // 更新 Y 轴
|
|
|
});
|
|
|
|
|
|
+ //MoveTo
|
|
|
+ QPushButton* buttonMoveRightTop = new QPushButton("MT", subWidget);
|
|
|
+ buttonMoveRightTop->setFixedWidth(30); // Set the same width for the button
|
|
|
+ subGridLayout->addWidget(buttonMoveRightTop, 5, 4, 1, 1); // Position the button next to LeftTopPos
|
|
|
+ connect(buttonMoveRightTop, &QPushButton::clicked, this, [=]() {
|
|
|
+ XY_DOUBLE_STRUCT position = WaffleMoveToXYAxisPosition("WaffleHead", m_vecWaffleMatrix[subVectorIndex].RightTopPoint);
|
|
|
+ });
|
|
|
+
|
|
|
// Right Bottom Position X and Y
|
|
|
- QPushButton* buttonRightButtom = new QPushButton("Get Pos", subWidget);
|
|
|
- buttonRightButtom->setFixedWidth(62); // 设置固定宽度
|
|
|
+ QPushButton* buttonRightButtom = new QPushButton("GP", subWidget);
|
|
|
+ buttonRightButtom->setFixedWidth(30); // 设置固定宽度
|
|
|
subGridLayout->addWidget(buttonRightButtom, 6, 3, 1, 1); // 添加按钮到6行3列
|
|
|
|
|
|
connect(buttonRightButtom, &QPushButton::clicked, this, [=]() {
|
|
@@ -655,6 +721,14 @@ void WaffleProgramPage::AddSubMatrixPage(int vectorIndex, int subVectorIndex, PR
|
|
|
doubleSpinBoxRightButtomY->setValue(position.y); // 更新 Y 轴
|
|
|
});
|
|
|
|
|
|
+ //MoveTo
|
|
|
+ QPushButton* buttonMoveRightButtom = new QPushButton("MT", subWidget);
|
|
|
+ buttonMoveRightButtom->setFixedWidth(30); // Set the same width for the button
|
|
|
+ subGridLayout->addWidget(buttonMoveRightButtom, 6, 4, 1, 1); // Position the button next to LeftTopPos
|
|
|
+ connect(buttonMoveRightButtom, &QPushButton::clicked, this, [=]() {
|
|
|
+ XY_DOUBLE_STRUCT position = WaffleMoveToXYAxisPosition("WaffleHead", m_vecWaffleMatrix[subVectorIndex].RightBottomPoint);
|
|
|
+ });
|
|
|
+
|
|
|
//layout->addLayout(subGridLayout, 11, 0);
|
|
|
|
|
|
QFrame* line = new QFrame(subWidget);
|