24 #include <QGraphicsGridLayout>
25 #include <QGraphicsWidget>
26 #include <QGraphicsProxyWidget>
28 #include <QPushButton>
30 #include "../model/StateParameter.h"
31 #include "../StateScene.h"
36 QGraphicsWidget(parent),
37 paramMap(parameterMap),
38 parentScene(parentItem()->scene())
40 QGraphicsGridLayout* layout =
new QGraphicsGridLayout();
48 addStateParameterToLayout(param, layout, row);
62 QGraphicsWidget* typeLabel = parentScene->addWidget(
new QLabel(param->type));
63 QGraphicsWidget* defaultValueLabel = parentScene->addWidget(
new QLabel(param->getDefaultValueJson()));
76 QGraphicsWidget* optionalLabel = parentScene->addWidget(
new QLabel(optionalText));
78 QGraphicsWidget* descriptionLabel = parentScene->addWidget(
new QLabel(param->description));
80 layout->addItem(typeLabel, row, 0);
81 layout->addItem(defaultValueLabel, row, 1);
82 layout->addItem(optionalLabel, row, 2);
83 layout->addItem(descriptionLabel, row, 3);
86 void armarx::ParameterTableItem::setHeadRow(QGraphicsGridLayout* layout)
88 QGraphicsWidget* typeItem = parentScene->addWidget(
new QLabel(
"Type"));
89 QGraphicsWidget* defaultValueItem = parentScene->addWidget(
new QLabel(
"Default Value"));
90 QGraphicsWidget* optionalItem = parentScene->addWidget(
new QLabel(
"Is optional"));
91 QGraphicsWidget* descriptionItem = parentScene->addWidget(
new QLabel(
"Description"));
93 layout->addItem(typeItem, 0, 0);
94 layout->addItem(defaultValueItem, 0, 1);
95 layout->addItem(optionalItem, 0, 2);
96 layout->addItem(descriptionItem, 0, 3);