|
@@ -126,15 +126,80 @@ void LightJoystickSwitchPage::MoveModule(const QString strAxis, const QString po
|
|
|
{
|
|
|
if (lineEdit->m_isSetVal)
|
|
|
{
|
|
|
- // 目前没有测试多轴,多轴在用
|
|
|
- std::vector<ns_module::MODULE_COORD_MOVE> vecPos;
|
|
|
- vecPos.push_back({ strAxis.toStdString() ,pos.toDouble() });
|
|
|
- m_pCameraBind->JModuleMove(ui->modeComboBox->currentText().toStdString(), vecPos, false);
|
|
|
+ std::thread run([&, strAxis, pos]()
|
|
|
+ {
|
|
|
+
|
|
|
+ // 目前没有测试多轴,多轴在用
|
|
|
+ std::vector<ns_module::MODULE_COORD_MOVE> vecPos;
|
|
|
+ vecPos.push_back({ strAxis.toStdString() ,pos.toDouble() });
|
|
|
+ m_pCameraBind->JModuleMove(ui->modeComboBox->currentText().toStdString(), vecPos, false);
|
|
|
+ });
|
|
|
+ run.detach();
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ //std::thread runFun([&, strAxis, pos]() {
|
|
|
+
|
|
|
+ // auto LoopFun = [&](const QHash<QString, QLayout*> lay, bool isDisable)
|
|
|
+ // {
|
|
|
+ // for (auto it = lay.begin(); it != lay.end(); ++it)
|
|
|
+ // {
|
|
|
+ // const QString& key = it.key();
|
|
|
+ // QLayout* layout = it.value();
|
|
|
+ // DisableLayoutWidgets(layout, isDisable);
|
|
|
+ // }
|
|
|
+ // };
|
|
|
+
|
|
|
+ // const QHash<QString, QLayout*> m_HaAxisToLayout = {
|
|
|
+ // {"FORCE", ui->forceLayout},
|
|
|
+ // {"X", ui->xLayout},
|
|
|
+ // {"Y", ui->yLayout},
|
|
|
+ // {"R", ui->rLayout},
|
|
|
+ // {"Z", ui->zLayout},
|
|
|
+ // {"Z1", ui->zLayout}
|
|
|
+ // };
|
|
|
+ // //LoopFun(m_HaAxisToLayout, false);
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ // if (m_HaAxisToLayout.contains(strAxis))
|
|
|
+ // {
|
|
|
+ // QLayout* layout = m_HaAxisToLayout.value(strAxis);
|
|
|
+ // for (int i = 0; i < layout->count(); ++i)
|
|
|
+ // {
|
|
|
+ // QWidget* widget = layout->itemAt(i)->widget();
|
|
|
+ // if (widget && widget->inherits("QLineEdit"))
|
|
|
+ // {
|
|
|
+ // JReLineEdit* lineEdit = qobject_cast<JReLineEdit*>(widget);
|
|
|
+ // if (lineEdit)
|
|
|
+ // {
|
|
|
+ // if (lineEdit->m_isSetVal)
|
|
|
+ // {
|
|
|
+
|
|
|
+ // m_pCameraBind->SetModuleMove(
|
|
|
+ // ui->modeComboBox->currentText().toStdString(),
|
|
|
+ // strAxis.toStdString(),
|
|
|
+ // pos.toDouble(), false);
|
|
|
+
|
|
|
+
|
|
|
+ // //// 目前没有测试多轴,多轴在用 ,没有多轴的情况
|
|
|
+ // //std::vector<ns_module::MODULE_COORD_MOVE> vecPos;
|
|
|
+ // //vecPos.push_back({ strAxis.toStdString() ,pos.toDouble() });
|
|
|
+ // //m_pCameraBind->JModuleMove(ui->modeComboBox->currentText().toStdString(), vecPos, false);
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+
|
|
|
+ // //LoopFun(m_HaAxisToLayout, true);
|
|
|
+ // });
|
|
|
}
|
|
|
}
|
|
|
|