LightJoystickSwitchPage.cpp 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645
  1. #include "LightJoystickSwitchPage.h"
  2. #include "ui_LightJoystickSwitchPage.h"
  3. #include "../common/JMessageTip.h"
  4. #include "../common/JQCommon.h"
  5. #include <QHash>
  6. LightJoystickSwitchPage::LightJoystickSwitchPage(QWidget *parent)
  7. : QWidget(parent)
  8. , ui(new Ui::LightJoystickSwitchPage)
  9. {
  10. ui->setupUi(this);
  11. InitForm();
  12. }
  13. LightJoystickSwitchPage::~LightJoystickSwitchPage()
  14. {
  15. killTimer(m_nUpdateUiAxis);
  16. delete ui;
  17. }
  18. void LightJoystickSwitchPage::InitForm()
  19. {
  20. m_nTimeShowPos = startTimer(900);
  21. m_nUpdateUiAxis = startTimer(900);
  22. InitLineEdits();
  23. SliderBind();
  24. // JQCommon::SetQLineEditLimit(ui->valLineEdit);
  25. }
  26. void LightJoystickSwitchPage::SliderBind()
  27. {
  28. connect(ui->RedLightverticalSlider, &QSlider::valueChanged, ui->RedLightprogressBar, &QProgressBar::setValue);
  29. connect(ui->BlueLightverticalSlider, &QSlider::valueChanged, ui->BlueLightprogressBar, &QProgressBar::setValue);
  30. connect(ui->GreenLightverticalSlider, &QSlider::valueChanged, ui->GreenLightprogressBar, &QProgressBar::setValue);
  31. connect(ui->DotLightverticalSlider, &QSlider::valueChanged, ui->DotLightprogressBar, &QProgressBar::setValue);
  32. BondSliderAndLineEdit(ui->RedLightverticalSlider, ui->RedLightlineEdit);
  33. BondSliderAndLineEdit(ui->GreenLightverticalSlider, ui->GreenLightlineEdit);
  34. BondSliderAndLineEdit(ui->BlueLightverticalSlider, ui->BlueLightlineEdit);
  35. BondSliderAndLineEdit(ui->DotLightverticalSlider, ui->DotLightlineEdit);
  36. }
  37. void LightJoystickSwitchPage::InitLineEdits()
  38. {
  39. ui->switchTabWidget->tabBar()->hide();
  40. QList<QLineEdit*> lineEdits = {
  41. ui->RedLightlineEdit, ui->GreenLightlineEdit,
  42. ui->BlueLightlineEdit, ui->DotLightlineEdit,
  43. };
  44. for (QLineEdit* lineEdit : lineEdits)
  45. {
  46. QRegExp regExp("^(0|([1-9]\\d?)|(1\\d{2})|(2[0-5]\\d))$");
  47. QRegExpValidator* validator = new QRegExpValidator(regExp, lineEdit);
  48. lineEdit->setValidator(validator);
  49. lineEdit->setAlignment(Qt::AlignCenter);
  50. }
  51. }
  52. void LightJoystickSwitchPage::UpDataAxisToUi()
  53. {
  54. if (m_pCameraBind)
  55. {
  56. const QHash<QString, QLayout*> axisToLayout = {
  57. {"FORCE", ui->forceLayout},
  58. {"X", ui->xLayout},
  59. {"Y", ui->yLayout},
  60. {"R", ui->rLayout},
  61. {"Z", ui->zLayout},
  62. {"Z1", ui->zLayout}
  63. };
  64. for (const auto& val : m_listCurrentShowAxis)
  65. {
  66. if (axisToLayout.contains(val))
  67. {
  68. QLayout* layout = axisToLayout.value(val);
  69. for (int i = 0; i < layout->count(); ++i)
  70. {
  71. QWidget* widget = layout->itemAt(i)->widget();
  72. if (widget && widget->inherits("QLineEdit"))
  73. {
  74. JReLineEdit* lineEdit = qobject_cast<JReLineEdit*>(widget);
  75. if (lineEdit)
  76. {
  77. double pos = 0;
  78. m_pCameraBind->YGetAxisPosition(m_moveAxisInfo.ModuleType, val.toStdString(), pos);
  79. lineEdit->setText(QString::number(pos, 'f', 2));
  80. }
  81. }
  82. }
  83. }
  84. }
  85. }
  86. }
  87. void LightJoystickSwitchPage::MoveModule(const QString strAxis, const QString pos)
  88. {
  89. if (m_pCameraBind)
  90. {
  91. const QHash<QString, QLayout*> m_HaAxisToLayout = {
  92. {"FORCE", ui->forceLayout},
  93. {"X", ui->xLayout},
  94. {"Y", ui->yLayout},
  95. {"R", ui->rLayout},
  96. {"Z", ui->zLayout},
  97. {"Z1", ui->zLayout}
  98. };
  99. if (m_HaAxisToLayout.contains(strAxis))
  100. {
  101. QLayout* layout = m_HaAxisToLayout.value(strAxis);
  102. for (int i = 0; i < layout->count(); ++i)
  103. {
  104. QWidget* widget = layout->itemAt(i)->widget();
  105. if (widget && widget->inherits("QLineEdit"))
  106. {
  107. JReLineEdit* lineEdit = qobject_cast<JReLineEdit*>(widget);
  108. if (lineEdit)
  109. {
  110. if (lineEdit->m_isSetVal)
  111. {
  112. // 目前没有测试多轴,多轴在用
  113. std::vector<ns_module::MODULE_COORD_MOVE> vecPos;
  114. vecPos.push_back({ strAxis.toStdString() ,pos.toDouble() });
  115. m_pCameraBind->JModuleMove(ui->modeComboBox->currentText().toStdString(), vecPos, false);
  116. }
  117. }
  118. }
  119. }
  120. }
  121. }
  122. }
  123. void LightJoystickSwitchPage::DisableLayoutWidgets(QLayout* layout, bool isShow /*= false*/)
  124. {
  125. for (int i = 0; i < layout->count(); ++i)
  126. {
  127. QLayoutItem* item = layout->itemAt(i);
  128. if (item->widget())
  129. {
  130. item->widget()->setEnabled(isShow);
  131. }
  132. else if (item->layout())
  133. {
  134. DisableLayoutWidgets(item->layout());
  135. }
  136. }
  137. }
  138. template<class T>
  139. void LightJoystickSwitchPage::DeduplicationBox(QComboBox* pCom, const T& veTemp, int nIndex)
  140. {
  141. for (auto& a : veTemp)
  142. {
  143. QString strName;
  144. if (nIndex == 0)
  145. {
  146. strName = a->GetModuleType().c_str();
  147. }
  148. else if (nIndex == 1)
  149. {
  150. strName = a->GetStringAxisType().c_str();
  151. }
  152. QStringList items;
  153. for (int i = 0; i < pCom->count(); ++i)
  154. {
  155. items << pCom->itemText(i);
  156. }
  157. bool bMa = false; // 是否匹配
  158. for (auto b : items)
  159. {
  160. if (b == strName)
  161. {
  162. bMa = true;
  163. break;
  164. }
  165. }
  166. if (!bMa)
  167. {
  168. pCom->addItem(strName);
  169. }
  170. }
  171. }
  172. void LightJoystickSwitchPage::BondSliderAndLineEdit(QSlider* slider, QLineEdit* lineEdit)
  173. {
  174. QIntValidator* validator = new QIntValidator(slider->minimum(), slider->maximum(), lineEdit);
  175. lineEdit->setValidator(validator);
  176. connect(slider, &QSlider::valueChanged, [lineEdit](int value) {
  177. lineEdit->setText(QString::number(value));
  178. });
  179. connect(lineEdit, &QLineEdit::textChanged, [&, slider, lineEdit](const QString& text)
  180. {
  181. bool ok;
  182. int value = text.toInt(&ok);
  183. if (ok && value >= slider->minimum() && value <= slider->maximum())
  184. {
  185. slider->setValue(value);
  186. }
  187. else if (!text.isEmpty())
  188. {
  189. int closestValue = qMin(qMax(text.toInt(&ok), slider->minimum()), slider->maximum());
  190. slider->setValue(closestValue);
  191. }
  192. if (m_pPageSwitchGroup)
  193. {
  194. // 执行匹配灯光
  195. int niD = m_pPageSwitchGroup->m_nGroupId;
  196. //if (niD == 1)
  197. {
  198. // 相机窗口
  199. if (m_pCameraBind)
  200. {
  201. m_pCameraBind->JSetRedLight(niD, MatchSelectedLightIndex(lineEdit), value);
  202. }
  203. }
  204. }
  205. });
  206. }
  207. void LightJoystickSwitchPage::setLigthValue(int redLight,int greenLight,int blueLight,int dotLight)
  208. {
  209. setLightWidget(redLight, ui->RedLight, ui->RedLightlineEdit, ui->RedLightverticalSlider, ui->RedLightprogressBar, ui->RedLightlabel);
  210. setLightWidget(greenLight, ui->GreenLight, ui->GreenLightlineEdit, ui->GreenLightverticalSlider, ui->GreenLightprogressBar, ui->GreenLightlabel);
  211. setLightWidget(blueLight, ui->BlueLight, ui->BlueLightlineEdit, ui->BlueLightverticalSlider, ui->BlueLightprogressBar, ui->BlueLightlabel);
  212. setLightWidget(dotLight, ui->DotLight, ui->DotLightlineEdit, ui->DotLightverticalSlider, ui->DotLightprogressBar, ui->DotLightlabel);
  213. }
  214. void LightJoystickSwitchPage::setLightWidget(int value, QWidget *lightWidget, QLineEdit *lineEdit, QSlider *slider, QProgressBar *progressBar, QLabel *label)
  215. {
  216. if (0 <= value && value <= 100)
  217. {
  218. lightWidget->show();
  219. lineEdit->show();
  220. slider->show();
  221. progressBar->show();
  222. label->show();
  223. lineEdit->setText(QString::number(value));
  224. progressBar->setValue(value);
  225. slider->setValue(value);
  226. }
  227. else if (value == -1)
  228. {
  229. lightWidget->hide();
  230. lineEdit->hide();
  231. slider->hide();
  232. progressBar->hide();
  233. label->hide();
  234. }
  235. }
  236. void LightJoystickSwitchPage::on_move_Button_clicked()
  237. {
  238. RunMoveOrMoveTo(false);
  239. }
  240. void LightJoystickSwitchPage::on_moveTo_Button_clicked()
  241. {
  242. RunMoveOrMoveTo(true);
  243. }
  244. void LightJoystickSwitchPage::on_left_Button_clicked()
  245. {
  246. m_moveAxisInfo.AxisType = "X";
  247. MoveJoystick();
  248. }
  249. void LightJoystickSwitchPage::on_up_Button_clicked()
  250. {
  251. m_moveAxisInfo.AxisType = "Y";
  252. MoveJoystick();
  253. }
  254. void LightJoystickSwitchPage::on_right_Button_clicked()
  255. {
  256. m_moveAxisInfo.AxisType = "X";
  257. MoveJoystick();
  258. }
  259. void LightJoystickSwitchPage::on_down_Button_clicked()
  260. {
  261. m_moveAxisInfo.AxisType = "Y";
  262. MoveJoystick();
  263. }
  264. void LightJoystickSwitchPage::GetModuleTypeSlots(const ST_MOVE_AXIS& _module)
  265. {
  266. m_isSlots = true;
  267. SetMoveJoystickInfo(_module);
  268. }
  269. void LightJoystickSwitchPage::InitMainCameraBind(CameraBind* pCameraBind, bool bUpdate /*= true*/)
  270. {
  271. m_pCameraBind = pCameraBind;
  272. if (bUpdate)
  273. {
  274. UpdataLightVal();
  275. }
  276. if (m_pCameraBind)
  277. {
  278. DeduplicationBox(ui->modeComboBox, m_pCameraBind->m_vecCAxis, 0);
  279. }
  280. }
  281. void LightJoystickSwitchPage::UpdatemPageGroup(Group* pGroup)
  282. {
  283. m_pPageSwitchGroup = pGroup;
  284. }
  285. void LightJoystickSwitchPage::SwitchJoystickPage(bool bSwitch)
  286. {
  287. ResetIdleTimer(bSwitch);
  288. //int newIndex = (ui->switchTabWidget->currentIndex() + 1) % ui->switchTabWidget->count();
  289. if (m_isSlots)
  290. {
  291. ui->switchTabWidget->setCurrentIndex(1);
  292. }
  293. else
  294. {
  295. ui->switchTabWidget->setCurrentIndex(0);
  296. }
  297. m_isSlots = false;
  298. }
  299. void LightJoystickSwitchPage::HideOrShowPage(bool isHide)
  300. {
  301. ui->switchTabWidget->setVisible(isHide);
  302. }
  303. void LightJoystickSwitchPage::SetMoveJoystickInfo(const ST_MOVE_AXIS& movInfo)
  304. {
  305. //m_moveAxisInfo.ModuleType = movInfo.ModuleType;
  306. //m_moveAxisInfo.AxisType = movInfo.AxisType;
  307. //m_moveAxisInfo.pos = movInfo.pos; // 这个距离可能会变动// 根据摇杆区分等级
  308. m_moveAxisInfo = movInfo;
  309. if (m_moveAxisInfo.isSwitch)
  310. {
  311. // 点击摇杆的时候开启定时器,然后3秒关闭
  312. SwitchJoystickPage(true);
  313. }
  314. }
  315. void LightJoystickSwitchPage::timerEvent(QTimerEvent* event)
  316. {
  317. int nID = event->timerId();
  318. if (m_nTimeShowPos == nID)
  319. {
  320. RealTimeUpdatesToU();
  321. }
  322. else if (m_idleTimer == nID)
  323. {
  324. SwitchJoystickPage(false);
  325. }
  326. else if (m_nUpdateUiAxis == nID)
  327. {
  328. UpDataAxisToUi();
  329. }
  330. }
  331. QString LightJoystickSwitchPage::CombiningStr(bool isUpdate /*= false*/)
  332. {
  333. double pos = m_moveAxisInfo.pos;
  334. QString strShow = tr("Currently selected mode:", "当前选中模式:");
  335. if (isUpdate)
  336. {
  337. strShow = tr("Move Pos:","移动点:");
  338. if (m_pCameraBind)
  339. {
  340. m_pCameraBind->YGetAxisPosition(m_moveAxisInfo.ModuleType, m_moveAxisInfo.AxisType, pos);
  341. }
  342. }
  343. strShow += m_moveAxisInfo.ModuleType.c_str();
  344. strShow += " ";
  345. strShow += m_moveAxisInfo.AxisType.c_str();
  346. strShow += " ";
  347. strShow += QString::number(pos, 'f', 2);
  348. return strShow;
  349. }
  350. void LightJoystickSwitchPage::RealTimeUpdatesToU()
  351. {
  352. if (m_pCameraBind)
  353. {
  354. // ui->JTabShowLableLoop->setText(CombiningStr(true));
  355. }
  356. }
  357. void LightJoystickSwitchPage::ResetIdleTimer(bool bStart /*= false*/)
  358. {
  359. if (bStart)
  360. {
  361. if (m_idleTimer != -1)
  362. {
  363. // 计时器没关,关闭重新打开
  364. ResetIdleTimer(false);
  365. ResetIdleTimer(true);
  366. }
  367. if (isActiveWindow())
  368. {
  369. m_idleTimer = startTimer(g_unnSuspensionWaitingTime);
  370. }
  371. }
  372. else
  373. {
  374. killTimer(m_idleTimer);
  375. m_idleTimer = -1;
  376. }
  377. }
  378. void LightJoystickSwitchPage::MoveJoystick()
  379. {
  380. if (m_pCameraBind)
  381. {
  382. m_pCameraBind->YGetAxisPosition(m_moveAxisInfo.ModuleType, m_moveAxisInfo.AxisType, m_moveAxisInfo.pos);
  383. }
  384. }
  385. void LightJoystickSwitchPage::RunMoveOrMoveTo(bool isMoveTo)
  386. {
  387. QString strErrInfo = {};
  388. QString strNum = "1";//ui->valLineEdit->text().trimmed();
  389. if (strNum.isEmpty())
  390. {
  391. strErrInfo = tr("please input value","请输入值");
  392. }
  393. else
  394. {
  395. double doNum = strNum.toDouble();
  396. if (m_moveAxisInfo.ModuleType != "")
  397. {
  398. if (m_moveAxisInfo.AxisType != "")
  399. {
  400. m_pCameraBind->SetModuleMove(m_moveAxisInfo.ModuleType, m_moveAxisInfo.AxisType, doNum, isMoveTo);
  401. }
  402. else
  403. {
  404. strErrInfo = tr("AxisType is Empty", "AxisType 为空");
  405. }
  406. }
  407. else
  408. {
  409. strErrInfo = tr("ModuleType is Empty", "ModuleType 为空");
  410. }
  411. }
  412. if (!strErrInfo.isEmpty())
  413. {
  414. JMessageTip::Message_question(strErrInfo);
  415. }
  416. }
  417. void LightJoystickSwitchPage::UpdataLightVal()
  418. {
  419. if (m_pCameraBind->m_pCViewInterface == nullptr)
  420. {
  421. return;
  422. }
  423. if (m_pPageSwitchGroup)
  424. {
  425. int niD = m_pPageSwitchGroup->m_nGroupId;
  426. //if (niD == 1)
  427. {
  428. // 切换灯光
  429. ST_LIGHT_VAL _val = m_pCameraBind->JGetLight(niD);
  430. setLigthValue(_val.redLightValue, _val.greenLightValue, _val.blueLightValue, _val.pointLightValue);
  431. }
  432. }
  433. }
  434. EN_LIGHT_INDEX LightJoystickSwitchPage::MatchSelectedLightIndex(QLineEdit* lineEdit)
  435. {
  436. EN_LIGHT_INDEX nIndex = EN_LIGHT_INDEX::Red;
  437. if (lineEdit == ui->RedLightlineEdit)
  438. {
  439. nIndex = EN_LIGHT_INDEX::Red;
  440. }
  441. else if (lineEdit == ui->GreenLightlineEdit)
  442. {
  443. nIndex = EN_LIGHT_INDEX::Green;
  444. }
  445. else if (lineEdit == ui->BlueLightlineEdit)
  446. {
  447. nIndex = EN_LIGHT_INDEX::Blue;
  448. }
  449. else if (lineEdit == ui->DotLightlineEdit)
  450. {
  451. nIndex = EN_LIGHT_INDEX::Point;
  452. }
  453. return nIndex;
  454. }
  455. void LightJoystickSwitchPage::resizeSingleUI() {
  456. ui->switchTabWidget->setGeometry(QRect(0, 0, 265, 240));
  457. ui->GreenLightTab->setGeometry(QRect(0, 0, 60, 32));
  458. ui->JoystickTab->setGeometry(QRect(0, 0, 259, 215));
  459. ui->RedLight->setGeometry(QRect(0, 0, 61, 114));
  460. ui->RedLightlineEdit->setGeometry(QRect(10, 78, 40, 24));
  461. ui->RedLightprogressBar->setGeometry(QRect(32, 15, 18, 51));
  462. ui->RedLightverticalSlider->setGeometry(QRect(10, 12, 18, 56));
  463. ui->RedLightlabel->setGeometry(QRect(39, 22, 10, 34));
  464. ui->GreenLight->setGeometry(QRect(70, 0, 61, 114));
  465. ui->GreenLightlineEdit->setGeometry(QRect(10, 78, 40, 24));
  466. ui->GreenLightprogressBar->setGeometry(QRect(32, 15, 18, 51));
  467. ui->GreenLightverticalSlider->setGeometry(QRect(10, 12, 18, 56));
  468. ui->GreenLightlabel->setGeometry(QRect(36, 22, 10, 34));
  469. ui->BlueLight->setGeometry(QRect(140, 0, 61, 114));
  470. ui->BlueLightlineEdit->setGeometry(QRect(10, 78, 40, 24));
  471. ui->BlueLightprogressBar->setGeometry(QRect(32, 15, 18, 51));
  472. ui->BlueLightverticalSlider->setGeometry(QRect(10, 12, 18, 56));
  473. ui->BlueLightlabel->setGeometry(QRect(32, 22, 19, 34));
  474. ui->DotLight->setGeometry(QRect(200, 0, 61, 114));
  475. ui->DotLightlineEdit->setGeometry(QRect(10, 78, 40, 24));
  476. ui->DotLightprogressBar->setGeometry(QRect(32, 15, 18, 51));
  477. ui->DotLightverticalSlider->setGeometry(QRect(10, 12, 18, 56));
  478. ui->DotLightlabel->setGeometry(QRect(32, 22, 19, 34));
  479. ui->groupBox_2->setGeometry(QRect(0, 0, 250, 131));
  480. ui->xCheckBox->setGeometry(QRect(0, 0, 30, 30));
  481. ui->xLineEdit->setGeometry(QRect(31, 0, 50, 30));
  482. ui->rCheckBox->setGeometry(QRect(0, 0, 30, 30));
  483. ui->rLineEdit->setGeometry(QRect(31, 0, 50, 30));
  484. ui->xLayout->setGeometry(QRect(30, 0, 90, 30));
  485. ui->groupBox->setGeometry(QRect(0, 100, 141, 111));
  486. ui->left_Button->setGeometry(QRect(10, 40, 41, 31));
  487. ui->right_Button->setGeometry(QRect(90, 40, 41, 31));
  488. ui->up_Button->setGeometry(QRect(50, 10, 41, 31));
  489. ui->down_Button->setGeometry(QRect(50, 70, 41, 31));
  490. }
  491. void LightJoystickSwitchPage::on_xLineEdit_textChanged(const QString &arg1)
  492. {
  493. MoveModule("X", arg1);
  494. }
  495. void LightJoystickSwitchPage::on_yLineEdit_textChanged(const QString &arg1)
  496. {
  497. MoveModule("Y", arg1);
  498. }
  499. void LightJoystickSwitchPage::on_zLineEdit_textChanged(const QString &arg1)
  500. {
  501. MoveModule("Z", arg1);
  502. }
  503. void LightJoystickSwitchPage::on_rLineEdit_textChanged(const QString &arg1)
  504. {
  505. MoveModule("R", arg1);
  506. }
  507. void LightJoystickSwitchPage::on_forceLineEdit_textChanged(const QString &arg1)
  508. {
  509. MoveModule("FORCE", arg1);
  510. }
  511. void LightJoystickSwitchPage::on_modeComboBox_currentIndexChanged(int index)
  512. {
  513. QString strMod = ui->modeComboBox->itemText(index);
  514. // 先禁用所有相关布局
  515. const QList<QLayout*> allLayouts = {
  516. ui->forceLayout,
  517. ui->xLayout,
  518. ui->yLayout,
  519. ui->rLayout,
  520. ui->zLayout,
  521. };
  522. for (auto* layout : allLayouts)
  523. {
  524. DisableLayoutWidgets(layout, false);
  525. }
  526. // 收集当前模块支持的轴类型
  527. QSet<QString> supportedAxes;
  528. for (const auto& axis : m_pCameraBind->m_vecCAxis)
  529. {
  530. if (strMod == axis->GetModuleType().c_str())
  531. {
  532. supportedAxes.insert(axis->GetStringAxisType().c_str());
  533. }
  534. }
  535. // 根据支持的轴启用对应布局
  536. const QHash<QString, QLayout*> axisToLayout = {
  537. {"FORCE", ui->forceLayout},
  538. {"X", ui->xLayout},
  539. {"Y", ui->yLayout},
  540. {"R", ui->rLayout},
  541. {"Z", ui->zLayout},
  542. {"Z1", ui->zLayout}
  543. };
  544. for (auto it = axisToLayout.constBegin(); it != axisToLayout.constEnd(); ++it)
  545. {
  546. if (supportedAxes.contains(it.key()))
  547. {
  548. m_listCurrentShowAxis.push_back(it.key());
  549. DisableLayoutWidgets(it.value(), true);
  550. }
  551. }
  552. }