RemoteGuiVisitors.cpp
Go to the documentation of this file.
1 /*
2  * This file is part of ArmarX.
3  *
4  * ArmarX is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * published by the Free Software Foundation.
7  *
8  * ArmarX is distributed in the hope that it will be useful, but
9  * WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  * @package robdekon
17  * @author Christoph Pohl ( christoph dot pohl at kit dot edu )
18  * @date 07.09.22
19  * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20  * GNU General Public License
21  */
22 
23 #include "RemoteGuiVisitors.h"
24 
25 #include <SimoxUtility/math/convert/quat_to_rpy.h>
26 #include <SimoxUtility/math/convert/rpy_to_quat.h>
27 
29 
31 
35 
36 #include "Util.h"
37 
38 #define INPUT_GUARD(i) \
39  ARMARX_TRACE; \
40  ARMARX_CHECK_NOT_NULL(i); \
41  if (in_list_) \
42  return;
43 
45 {
46 
47  void
49  {
50  INPUT_GUARD(dict);
51 
52  if (dict->getPath().hasElement())
53  {
54  std::string name = pathToName(dict);
55  group_hierarchy_.emplace_back(std::make_shared<RemoteGui::detail::GroupBoxBuilder>(
57  }
58  else
59  {
60  group_hierarchy_.push_back(builder_);
61  }
62  }
63 
64  void
66  {
67  INPUT_GUARD(dict);
68  auto builder = *group_hierarchy_.back();
69  group_hierarchy_.pop_back();
70  if (!group_hierarchy_.empty())
71  {
72  group_hierarchy_.back()->addChild(builder);
73  }
74  }
75 
76  void
78  {
79  INPUT_GUARD(i);
81  const auto& name = pathToName(i);
82  auto group = RemoteGui::makeHBoxLayout(name + "_layout");
83  group.addChild(RemoteGui::makeLabel(name + "_label").value(i->getPath().getLastElement()));
84  group.addHSpacer();
85  group.addChild(RemoteGui::makeIntSpinBox(name)
86  .value(value->getValue())
87  .min(-1000)
88  .max(1000)
89  .toolTip(name));
90  group_hierarchy_.back()->addChild(group);
91  }
92 
93  void
95  {
96  INPUT_GUARD(f);
98  const auto& name = pathToName(f);
99  auto group = RemoteGui::makeHBoxLayout(name + "_layout");
100  group.addChild(RemoteGui::makeLabel(name + "_label").value(f->getPath().getLastElement()));
101  group.addHSpacer();
102  group.addChild(RemoteGui::makeFloatSpinBox(name)
103  .value(value->getValue())
104  .min(-1000)
105  .max(1000)
106  .toolTip(name));
107  group_hierarchy_.back()->addChild(group);
108  }
109 
110  void
112  {
113  INPUT_GUARD(d);
115  const auto& name = pathToName(d);
116  auto group = RemoteGui::makeHBoxLayout(name + "_layout");
117  group.addChild(RemoteGui::makeLabel(name + "_label").value(d->getPath().getLastElement()));
118  group.addHSpacer();
119  group.addChild(RemoteGui::makeFloatSpinBox(name)
120  .value(value->getValue())
121  .min(-1000)
122  .max(1000)
123  .toolTip(name));
124  group_hierarchy_.back()->addChild(group);
125  }
126 
127  void
129  {
130  INPUT_GUARD(b);
132  const auto& name = pathToName(b);
133  auto group = RemoteGui::makeHBoxLayout(name + "_layout");
134  group.addChild(RemoteGui::makeLabel(name + "_label").value(b->getPath().getLastElement()));
135  group.addHSpacer();
136  group.addChild(
137  RemoteGui::makeCheckBox(name).label("").value(value->getValue()).toolTip(name));
138  group_hierarchy_.back()->addChild(group);
139  }
140 
141  void
143  {
144  INPUT_GUARD(string);
146  const auto& name = pathToName(string);
147  auto group = RemoteGui::makeHBoxLayout(name + "_layout");
148  group.addChild(
149  RemoteGui::makeLabel(name + "_label").value(string->getPath().getLastElement()));
150  group.addHSpacer();
151  group.addChild(RemoteGui::makeLineEdit(name).value(value->getValue()).toolTip(name));
152  group_hierarchy_.back()->addChild(group);
153  }
154 
156  builder_(std::make_unique<RemoteGui::detail::GroupBoxBuilder>(name))
157  {
158  }
159 
162  {
163  return *builder_;
164  }
165 
166  void
168  {
169  in_list_ = true;
170  auto type = type::List::DynamicCast(t)->getAcceptedType()->getDescriptor();
171 
172  if (std::find(implementedListDescriptors.begin(), implementedListDescriptors.end(), type) !=
173  implementedListDescriptors.end())
174  {
175  auto group = RemoteGui::makeSimpleGridLayout(pathToName(o) + "_grid").cols(20);
177 
178  for (const auto& el : data->getElements())
179  {
180  group.addChild(RemoteGui::makeLineEdit(pathToName(el))
182  10);
183  group.addHSpacer(8);
184  group.addChild(RemoteGui::makeButton(pathToName(el) + "_button")
185  .label("-")
186  .toolTip("Remove List Element"),
187  2);
188  }
189  group_hierarchy_.back()->addChild(
191  .label(o->getPath().getLastElement())
192  .collapsed(true)
193  .addChild(group)
195  .label("+")
196  .toolTip("Add new list entry.")));
197  }
198  else
199  {
200  std::string name = pathToName(o);
201  group_hierarchy_.emplace_back(std::make_shared<RemoteGui::detail::GroupBoxBuilder>(
202  RemoteGui::makeGroupBox(name)));
203  }
204  }
205 
206  void
208  {
209  in_list_ = false;
210 
211  auto type = type::List::DynamicCast(t)->getAcceptedType()->getDescriptor();
212 
213  if (std::find(implementedListDescriptors.begin(), implementedListDescriptors.end(), type) !=
214  implementedListDescriptors.end())
215  {
216  }
217  else
218  {
219  auto builder = *group_hierarchy_.back();
220  group_hierarchy_.pop_back();
221  if (not group_hierarchy_.empty())
222  {
223  group_hierarchy_.back()->addChild(builder);
224  }
225  }
226  }
227 
228  void
230  {
231  INPUT_GUARD(o);
233  auto type = type::IntEnum::DynamicCast(t);
234  const auto& name = pathToName(o);
235  auto group = RemoteGui::makeHBoxLayout(name + "_layout");
236  group.addChild(RemoteGui::makeLabel(name + "_label").value(o->getPath().getLastElement()));
237  group.addHSpacer();
238  group.addChild(RemoteGui::makeComboBox(name)
239  .options(type->getAcceptedValueNames())
240  .value(type->getValueName(data->getValue()))
241  .toolTip(name));
242  group_hierarchy_.back()->addChild(group);
243  }
244 
245  void
246  MakeConfigGuiVisitor::visitMatrix(const std::shared_ptr<data::Variant>& q,
247  const std::shared_ptr<type::Variant>& t)
248  {
250  auto type = type::Matrix::DynamicCast(t);
251  const auto& cols = type->getCols();
252  const auto& rows = type->getRows();
253  const auto& name = pathToName(q);
254  auto group = RemoteGui::makeHBoxLayout(name + "_layout");
255  group.addChild(RemoteGui::makeLabel(name + "_label").value(q->getPath().getLastElement()));
256  group.addHSpacer();
257 
258  if (cols == 4 and rows == 4)
259  {
260  // Poses
262  group.addChild(RemoteGui::makePosRPYSpinBoxes(name).value(matrix).toolTip(name));
263  }
264  else if ((cols == 3 and rows == 1) or (rows == 3 and cols == 1))
265  {
266  // Positions
268  group.addChild(RemoteGui::makeVector3fSpinBoxes(name).value(vector).toolTip(name));
269  }
270  group_hierarchy_.back()->addChild(group);
271  }
272 
273  void
274  MakeConfigGuiVisitor::visitQuaternion(const std::shared_ptr<data::Variant>& q,
275  const std::shared_ptr<type::Variant>& t)
276  {
277  INPUT_GUARD(q);
279  auto type = type::Quaternion::DynamicCast(t);
280  const auto& quat = simox::math::quat_to_rpy(
282  const auto& name = pathToName(q);
283  auto group = RemoteGui::makeHBoxLayout(name + "_layout");
284  group.addChild(RemoteGui::makeLabel(name + "_label").value(q->getPath().getLastElement()));
285  group.addHSpacer();
286  group.addChild(RemoteGui::makeVector3fSpinBoxes(name)
287  .value(quat)
288  .min(-M_PI)
289  .max(M_PI)
290  .steps(601)
291  .decimals(2)
292  .toolTip(name));
293  group_hierarchy_.back()->addChild(group);
294  }
295 
296  void
297  MakeConfigGuiVisitor::visitDictOnEnter(const std::shared_ptr<data::Variant>& o,
298  const std::shared_ptr<type::Variant>& t)
299  {
300  in_list_ = true;
301  auto group = RemoteGui::makeSimpleGridLayout(pathToName(o) + "_grid").cols(20);
303  auto type = type::Dict::DynamicCast(t)->getAcceptedType()->getDescriptor();
304  if (std::find(implementedListDescriptors.begin(), implementedListDescriptors.end(), type) ==
305  implementedListDescriptors.end())
306  {
307  return;
308  }
309  for (const auto& el : data->getElements())
310  {
311  group.addChild(RemoteGui::makeLineEdit(pathToName(el.second) + "_lbl").value(el.first),
312  5);
313  group.addHSpacer(2);
314  group.addChild(RemoteGui::makeLineEdit(pathToName(el.second))
315  .value(factories::VariantHelper::make(type)->to_string(el.second)),
316  5);
317  group.addHSpacer(6);
318  group.addChild(RemoteGui::makeButton(pathToName(el.second) + "_button")
319  .label("-")
320  .toolTip("Remove List Element"),
321  2);
322  }
323  group_hierarchy_.back()->addChild(
325  .label(o->getPath().getLastElement())
326  .collapsed(true)
327  .addChild(group)
329  .label("+")
330  .toolTip("Add new dict entry.")));
331  }
332 
333  void
334  MakeConfigGuiVisitor::visitDictOnExit(const std::shared_ptr<data::Variant>&,
335  const std::shared_ptr<type::Variant>&)
336  {
337  in_list_ = false;
338  }
339 
341  proxy_(std::experimental::make_observer(proxy))
342  {
343  }
344 
345  void
347  {
348  INPUT_GUARD(i);
350  const std::string name = pathToName(i);
351  auto gui_value = proxy_->getValue<int>(name);
352  if (value->getValue() != gui_value.get())
353  {
354  if (proxy_->hasValueChanged(name))
355  {
356  value->setValue(gui_value.get());
357  i = value;
358  }
359  else
360  {
361  proxy_->setValue(value->getValue(), name);
362  }
363  }
364  }
365 
366  void
368  {
369  INPUT_GUARD(f);
371  const std::string name = pathToName(f);
372  auto gui_value = proxy_->getValue<float>(name);
373  if (value->getValue() != gui_value.get())
374  {
375  if (proxy_->hasValueChanged(name))
376  {
377  value->setValue(gui_value.get());
378  f = value;
379  }
380  else
381  {
382  proxy_->setValue(value->getValue(), name);
383  }
384  }
385  }
386 
387  void
389  {
390  INPUT_GUARD(d);
392  const std::string name = pathToName(d);
393  // TODO: does double work here?
394  auto gui_value = proxy_->getValue<float>(name);
395  if (value->getValue() != gui_value.get())
396  {
397  if (proxy_->hasValueChanged(name))
398  {
399  value->setValue(gui_value.get());
400  d = value;
401  }
402  else
403  {
404  proxy_->setValue(static_cast<float>(value->getValue()), name);
405  }
406  }
407  }
408 
409  void
411  {
412  INPUT_GUARD(b);
414  const std::string name = pathToName(b);
415  auto gui_value = proxy_->getValue<bool>(name);
416  if (value->getValue() != gui_value.get())
417  {
418  if (proxy_->hasValueChanged(name))
419  {
420  value->setValue(gui_value.get());
421  b = value;
422  }
423  else
424  {
425  proxy_->setValue(value->getValue(), name);
426  }
427  }
428  }
429 
430  void
432  {
433  INPUT_GUARD(string);
435  const std::string name = pathToName(string);
436  auto gui_value = proxy_->getValue<std::string>(name);
437  if (value->getValue() != gui_value.get())
438  {
439  if (proxy_->hasValueChanged(name))
440  {
441  value->setValue(gui_value.get());
442  string = value;
443  }
444  else
445  {
446  proxy_->setValue(value->getValue(), name);
447  }
448  }
449  }
450 
453  {
455  }
456 
459  {
461  }
462 
465  {
467  }
468 
471  {
473  }
474 
477  {
479  }
480 
483  {
485  }
486 
487  void
489  {
490  INPUT_GUARD(o);
492  auto type = type::IntEnum::DynamicCastAndCheck(t);
493  std::string str;
494  const std::string name = pathToName(o);
495  proxy_->getValue(str, pathToName(o));
496  if (data->getValue() != type->getValue(str))
497  {
498  if (proxy_->hasValueChanged(name))
499  {
500  data->getValue() = type->getValue(str);
501  o = data;
502  }
503  else
504  {
505  proxy_->setValue(type->getValueName(data->getValue()), name);
506  }
507  }
508  }
509 
510  void
512  {
513  in_list_ = true;
514 
515  auto type = type::List::DynamicCast(t)->getAcceptedType()->getDescriptor();
516 
517  if (std::find(implementedListDescriptors.begin(), implementedListDescriptors.end(), type) !=
518  implementedListDescriptors.end())
519  {
521 
522  const auto& elements = data->getElements();
523  for (const auto& [idx, el] : armarx::MakeIndexedContainer(elements))
524  {
525  if (proxy_->getButtonClicked(pathToName(el) + "_button"))
526  {
527  data->removeElement(idx);
528  tab_rebuild_required_ = true;
529  }
530  auto gui_value = proxy_->getValue<std::string>(pathToName(el)).get();
531  factories::VariantHelper::make(type)->set_value_from_string(el, gui_value);
532  }
533  if (proxy_->getButtonClicked(pathToName(o) + "_add"))
534  {
535  data->addElement(factories::VariantHelper::make(type)->from_string(
536  "", o->getPath().withIndex(data->childrenSize())));
537  tab_rebuild_required_ = true;
538  }
539  }
540  else
541  {
542  // TODO? Adapt to additional GroupBoxBuilder added by
543  // MakeConfigGuiVisitor::visitListOnEnter in this case?
544  }
545  }
546 
547  void
549  {
550  in_list_ = false;
551 
552  auto type = type::List::DynamicCast(t)->getAcceptedType()->getDescriptor();
553 
554  if (std::find(implementedListDescriptors.begin(), implementedListDescriptors.end(), type) !=
555  implementedListDescriptors.end())
556  {
557  }
558  else
559  {
560  // TODO? Adapt to additional GroupBoxBuilder added by
561  // MakeConfigGuiVisitor::visitListOnEnter in this case?
562  }
563  }
564 
565  bool
567  {
568  return tab_rebuild_required_;
569  }
570 
571  void
572  GetValueFromMapVisitor::visitMatrix(std::shared_ptr<data::Variant>& o,
573  const std::shared_ptr<type::Variant>& t)
574  {
575  INPUT_GUARD(o);
577  auto type = type::Matrix::DynamicCastAndCheck(t);
578  const std::string name = pathToName(o);
579  const auto& cols = type->getCols();
580  const auto& rows = type->getRows();
581  // TODO: does double work here?
582  if (cols == 4 && rows == 4)
583  {
584  auto gui_value = proxy_->getValue<Eigen::Matrix4f>(name);
586 
587  if (config_value != gui_value.get())
588  {
589  if (proxy_->hasValueChanged(name))
590  {
591  auto variant =
593  value->setData(gui_value.get().size() * sizeof(float), variant->getData());
594  }
595  else
596  {
597  proxy_->setValue(config_value, name);
598  }
599  }
600  }
601  else if ((cols == 3 and rows == 1) or (cols == 1 and rows == 3))
602  {
603  auto gui_value = proxy_->getValue<Eigen::Vector3f>(name);
605 
606  if (config_value != gui_value.get())
607  {
608  if (proxy_->hasValueChanged(name))
609  {
610  auto variant =
612  value->setData(gui_value.get().size() * sizeof(float), variant->getData());
613  }
614  else
615  {
616  proxy_->setValue(config_value, name);
617  }
618  }
619  }
620  }
621 
622  void
623  GetValueFromMapVisitor::visitQuaternion(std::shared_ptr<data::Variant>& o,
624  const std::shared_ptr<type::Variant>& t)
625  {
626  INPUT_GUARD(o);
628  const std::string name = pathToName(o);
629  // TODO: does double work here?
630  auto gui_value = proxy_->getValue<Eigen::Vector3f>(name);
631  const auto& quat = simox::math::quat_to_rpy(
633  if (quat != gui_value.get())
634  {
635  if (proxy_->hasValueChanged(name))
636  {
638  simox::math::rpy_to_quat(gui_value.get()));
639  value->setData(4 * sizeof(float), variant->getData());
640  }
641  else
642  {
643  proxy_->setValue(quat, name);
644  }
645  }
646  }
647 
648  void
649  GetValueFromMapVisitor::visitDictOnEnter(std::shared_ptr<data::Variant>& o,
650  const std::shared_ptr<type::Variant>& t)
651  {
652  in_list_ = true;
654  auto type = type::Dict::DynamicCast(t)->getAcceptedType()->getDescriptor();
655  if (std::find(implementedListDescriptors.begin(), implementedListDescriptors.end(), type) ==
656  implementedListDescriptors.end())
657  {
658  return;
659  }
660  const auto& elements = data->getElements();
661  std::map<std::string, std::string> changed_labels;
662  for (const auto& [idx, el] : elements)
663  {
664  const std::string name = pathToName(el);
665  if (proxy_->getButtonClicked(name + "_button"))
666  {
667  data->removeElement(idx);
668  tab_rebuild_required_ = true;
669  }
670  auto gui_value = proxy_->getValue<std::string>(name).get();
671  auto gui_key = proxy_->getValue<std::string>(name + "_lbl").get();
672  auto config_value = factories::VariantHelper::make(type)->to_string(el);
673  if (gui_value != config_value)
674  {
675  if (proxy_->hasValueChanged(name))
676  {
677  factories::VariantHelper::make(type)->set_value_from_string(el, gui_value);
678  }
679  else
680  {
681  proxy_->setValue(config_value, name);
682  }
683  }
684  if (gui_key != idx)
685  {
686  if (proxy_->hasValueChanged(name + "_lbl"))
687  {
688  changed_labels.emplace(idx, gui_key);
689  }
690  else
691  {
692  proxy_->setValue(idx, name + "_lbl");
693  }
694  }
695  }
696  // replace changed keys in map
697  for (const auto& [old_label, new_label] : changed_labels)
698  {
699  auto element = data->getElement(old_label);
700  data->removeElement(old_label);
701  auto variantHelper = factories::VariantHelper::make(type);
702  data->addElement(new_label,
703  variantHelper->from_string(
704  variantHelper->to_string(element),
705  o->getPath().withDetachedLastElement().withElement(new_label)));
706  tab_rebuild_required_ = true;
707  }
708 
709  if (proxy_->getButtonClicked(pathToName(o) + "_add"))
710  {
711  data->addElement("defaultKey",
712  factories::VariantHelper::make(type)->from_string(
713  "", o->getPath().withElement("defaultKey")));
714  tab_rebuild_required_ = true;
715  }
716  }
717 
718  void
719  GetValueFromMapVisitor::visitDictOnExit(std::shared_ptr<data::Variant>&,
720  const std::shared_ptr<type::Variant>&)
721  {
722  in_list_ = false;
723  }
724 } // namespace armarx::aron::component_config
725 
726 #undef INPUT_GUARD
armarx::RemoteGui::detail::GroupBoxBuilder
Definition: LayoutWidgets.h:166
armarx::aron::component_config::GetValueFromMapVisitor::visitIntEnum
void visitIntEnum(DataInput &, TypeInput &) override
Definition: RemoteGuiVisitors.cpp:488
armarx::aron::component_config::MakeConfigGuiVisitor::visitObjectOnEnter
void visitObjectOnEnter(DataInput &, TypeInput &) override
Definition: RemoteGuiVisitors.cpp:48
armarx::aron::component_config::MakeConfigGuiVisitor::visitQuaternion
void visitQuaternion(DataInput &input, TypeInput &typeInput) override
Definition: RemoteGuiVisitors.cpp:274
str
std::string str(const T &t)
Definition: UserAssistedSegmenterGuiWidgetController.cpp:42
armarx::aron::component_config::GetValueFromMapVisitor::getObjectElements
MapElements getObjectElements(DataInput &, TypeInput &) override
Definition: RemoteGuiVisitors.cpp:458
Util.h
armarx::RemoteGui::makeHBoxLayout
detail::HBoxLayoutBuilder makeHBoxLayout(std::string const &name="")
Definition: LayoutWidgets.h:230
armarx::aron::component_config
Definition: PropertyDefinitionVisitors.cpp:50
armarx::aron::component_config::getObjectElements
std::map< std::string, std::pair< typename std::remove_const< DataInputT >::type, typename std::remove_const< TypeInputT >::type > > getObjectElements(DataInputT &o, TypeInputT &t)
Definition: Util.h:50
armarx::RemoteGui::makeVector3fSpinBoxes
detail::Vector3fSpinBoxesBuilder makeVector3fSpinBoxes(std::string const &name, float limpos=1000)
Definition: Vector3fWidgets.h:113
armarx::aron::component_config::getTupleElements
std::vector< std::pair< typename std::remove_const< DataInputT >::type, typename std::remove_const< TypeInputT >::type > > getTupleElements(DataInputT &o, TypeInputT &t)
Definition: Util.h:143
armarx::aron::data::converter::AronEigenConverter::ConvertToMatrix4f
static Eigen::Matrix4f ConvertToMatrix4f(const data::NDArrayPtr &)
Definition: EigenConverter.cpp:57
armarx::aron::component_config::MakeConfigGuiVisitor::MakeConfigGuiVisitor
MakeConfigGuiVisitor(const std::string &name)
Definition: RemoteGuiVisitors.cpp:155
armarx::RemoteGui::makeButton
detail::ButtonBuilder makeButton(std::string const &name)
Definition: IntegerWidgets.h:48
armarx::aron::component_config::MakeConfigGuiVisitor::visitDictOnEnter
void visitDictOnEnter(DataInput &, TypeInput &) override
Definition: RemoteGuiVisitors.cpp:297
armarx::RemoteGui::makeLabel
detail::LabelBuilder makeLabel(std::string const &name)
Definition: StaticWidgets.h:17
armarx::aron::component_config::MakeConfigGuiVisitor::visitString
void visitString(DataInput &, TypeInput &) override
Definition: RemoteGuiVisitors.cpp:142
armarx::aron::component_config::GetValueFromMapVisitor::visitDouble
void visitDouble(DataInput &, TypeInput &) override
Definition: RemoteGuiVisitors.cpp:388
armarx::aron::data::converter::AronEigenConverter::ConvertFromMatrix
static data::NDArrayPtr ConvertFromMatrix(const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &mat)
Definition: EigenConverter.h:151
armarx::aron::data::converter::AronEigenConverter::ConvertFromQuaternion
static data::NDArrayPtr ConvertFromQuaternion(const Eigen::Quaternion< T > &quat)
Definition: EigenConverter.h:139
armarx::aron::component_config::MakeConfigGuiVisitor::visitListOnEnter
void visitListOnEnter(DataInput &, TypeInput &) override
Definition: RemoteGuiVisitors.cpp:167
armarx::Factory< VariantHelper, type::Descriptor >::make
static auto make(const type::Descriptor &s, Args &&... args)
Definition: SelfRegisteringFactory.h:58
armarx::aron::component_config::GetValueFromMapVisitor::visitInt
void visitInt(DataInput &, TypeInput &) override
Definition: RemoteGuiVisitors.cpp:346
RemoteGuiVisitors.h
armarx::aron::component_config::getDictElements
std::map< std::string, std::pair< typename std::remove_const< DataInputT >::type, typename std::remove_const< TypeInputT >::type > > getDictElements(DataInputT &o, TypeInputT &t)
Definition: Util.h:73
armarx::aron::component_config::MakeConfigGuiVisitor::getGroupBoxBuilder
RemoteGui::detail::GroupBoxBuilder getGroupBoxBuilder() const
Definition: RemoteGuiVisitors.cpp:161
armarx::max
std::vector< T > max(const std::vector< T > &v1, const std::vector< T > &v2)
Definition: VectorHelpers.h:267
std::experimental::fundamentals_v2::make_observer
observer_ptr< _Tp > make_observer(_Tp *__p) noexcept
armarx::RemoteGui::makeLineEdit
detail::LineEditBuilder makeLineEdit(std::string const &name)
Definition: StringWidgets.h:53
armarx::aron::data::RecursiveTypedVisitor< data::VariantPtr, const type::VariantPtr >::MapElements
std::map< std::string, std::pair< DataInputNonConst, TypeInputNonConst > > MapElements
Definition: RecursiveVisitor.h:86
detail
Definition: OpenCVUtil.cpp:127
armarx::aron::component_config::GetValueFromMapVisitor::visitMatrix
void visitMatrix(DataInput &elementData, TypeInput &elementType) override
Definition: RemoteGuiVisitors.cpp:572
armarx::aron::component_config::MakeConfigGuiVisitor::visitInt
void visitInt(DataInput &, TypeInput &) override
Definition: RemoteGuiVisitors.cpp:77
armarx::aron::component_config::GetValueFromMapVisitor::visitListOnExit
void visitListOnExit(DataInput &, TypeInput &) override
Definition: RemoteGuiVisitors.cpp:548
armarx::aron::component_config::GetValueFromMapVisitor::getPairElements
PairElements getPairElements(DataInput &, TypeInput &) override
Definition: RemoteGuiVisitors.cpp:476
armarx::aron::component_config::GetValueFromMapVisitor::GetValueFromMapVisitor
GetValueFromMapVisitor(armarx::RemoteGui::TabProxy *proxy)
Definition: RemoteGuiVisitors.cpp:340
INPUT_GUARD
#define INPUT_GUARD(i)
Definition: RemoteGuiVisitors.cpp:38
armarx::aron::component_config::MakeConfigGuiVisitor::visitDouble
void visitDouble(DataInput &, TypeInput &) override
Definition: RemoteGuiVisitors.cpp:111
armarx::aron::component_config::GetValueFromMapVisitor::visitBool
void visitBool(DataInput &, TypeInput &) override
Definition: RemoteGuiVisitors.cpp:410
armarx::aron::data::RecursiveTypedVisitor< data::VariantPtr, const type::VariantPtr >::PairElements
std::pair< std::pair< DataInputNonConst, TypeInputNonConst >, std::pair< DataInputNonConst, TypeInputNonConst > > PairElements
Definition: RecursiveVisitor.h:88
armarx::aron::data::detail::SpecializedVariantBase< data::dto::AronInt, Int >::DynamicCastAndCheck
static PointerType DynamicCastAndCheck(const VariantPtr &n)
Definition: SpecializedVariant.h:135
armarx::aron::component_config::GetValueFromMapVisitor::visitDictOnExit
void visitDictOnExit(DataInput &, TypeInput &) override
Definition: RemoteGuiVisitors.cpp:719
armarx::RemoteGui::makeSimpleGridLayout
detail::SimpleGridLayoutBuilder makeSimpleGridLayout(std::string const &name="")
Definition: LayoutWidgets.h:235
armarx::aron::component_config::GetValueFromMapVisitor::getDictElements
MapElements getDictElements(DataInput &, TypeInput &) override
Definition: RemoteGuiVisitors.cpp:464
armarx::aron::component_config::GetValueFromMapVisitor::visitQuaternion
void visitQuaternion(DataInput &elementData, TypeInput &elementType) override
Definition: RemoteGuiVisitors.cpp:623
VariantHelperFactory.h
armarx::RemoteGui::TabProxy
Definition: WidgetProxy.h:17
armarx::RemoteGui::detail::GroupBoxBuilder::collapsed
GroupBoxBuilder & collapsed(bool isCollapsed=true)
Definition: LayoutWidgets.h:176
cxxopts::value
std::shared_ptr< Value > value()
Definition: cxxopts.hpp:926
armarx::RemoteGui::makeIntSpinBox
detail::IntSpinBoxBuilder makeIntSpinBox(std::string const &name)
Definition: IntegerWidgets.h:38
armarx::aron::component_config::GetValueFromMapVisitor::tabRebuildRequired
bool tabRebuildRequired() const
Definition: RemoteGuiVisitors.cpp:566
armarx::RemoteGui::detail::ChildrenMixin::addChild
Derived & addChild(WidgetPtr const &child)
Definition: LayoutWidgets.h:22
M_PI
#define M_PI
Definition: MathTools.h:17
armarx::RemoteGui::makeCheckBox
detail::CheckBoxBuilder makeCheckBox(std::string const &name)
Definition: BoolWidgets.h:26
armarx::aron::data::RecursiveTypedVisitor< const data::VariantPtr, const type::VariantPtr >::TypeInput
typename TypedVisitorBase< const data::VariantPtr, const type::VariantPtr >::TypeInput TypeInput
Definition: RecursiveVisitor.h:81
armarx::aron::type::detail::SpecializedVariantBase< type::dto::List, List >::DynamicCast
static List & DynamicCast(Variant &n)
Definition: SpecializedVariant.h:106
data
uint8_t data[1]
Definition: EtherCATFrame.h:68
RemoteGui.h
armarx::aron::component_config::MakeConfigGuiVisitor::visitMatrix
void visitMatrix(DataInput &input, TypeInput &typeInput) override
Definition: RemoteGuiVisitors.cpp:246
armarx::RemoteGui::detail::ValueMixin::value
Derived & value(ValueT const &value)
Definition: Basic.h:77
All.h
armarx::RemoteGui::detail::LabelMixin::label
Derived & label(std::string const &label)
Definition: Basic.h:191
armarx::RemoteGui::detail::ToolTipMixin::toolTip
Derived & toolTip(std::string const &toolTip)
Definition: Basic.h:202
armarx::RemoteGui::makeGroupBox
detail::GroupBoxBuilder makeGroupBox(std::string const &name="")
Definition: LayoutWidgets.h:250
armarx::aron::component_config::GetValueFromMapVisitor::visitListOnEnter
void visitListOnEnter(DataInput &, TypeInput &) override
Definition: RemoteGuiVisitors.cpp:511
EigenConverter.h
armarx::aron::component_config::GetValueFromMapVisitor::visitString
void visitString(DataInput &, TypeInput &) override
Definition: RemoteGuiVisitors.cpp:431
armarx::aron::type::List::getAcceptedType
VariantPtr getAcceptedType() const
Definition: List.cpp:43
q
#define q
armarx::aron::component_config::MakeConfigGuiVisitor::visitIntEnum
void visitIntEnum(DataInput &, TypeInput &) override
Definition: RemoteGuiVisitors.cpp:229
armarx::aron::data::converter::AronEigenConverter::ConvertToQuaternionf
static Eigen::Quaternion< float > ConvertToQuaternionf(const data::NDArrayPtr &)
Definition: EigenConverter.cpp:33
armarx::to_string
const std::string & to_string(const std::string &s)
Definition: StringHelpers.h:40
Iterator.h
armarx::aron::data::RecursiveTypedVisitor< const data::VariantPtr, const type::VariantPtr >::DataInput
typename TypedVisitorBase< const data::VariantPtr, const type::VariantPtr >::DataInput DataInput
Definition: RecursiveVisitor.h:80
armarx::aron::component_config::MakeConfigGuiVisitor::visitDictOnExit
void visitDictOnExit(DataInput &, TypeInput &) override
Definition: RemoteGuiVisitors.cpp:334
armarx::aron::component_config::getPairElements
std::pair< std::pair< typename std::remove_const< DataInputT >::type, typename std::remove_const< TypeInputT >::type >, std::pair< typename std::remove_const< DataInputT >::type, typename std::remove_const< TypeInputT >::type > > getPairElements(DataInputT &o, TypeInputT &t)
Definition: Util.h:122
GfxTL::Matrix4f
MatrixXX< 4, 4, float > Matrix4f
Definition: MatrixXX.h:601
armarx::RemoteGui::makePosRPYSpinBoxes
detail::PosRPYSpinBoxesBuilder makePosRPYSpinBoxes(std::string const &name, float limpos=1000, float limrpy=M_PI)
Definition: Matrix4fWidgets.h:74
armarx::aron::component_config::getListElements
std::vector< std::pair< typename std::remove_const< DataInputT >::type, typename std::remove_const< TypeInputT >::type > > getListElements(DataInputT &o, TypeInputT &t)
Definition: Util.h:97
armarx::aron::component_config::pathToName
std::string pathToName(const std::shared_ptr< data::Variant > &v)
Definition: Util.h:36
std
Definition: Application.h:66
armarx::RemoteGui::detail::SimpleGridLayoutBuilder::cols
SimpleGridLayoutBuilder & cols(int n)
Definition: LayoutWidgets.h:108
armarx::min
std::vector< T > min(const std::vector< T > &v1, const std::vector< T > &v2)
Definition: VectorHelpers.h:294
armarx::aron::component_config::MakeConfigGuiVisitor::visitBool
void visitBool(DataInput &, TypeInput &) override
Definition: RemoteGuiVisitors.cpp:128
armarx::aron::component_config::MakeConfigGuiVisitor::visitObjectOnExit
void visitObjectOnExit(DataInput &, TypeInput &) override
Definition: RemoteGuiVisitors.cpp:65
armarx::MakeIndexedContainer
auto MakeIndexedContainer(Container &c, Containers &...cs)
Definition: Iterator.h:172
armarx::aron::type::detail::SpecializedVariantBase< type::dto::IntEnum, IntEnum >::DynamicCastAndCheck
static std::shared_ptr< IntEnum > DynamicCastAndCheck(const VariantPtr &n)
Definition: SpecializedVariant.h:124
armarx::aron::type::Dict::getAcceptedType
VariantPtr getAcceptedType() const
Definition: Dict.cpp:42
armarx::RemoteGui::makeComboBox
detail::ComboBoxBuilder makeComboBox(std::string const &name)
Definition: StringWidgets.h:58
armarx::aron::data::RecursiveTypedVisitor< data::VariantPtr, const type::VariantPtr >::ListElements
std::vector< std::pair< DataInputNonConst, TypeInputNonConst > > ListElements
Definition: RecursiveVisitor.h:87
armarx::aron::component_config::GetValueFromMapVisitor::visitFloat
void visitFloat(DataInput &, TypeInput &) override
Definition: RemoteGuiVisitors.cpp:367
armarx::aron::component_config::GetValueFromMapVisitor::getTupleElements
TupleElements getTupleElements(DataInput &, TypeInput &) override
Definition: RemoteGuiVisitors.cpp:482
armarx::aron::component_config::MakeConfigGuiVisitor::visitFloat
void visitFloat(DataInput &, TypeInput &) override
Definition: RemoteGuiVisitors.cpp:94
armarx::aron::type::Descriptor
Descriptor
Definition: Descriptor.h:76
armarx::RemoteGui::makeFloatSpinBox
detail::FloatSpinBoxBuilder makeFloatSpinBox(std::string const &name)
Definition: FloatWidgets.h:52
armarx::aron::component_config::GetValueFromMapVisitor::getDescriptor
type::Descriptor getDescriptor(DataInput &, TypeInput &) override
Definition: RemoteGuiVisitors.cpp:452
armarx::aron::component_config::GetValueFromMapVisitor::visitDictOnEnter
void visitDictOnEnter(DataInput &, TypeInput &) override
Definition: RemoteGuiVisitors.cpp:649
armarx::aron::component_config::MakeConfigGuiVisitor::visitListOnExit
void visitListOnExit(DataInput &, TypeInput &) override
Definition: RemoteGuiVisitors.cpp:207
armarx::aron::component_config::GetValueFromMapVisitor::getListElements
ListElements getListElements(DataInput &, TypeInput &) override
Definition: RemoteGuiVisitors.cpp:470
armarx::aron::data::ConstTypedVariantVisitor::GetDescriptor
static type::Descriptor GetDescriptor(DataInput &i, TypeInput &j)
Definition: VariantVisitor.cpp:117
armarx::aron::data::converter::AronEigenConverter::ConvertToVector3f
static Eigen::Vector3f ConvertToVector3f(const data::NDArrayPtr &)
Definition: EigenConverter.cpp:45
armarx::aron::data::RecursiveTypedVisitor< data::VariantPtr, const type::VariantPtr >::TupleElements
std::vector< std::pair< DataInputNonConst, TypeInputNonConst > > TupleElements
Definition: RecursiveVisitor.h:89