WidgetDescription.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 ArmarXGui::ArmarXObjects::WidgetDescription
17 * @author Raphael Grimm ( raphael dot grimm at kit dot edu )
18 * @date 2017
19 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20 * GNU General Public License
21 */
22
23#include "WidgetDescription.h"
24
25#include <QCheckBox>
26#include <QComboBox>
27#include <QDoubleSpinBox>
28#include <QDoubleValidator>
29#include <QFormLayout>
30#include <QGroupBox>
31#include <QHBoxLayout>
32#include <QLabel>
33#include <QLineEdit>
34#include <QPointer>
35#include <QSlider>
36#include <QSpacerItem>
37#include <QSpinBox>
38#include <QStandardItemModel>
39#include <QStyledItemDelegate>
40#include <QVBoxLayout>
41
45
46#include <ArmarXGui/interface/WidgetDescription.h>
48#pragma GCC diagnostic push
49#pragma GCC diagnostic ignored "-Wpedantic"
50#include <qwt_slider.h>
51
53#pragma GCC diagnostic pop
54
56{
58 {
59 public:
64
65 std::map<std::string, VariantBasePtr>
66 getVariants() override
67 {
68 return {};
69 }
70 };
71
74
75 //Layouts
77 {
78 public:
81 {
82 VBoxLayoutPtr ptr = VBoxLayoutPtr::dynamicCast(p);
84 setLayout(new QVBoxLayout);
85 layout()->setContentsMargins(0, 0, 0, 0);
86 for (const WidgetPtr& childPtr : ptr->children)
87 {
88 layout()->addWidget(addChild(childPtr));
89 }
90 }
91 };
92
95
97 {
98 public:
101 {
102 HBoxLayoutPtr ptr = HBoxLayoutPtr::dynamicCast(p);
104 setLayout(new QHBoxLayout);
105 layout()->setContentsMargins(0, 0, 0, 0);
106 for (const WidgetPtr& childPtr : ptr->children)
107 {
108 layout()->addWidget(addChild(childPtr));
109 }
110 }
111 };
112
115
117 {
118 public:
121 {
122 FormLayoutPtr ptr = FormLayoutPtr::dynamicCast(p);
124 auto l = new QFormLayout;
125 setLayout(l);
126 layout()->setContentsMargins(0, 0, 0, 0);
127 for (const FormLayoutElementPtr& child : ptr->children)
128 {
129 if (child->childIsSpanning)
130 {
131 l->addRow(addChild(child->child));
132 continue;
133 }
134 if (child->labelWidget)
135 {
136 l->addRow(addChild(child->labelWidget), addChild(child->child));
137 continue;
138 }
139 l->addRow(QString::fromStdString(child->label), addChild(child->child));
140 }
141 }
142 };
143
146
148 {
149 public:
152 {
153 FormLayoutElementPtr ptr = FormLayoutElementPtr::dynamicCast(p);
155 auto l = new QFormLayout;
156 setLayout(l);
157 layout()->setContentsMargins(0, 0, 0, 0);
158 if (ptr->childIsSpanning)
159 {
160 l->addRow(addChild(ptr->child));
161 }
162 if (ptr->labelWidget)
163 {
164 l->addRow(addChild(ptr->labelWidget), addChild(ptr->child));
165 }
166 l->addRow(QString::fromStdString(ptr->label), addChild(ptr->child));
167 }
168 };
169
170 DescribedWidgetFactoryRegistration<DescribedFormLayoutElement>
171 registerDescribedFormLayoutElement{FormLayoutElement::ice_staticId()};
172
174 {
175 public:
178 {
179 GroupBoxPtr ptr = GroupBoxPtr::dynamicCast(p);
181 auto ltop = new QHBoxLayout;
182 setLayout(ltop);
183 layout()->setContentsMargins(0, 0, 0, 0);
184 QGroupBox* grp = new QGroupBox;
185 ltop->addWidget(grp);
186 grp->setTitle(QString::fromStdString(ptr->label));
187 auto l = new QHBoxLayout;
188 grp->setLayout(l);
189 l->setContentsMargins(0, 9, 0, 0);
190 l->addWidget(addChild(ptr->child));
191 }
192 };
193
196
197 //static elements
199 {
200 public:
203 {
204 setLayout(new QVBoxLayout);
205 layout()->setContentsMargins(0, 0, 0, 0);
206 layout()->addItem(new QSpacerItem(0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding));
207 }
208
209 std::map<std::string, VariantBasePtr>
210 getVariants() override
211 {
212 return {};
213 }
214 };
215
218
220 {
221 public:
224 {
225 setLayout(new QVBoxLayout);
226 layout()->setContentsMargins(0, 0, 0, 0);
227 layout()->addItem(new QSpacerItem(0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding));
228 }
229
230 std::map<std::string, VariantBasePtr>
231 getVariants() override
232 {
233 return {};
234 }
235 };
236
239
241 {
242 public:
244 {
245 setFrameShape(QFrame::HLine);
246 setFrameShadow(QFrame::Sunken);
247 }
248
249 std::map<std::string, VariantBasePtr>
250 getVariants() override
251 {
252 return {};
253 }
254 };
255
258
260 {
261 public:
263 {
264 setFrameShape(QFrame::VLine);
265 setFrameShadow(QFrame::Sunken);
266 }
267
268 std::map<std::string, VariantBasePtr>
269 getVariants() override
270 {
271 return {};
272 }
273 };
274
277
279 {
280 public:
282 {
283 auto ptr = LabelPtr::dynamicCast(p);
285 setLayout(new QVBoxLayout);
286 layout()->setContentsMargins(0, 0, 0, 0);
287 layout()->addWidget(new QLabel(QString::fromStdString(ptr->text)));
288 }
289
290 std::map<std::string, VariantBasePtr>
291 getVariants() override
292 {
293 return {};
294 }
295 };
296
299
300 //dynamic content elements
302 {
303 public:
306 {
307 auto ptr = VariantWidgetPtr::dynamicCast(p);
309 setName(ptr->name);
310 setLayout(new QVBoxLayout);
311 child = new armarx::VariantWidget;
312 layout()->setContentsMargins(0, 0, 0, 0);
313 layout()->addWidget(child);
314 }
315
316 void
317 variantWidgetUpdatedSlot(std::string name,
318 VariantWidgetContent::VariantWidgetContentBasePtr data) override
319 {
320 if (name != getName())
321 {
322 return;
323 }
324 if (!data)
325 {
326 child->update(nullptr);
327 }
328 else if (data->ice_id() == VariantWidgetContent::SingleVariant::ice_staticId())
329 {
330 child->update(VariantWidgetContent::SingleVariantPtr::dynamicCast(data)->content);
331 }
332 else if (data->ice_id() == VariantWidgetContent::VariantMap::ice_staticId())
333 {
334 child->update(VariantWidgetContent::VariantMapPtr::dynamicCast(data)->content);
335 }
336 else if (data->ice_id() == VariantWidgetContent::VariantSeq::ice_staticId())
337 {
338 child->update(VariantWidgetContent::VariantSeqPtr::dynamicCast(data)->content);
339 }
340 }
341
342 private:
344 };
345
348
349 //config elements
351 {
352 public:
355 {
356 CheckBoxPtr ptr = CheckBoxPtr::dynamicCast(p);
358 setName(ptr->name);
359 setLayout(new QVBoxLayout);
360 layout()->setContentsMargins(0, 0, 0, 0);
361 child = new QCheckBox{QString::fromStdString(ptr->label)};
362 child->setChecked(ptr->defaultValue);
363 layout()->addWidget(child);
364 connect(child, SIGNAL(clicked(bool)), this, SLOT(contentUpdated()));
365 }
366
367 std::map<std::string, VariantBasePtr>
368 getVariants() override
369 {
370 return {{getName(), new Variant{child->isChecked()}}};
371 }
372
373 private:
374 QCheckBox* child;
375
376 protected:
377 void
378 contentUpdated() override
379 {
380 emit valueChangedSignal(getName(), new Variant(child->isChecked()));
381 }
382 };
383
386
388 {
389 public:
392 {
393 IntSpinBoxPtr ptr = IntSpinBoxPtr::dynamicCast(p);
395 setName(ptr->name);
396 setLayout(new QVBoxLayout);
397 layout()->setContentsMargins(0, 0, 0, 0);
398 child = new QSpinBox{};
399 child->setMaximum(ptr->max);
400 child->setMinimum(ptr->min);
401 child->setValue(ptr->defaultValue);
402 layout()->addWidget(child);
403 connect(child, SIGNAL(valueChanged(int)), this, SLOT(contentUpdated()));
404 }
405
406 std::map<std::string, VariantBasePtr>
407 getVariants() override
408 {
409 return {{getName(), new Variant(child->value())}};
410 }
411
412 private:
413 QSpinBox* child;
414
415 protected:
416 void
417 contentUpdated() override
418 {
419 emit valueChangedSignal(getName(), new Variant(child->value()));
420 }
421 };
422
425
427 {
428 public:
431 {
432 DoubleSpinBoxPtr ptr = DoubleSpinBoxPtr::dynamicCast(p);
434 setName(ptr->name);
435 setLayout(new QVBoxLayout);
436 layout()->setContentsMargins(0, 0, 0, 0);
437 child = new QDoubleSpinBox{};
438 child->setMaximum(ptr->max);
439 child->setMinimum(ptr->min);
440 child->setDecimals(ptr->decimals);
441 child->setValue(ptr->defaultValue);
442 child->setSingleStep((ptr->max - ptr->min) / ptr->steps);
443 layout()->addWidget(child);
444 connect(child, SIGNAL(valueChanged(double)), this, SLOT(contentUpdated()));
445 }
446
447 std::map<std::string, VariantBasePtr>
448 getVariants() override
449 {
450 return {{getName(), new Variant(child->value())}};
451 }
452
453 private:
454 QDoubleSpinBox* child;
455
456 protected:
457 void
458 contentUpdated() override
459 {
460 emit valueChangedSignal(getName(), new Variant(child->value()));
461 }
462 };
463
466
468 {
469 public:
472 {
473 FloatSpinBoxPtr ptr = FloatSpinBoxPtr::dynamicCast(p);
475 setName(ptr->name);
476 setLayout(new QVBoxLayout);
477 layout()->setContentsMargins(0, 0, 0, 0);
478 child = new QDoubleSpinBox{};
479 child->setMaximum(ptr->max);
480 child->setMinimum(ptr->min);
481 child->setDecimals(ptr->decimals);
482 child->setValue(ptr->defaultValue);
483 child->setSingleStep((ptr->max - ptr->min) / ptr->steps);
484 layout()->addWidget(child);
485 connect(child, SIGNAL(valueChanged(double)), this, SLOT(contentUpdated()));
486 }
487
488 std::map<std::string, VariantBasePtr>
489 getVariants() override
490 {
491 return {{getName(), new Variant(static_cast<float>(child->value()))}};
492 }
493
494 private:
495 QDoubleSpinBox* child;
496
497 protected:
498 void
499 contentUpdated() override
500 {
501 emit valueChangedSignal(getName(), new Variant(static_cast<float>(child->value())));
502 }
503 };
504
507
508 class SubclassOfQStyledItemDelegate : public QStyledItemDelegate
509 {
510 public:
511 SubclassOfQStyledItemDelegate(QObject* parent = 0) : QStyledItemDelegate(parent)
512 {
513 }
514
515 void
516 paint(QPainter* painter_,
517 const QStyleOptionViewItem& option_,
518 const QModelIndex& index_) const override
519 {
520 QStyleOptionViewItem& refToNonConstOption = const_cast<QStyleOptionViewItem&>(option_);
521 refToNonConstOption.showDecorationSelected = false;
522 //refToNonConstOption.state &= ~QStyle::State_HasFocus & ~QStyle::State_MouseOver;
523
524 QStyledItemDelegate::paint(painter_, refToNonConstOption, index_);
525 }
526 };
527
529 {
530 public:
533 {
534 StringComboBoxPtr ptr = StringComboBoxPtr::dynamicCast(p);
536 setName(ptr->name);
537 setLayout(new QVBoxLayout);
538 layout()->setContentsMargins(0, 0, 0, 0);
539 child = new QComboBox{};
540 multiSelect = ptr->multiSelect;
541 if (multiSelect)
542 {
543 model = new QStandardItemModel(ptr->options.size() + 1, 1);
544 QStandardItem* item = new QStandardItem("Please select items");
545 item->setFlags(Qt::NoItemFlags);
546 model->setItem(0, 0, item);
547
548 int row = 1;
549 for (const auto& opt : ptr->options)
550 {
551 QStandardItem* item = new QStandardItem(QString::fromStdString(opt));
552
553 item->setFlags(Qt::ItemIsUserCheckable | Qt::ItemIsEnabled);
554 item->setData(Qt::Unchecked, Qt::CheckStateRole);
555
556 model->setItem(row, 0, item);
557 row++;
558 }
559 model->setParent(child);
560 child->setModel(model);
562 child->setItemDelegate(delegate);
563 child->setCurrentIndex(-1);
564 }
565 else
566 {
567 for (const auto& opt : ptr->options)
568 {
569 child->addItem(QString::fromStdString(opt));
570 }
571 ARMARX_CHECK_GREATER(ptr->options.size(),
572 static_cast<std::size_t>(ptr->defaultIndex));
573 child->setCurrentIndex(
574 child->findText(QString::fromStdString(ptr->options.at(ptr->defaultIndex))));
575 }
576 layout()->addWidget(child);
577
578 connect(child, SIGNAL(currentIndexChanged(int)), this, SLOT(contentUpdated()));
579 }
580
581 std::map<std::string, VariantBasePtr>
582 getVariants() override
583 {
584 if (multiSelect)
585 {
587 for (int i = 0; i < child->model()->rowCount(); ++i)
588 {
589 if (model->item(i)->checkState() == Qt::Checked)
590 {
591
592 list->addVariant(child->itemText(i).toStdString());
593 }
594 }
595 ARMARX_DEBUG << "selected items: " << list->output();
596 return {{getName(), new Variant{list}}};
597 }
598 else
599 {
600 return {{getName(), new Variant{child->currentText().toStdString()}}};
601 }
602 }
603
604 private:
605 QPointer<QStandardItemModel> model = nullptr;
606 QComboBox* child;
607 bool multiSelect = false;
608
609 protected:
610 void
611 contentUpdated() override
612 {
613 emit valueChangedSignal(getName(), new Variant{child->currentText().toStdString()});
614 }
615 };
616
619
621 {
622 public:
625 {
626 LineEditPtr ptr = LineEditPtr::dynamicCast(p);
628 setName(ptr->name);
629 setLayout(new QVBoxLayout);
630 layout()->setContentsMargins(0, 0, 0, 0);
631 child = new QLineEdit{};
632 child->setText(QString::fromStdString(ptr->defaultValue));
633 layout()->addWidget(child);
634 connect(child, SIGNAL(editingFinished()), this, SLOT(contentUpdated()));
635 }
636
637 std::map<std::string, VariantBasePtr>
638 getVariants() override
639 {
640 return {{getName(), new Variant{child->text().toStdString()}}};
641 }
642
643 private:
644 QLineEdit* child;
645
646 protected:
647 void
648 contentUpdated() override
649 {
650 emit valueChangedSignal(getName(), new Variant{child->text().toStdString()});
651 }
652 };
653
656
658 {
659 public:
662 {
663 DoubleLineEditPtr ptr = DoubleLineEditPtr::dynamicCast(p);
665 setName(ptr->name);
666 setLayout(new QVBoxLayout);
667 layout()->setContentsMargins(0, 0, 0, 0);
668 child = new QLineEdit{};
669 child->setText(QString::number(ptr->defaultValue));
670 child->setValidator(new QDoubleValidator{this});
671 layout()->addWidget(child);
672 connect(child, SIGNAL(editingFinished()), this, SLOT(contentUpdated()));
673 }
674
675 std::map<std::string, VariantBasePtr>
676 getVariants() override
677 {
678 return {{getName(), new Variant{child->text().toDouble()}}};
679 }
680
681 private:
682 QLineEdit* child;
683
684 protected:
685 void
686 contentUpdated() override
687 {
688 emit valueChangedSignal(getName(), new Variant{child->text().toDouble()});
689 }
690 };
691
694
696 {
697 public:
700 {
701 FloatLineEditPtr ptr = FloatLineEditPtr::dynamicCast(p);
703 setName(ptr->name);
704 setLayout(new QVBoxLayout);
705 layout()->setContentsMargins(0, 0, 0, 0);
706 child = new QLineEdit{};
707 child->setText(QString::number(ptr->defaultValue));
708 child->setValidator(new QDoubleValidator{this});
709 layout()->addWidget(child);
710 connect(child, SIGNAL(editingFinished()), this, SLOT(contentUpdated()));
711 }
712
713 std::map<std::string, VariantBasePtr>
714 getVariants() override
715 {
716 return {{getName(), new Variant{static_cast<float>(child->text().toDouble())}}};
717 }
718
719 private:
720 QLineEdit* child;
721
722 protected:
723 void
724 contentUpdated() override
725 {
727 new Variant{static_cast<float>(child->text().toDouble())});
728 }
729 };
730
733
735 {
736 public:
739 {
740 IntSliderPtr ptr = IntSliderPtr::dynamicCast(p);
742 setName(ptr->name);
743 setLayout(new QVBoxLayout);
744 layout()->setContentsMargins(0, 0, 0, 0);
745 child = new QSlider{};
746 child->setMaximum(ptr->max);
747 child->setMinimum(ptr->min);
748 child->setValue(ptr->defaultValue);
749 layout()->addWidget(child);
750 connect(child, SIGNAL(valueChanged(int)), this, SLOT(contentUpdated()));
751 }
752
753 std::map<std::string, VariantBasePtr>
754 getVariants() override
755 {
756 return {{getName(), new Variant(child->value())}};
757 }
758
759 private:
760 QSlider* child;
761
762 protected:
763 void
764 contentUpdated() override
765 {
766 emit valueChangedSignal(getName(), new Variant(child->value()));
767 }
768 };
769
772
774 {
775 public:
778 {
779 DoubleSliderPtr ptr = DoubleSliderPtr::dynamicCast(p);
781 setName(ptr->name);
782 setLayout(new QVBoxLayout);
783 layout()->setContentsMargins(0, 0, 0, 0);
784 child = new QwtSlider{this};
785 child->setScale(ptr->min, ptr->max);
786 child->setOrientation(Qt::Horizontal);
787 child->setValue(ptr->defaultValue);
788 doubleLabel = new QLabel(QString::number(ptr->defaultValue, 'g', 4), this);
789 layout()->addWidget(child);
790 connect(child, SIGNAL(valueChanged(double)), this, SLOT(contentUpdated()));
791 }
792
793 std::map<std::string, VariantBasePtr>
794 getVariants() override
795 {
796 return {{getName(), new Variant(child->value())}};
797 }
798
799 private:
800 QwtSlider* child;
801 QLabel* doubleLabel;
802
803 protected:
804 void
805 contentUpdated() override
806 {
807 doubleLabel->setText(QString::number(child->value(), 'g', 4));
808 emit valueChangedSignal(getName(), new Variant(child->value()));
809 }
810 };
811
814
816 {
817 public:
820 {
821 FloatSliderPtr ptr = FloatSliderPtr::dynamicCast(p);
823 setName(ptr->name);
824 setLayout(new QHBoxLayout);
825 layout()->setContentsMargins(0, 0, 0, 0);
826 child = new QwtSlider{this};
827 child->setScale(ptr->min, ptr->max);
828 child->setOrientation(Qt::Horizontal);
829 child->setValue(ptr->defaultValue);
830 floatLabel = new QLabel(QString::number(ptr->defaultValue, 'g', 4), this);
831 layout()->addWidget(child);
832 layout()->addWidget(floatLabel);
833 connect(child, SIGNAL(valueChanged(double)), this, SLOT(contentUpdated()));
834 }
835
836 std::map<std::string, VariantBasePtr>
837 getVariants() override
838 {
839 return {{getName(), new Variant(static_cast<float>(child->value()))}};
840 }
841
842 private:
843 QwtSlider* child;
844 QLabel* floatLabel;
845
846 protected:
847 void
848 contentUpdated() override
849 {
850 floatLabel->setText(QString::number(child->value(), 'g', 4));
851 emit valueChangedSignal(getName(), new Variant(static_cast<float>(child->value())));
852 }
853 };
854
857
858 //functions from base classes
864
865 std::map<std::string, VariantBasePtr>
867 {
868 std::map<std::string, VariantBasePtr> result;
869 for (DescribedWidgetBase* child : children)
870 {
871 mergeMaps(result, child->getVariants());
872 }
873 return result;
874 }
875
878 {
881 children.emplace_back(c);
882 connect(this,
884 std::string, VariantWidgetContent::VariantWidgetContentBasePtr)),
885 c,
886 SLOT(variantWidgetUpdatedSlot(std::string,
887 VariantWidgetContent::VariantWidgetContentBasePtr)));
888 return c;
889 }
890
893 {
894 class ErrorMessageWidget : public DescribedWidgetBase
895 {
896 public:
897 ErrorMessageWidget(const std::string& errorMessage) : DescribedWidgetBase(nullptr)
898 {
899 setLayout(new QVBoxLayout);
900 setName(".ErrorMessageWidget");
901 layout()->setContentsMargins(0, 0, 0, 0);
902 QLabel* label = new QLabel{QString::fromStdString(errorMessage)};
903 layout()->addWidget(label);
904 label->setStyleSheet("QLabel { background-color : yellow; color : red; }");
905 }
906 };
907
908 if (!p)
909 {
910 return new ErrorMessageWidget{"Null WidgetPtr"};
911 }
912 auto type = p->ice_id();
914 {
915 try
916 {
917 auto w = DescribedWidgetFactory::get(type)(p, listener);
918 if (listener)
919 {
920 QObject::connect(w,
921 SIGNAL(valueChangedSignal(std::string, VariantBasePtr)),
922 listener,
923 SLOT(valueChangedSlot(std::string, VariantBasePtr)));
924 }
925 return w;
926 }
927 catch (std::exception& e)
928 {
929 return new ErrorMessageWidget{"DescribedWidgetFactory for " + type +
930 " threw exception\n" + e.what()};
931 }
932 catch (...)
933 {
934 return new ErrorMessageWidget{"DescribedWidgetFactory for " + type +
935 " threw exception"};
936 }
937 }
938 else
939 {
940 return new ErrorMessageWidget{"No DescribedWidgetFactory for " + type};
941 }
942 return new ErrorMessageWidget{"makeDescribedWidget: Unknown error"};
943 }
944
946 {
947 if (ptr && ptr->framed)
948 {
949 setFrameShape(QFrame::StyledPanel);
950 }
951 }
952
954 {
955 setFrameShape(QFrame::NoFrame);
956 setFrameShadow(QFrame::Raised);
957 }
958
959} // namespace armarx::WidgetDescription
constexpr T c
static const std::function< DescribedWidgetBase *(const WidgetPtr &, ValueChangedListenerInterface *)> & get(const std::string &key)
Definition Registrar.h:85
The SingleTypeVariantList class is a subclass of VariantContainer and is comparable to a std::vector<...
The Variant class is described here: Variants.
Definition Variant.h:224
std::map< std::string, VariantBasePtr > getVariants() override
DescribedCheckBox(const WidgetPtr &p, ValueChangedListenerInterface *)
DescribedDoubleLineEdit(const WidgetPtr &p, ValueChangedListenerInterface *)
std::map< std::string, VariantBasePtr > getVariants() override
DescribedDoubleSlider(const WidgetPtr &p, ValueChangedListenerInterface *)
std::map< std::string, VariantBasePtr > getVariants() override
DescribedDoubleSpinBox(const WidgetPtr &p, ValueChangedListenerInterface *)
std::map< std::string, VariantBasePtr > getVariants() override
DescribedFloatLineEdit(const WidgetPtr &p, ValueChangedListenerInterface *)
std::map< std::string, VariantBasePtr > getVariants() override
std::map< std::string, VariantBasePtr > getVariants() override
DescribedFloatSlider(const WidgetPtr &p, ValueChangedListenerInterface *)
std::map< std::string, VariantBasePtr > getVariants() override
DescribedFloatSpinBox(const WidgetPtr &p, ValueChangedListenerInterface *)
DescribedFormLayoutElement(const WidgetPtr &p, ValueChangedListenerInterface *listener)
DescribedFormLayout(const WidgetPtr &p, ValueChangedListenerInterface *listener)
DescribedGroupBox(const WidgetPtr &p, ValueChangedListenerInterface *listener)
DescribedHBoxLayout(const WidgetPtr &p, ValueChangedListenerInterface *listener)
DescribedHLine(const WidgetPtr &p, ValueChangedListenerInterface *)
std::map< std::string, VariantBasePtr > getVariants() override
std::map< std::string, VariantBasePtr > getVariants() override
DescribedHSpacer(const WidgetPtr &p, ValueChangedListenerInterface *)
DescribedIntSlider(const WidgetPtr &p, ValueChangedListenerInterface *)
std::map< std::string, VariantBasePtr > getVariants() override
DescribedIntSpinBox(const WidgetPtr &p, ValueChangedListenerInterface *)
std::map< std::string, VariantBasePtr > getVariants() override
DescribedLabel(const WidgetPtr &p, ValueChangedListenerInterface *)
std::map< std::string, VariantBasePtr > getVariants() override
std::map< std::string, VariantBasePtr > getVariants() override
DescribedLineEdit(const WidgetPtr &p, ValueChangedListenerInterface *)
std::map< std::string, VariantBasePtr > getVariants() override
DescribedStringComboBox(const WidgetPtr &p, ValueChangedListenerInterface *)
DescribedVBoxLayout(const WidgetPtr &p, ValueChangedListenerInterface *listener)
DescribedVLine(const WidgetPtr &p, ValueChangedListenerInterface *)
std::map< std::string, VariantBasePtr > getVariants() override
DescribedVSpacer(const WidgetPtr &p, ValueChangedListenerInterface *)
std::map< std::string, VariantBasePtr > getVariants() override
DescribedVariantWidget(const WidgetPtr &p, ValueChangedListenerInterface *)
void variantWidgetUpdatedSlot(std::string name, VariantWidgetContent::VariantWidgetContentBasePtr data) override
virtual void setName(const std::string &name)
void variantWidgetUpdatedSignal(std::string name, VariantWidgetContent::VariantWidgetContentBasePtr data)
void valueChangedSignal(std::string name, VariantBasePtr value)
DescribedWidgetLayoutBase(WidgetPtr ptr, ValueChangedListenerInterface *listener)
virtual DescribedWidgetBase * addChild(const WidgetPtr &childPtr)
std::map< std::string, VariantBasePtr > getVariants() override
void variantWidgetUpdatedSlot(std::string name, VariantWidgetContent::VariantWidgetContentBasePtr data) override
DescribedWidget(const WidgetPtr &ptr, ValueChangedListenerInterface *)
std::map< std::string, VariantBasePtr > getVariants() override
void paint(QPainter *painter_, const QStyleOptionViewItem &option_, const QModelIndex &index_) const override
#define ARMARX_CHECK_GREATER(lhs, rhs)
This macro evaluates whether lhs is greater (>) than rhs and if it turns out to be false it will thro...
#define ARMARX_CHECK_EXPRESSION(expression)
This macro evaluates the expression and if it turns out to be false it will throw an ExpressionExcept...
#define ARMARX_CHECK_NOT_NULL(ptr)
This macro evaluates whether ptr is not null and if it turns out to be false it will throw an Express...
#define ARMARX_DEBUG
The logging level for output that is only interesting while debugging.
Definition Logging.h:184
DescribedWidgetFactoryRegistration< DescribedLineEdit > registerDescribedLineEdit
DescribedWidgetFactoryRegistration< DescribedVSpacer > registerDescribedVSpacer
DescribedWidgetFactoryRegistration< DescribedIntSpinBox > registerDescribedIntSpinBox
DescribedWidgetFactoryRegistration< DescribedVBoxLayout > registerDescribedVBoxLayout
DescribedWidgetFactoryRegistration< DescribedStringComboBox > registerDescribedStringComboBox
DescribedWidgetFactoryRegistration< DescribedLabel > registerDescribedLabel
DescribedWidgetBase * makeDescribedWidget(const WidgetPtr &p, ValueChangedListenerInterface *listener)
DescribedWidgetFactoryRegistration< DescribedDoubleSlider > registerDescribedDoubleSlider
DescribedWidgetFactoryRegistration< DescribedFloatSpinBox > registerDescribedFloatSpinBox
DescribedWidgetFactoryRegistration< DescribedFloatLineEdit > registerDescribedFloatLineEdit
DescribedWidgetFactoryRegistration< DescribedCheckBox > registerDescribedCheckBox
DescribedWidgetFactoryRegistration< DescribedFloatSlider > registerDescribedFloatSlider
DescribedWidgetFactoryRegistration< DescribedHBoxLayout > registerDescribedHBoxLayout
DescribedWidgetFactoryRegistration< DescribedFormLayoutElement > registerDescribedFormLayoutElement
::IceInternal::Handle<::armarx::WidgetDescription::Widget > WidgetPtr
DescribedWidgetFactoryRegistration< DescribedDoubleLineEdit > registerDescribedDoubleLineEdit
DescribedWidgetFactoryRegistration< DescribedVariantWidget > registerDescribedVariantWidget
DescribedWidgetFactoryRegistration< DescribedFormLayout > registerDescribedFormLayout
DescribedWidgetFactoryRegistration< DescribedVLine > registerDescribedVLine
DescribedWidgetFactoryRegistration< DescribedDoubleSpinBox > registerDescribedDoubleSpinBox
DescribedWidgetFactoryRegistration< DescribedHLine > registerDescribedHLine
DescribedWidgetFactoryRegistration< DescribedIntSlider > registerDescribedIntSlider
DescribedWidgetFactoryRegistration< DescribedHSpacer > registerDescribedHSpacer
DescribedWidgetFactoryRegistration< DescribedWidget > registerDescribedWidget
IceInternal::Handle< SingleTypeVariantList > SingleTypeVariantListPtr
void mergeMaps(T &oldMap, const T &newMap, MergeMapsMode mergeMode=MergeMapsMode::OverrideOldValues)
Inserts and overwrites the values from oldMap with the values from newMap.
Definition algorithm.h:249
::IceInternal::Handle<::armarx::VariantBase > VariantBasePtr