27 xc::RemoteGui::createRemoteGuiTab()
29 auto boxLayout = gui::makeVBoxLayout();
31 const auto createButtonWithDescription =
32 [&boxLayout](
const std::string& buttonNameAndText,
const std::string& description =
"")
34 const gui::WidgetPtr label = gui::makeTextLabel(buttonNameAndText);
35 const gui::WidgetPtr button = gui::makeButton(buttonNameAndText).toolTip(description);
36 const gui::WidgetPtr line = gui::makeHBoxLayout().children({label, button});
37 boxLayout.addChild(line);
40 createButtonWithDescription(
42 "Use this button to create a map after you collected enough data.");
43 createButtonWithDescription(loadDataFromMemoryButtonName);
44 createButtonWithDescription(selectBoundingBoxCornerButtonName);
45 createButtonWithDescription(alignBoundingBoxButtonName);
46 createButtonWithDescription(findAssociationsButtonName);
47 createButtonWithDescription(computeCoarseCorrectionButtonName);
48 createButtonWithDescription(computeFineCorrectionButtonName);
49 createButtonWithDescription(storeRegistrationResultButtonName);
55 xc::RemoteGui::tabName()
const
57 return remoteGuiTabMame;
61 xc::RemoteGui::handleEvents(armarx::RemoteGui::TabProxy& tab)
63 auto callIfClicked = [&](
const std::string& buttonName,
auto&& cbFn,
auto... args)
65 const ::armarx::RemoteGui::ButtonProxy button =
getTab().
getButton(buttonName);
68 auto fn = std::bind(cbFn, &callee, std::forward<
decltype(args)>(args)...);
73 auto callCallIfClicked = [&](
const std::string& buttonName,
auto&& cbFn,
auto&& callArgs)
75 const ::armarx::RemoteGui::ButtonProxy button =
getTab().
getButton(buttonName);
78 auto fn = std::bind(cbFn, &callee, callArgs());
83 static int selectedCorner = 0;
95 callCallIfClicked(selectBoundingBoxCornerButtonName,
97 [&]() ->
int {
return selectedCorner++; });
101 xc::RemoteGui::enable()
107 xc::RemoteGui::disable()