26 #include <QGraphicsGridLayout>
27 #include <QGraphicsProxyWidget>
28 #include <QGraphicsWidget>
30 #include <QPushButton>
32 #include "../StateScene.h"
33 #include "../model/StateParameter.h"
38 QGraphicsItem* parent) :
39 QGraphicsWidget(parent), paramMap(parameterMap), parentScene(parentItem()->scene())
41 QGraphicsGridLayout* layout =
new QGraphicsGridLayout();
49 addStateParameterToLayout(param, layout, row);
62 armarx::ParameterTableItem::addStateParameterToLayout(
64 QGraphicsGridLayout* layout,
67 QGraphicsWidget* typeLabel = parentScene->addWidget(
new QLabel(param->type));
68 QGraphicsWidget* defaultValueLabel =
69 parentScene->addWidget(
new QLabel(param->getDefaultValueJson()));
82 QGraphicsWidget* optionalLabel = parentScene->addWidget(
new QLabel(optionalText));
84 QGraphicsWidget* descriptionLabel = parentScene->addWidget(
new QLabel(param->description));
86 layout->addItem(typeLabel, row, 0);
87 layout->addItem(defaultValueLabel, row, 1);
88 layout->addItem(optionalLabel, row, 2);
89 layout->addItem(descriptionLabel, row, 3);
93 armarx::ParameterTableItem::setHeadRow(QGraphicsGridLayout* layout)
95 QGraphicsWidget* typeItem = parentScene->addWidget(
new QLabel(
"Type"));
96 QGraphicsWidget* defaultValueItem = parentScene->addWidget(
new QLabel(
"Default Value"));
97 QGraphicsWidget* optionalItem = parentScene->addWidget(
new QLabel(
"Is optional"));
98 QGraphicsWidget* descriptionItem = parentScene->addWidget(
new QLabel(
"Description"));
100 layout->addItem(typeItem, 0, 0);
101 layout->addItem(defaultValueItem, 0, 1);
102 layout->addItem(optionalItem, 0, 2);
103 layout->addItem(descriptionItem, 0, 3);