24 #include <ArmarXCore/interface/observers/VariantBase.h>
25 #include <ArmarXCore/interface/observers/TermImplBase.h>
28 #include "../VariantWidget.h"
30 #include <QHeaderView>
38 this->showSupportedTypes = showSupportedTypes;
39 this->showParameters = showParameters;
40 this->showResult = showResult;
41 this->checkName = checkName;
53 if (showSupportedTypes)
57 QTableWidget* typesTable =
new QTableWidget(
this);
58 typesTable->horizontalHeader()->setStretchLastSection(
true);
59 typesTable->setColumnCount(check->numberParameters + 1);
61 headers.append(
"Datafield");
63 for (
int i = 0 ; i < check->numberParameters ; i++)
65 headers.append(QString(
"Param %1").arg(i + 1));
68 typesTable->setHorizontalHeaderLabels(headers);
69 typesTable->verticalHeader()->setVisible(
false);
70 typesTable->setHorizontalScrollBarPolicy(Qt::ScrollBarAsNeeded);
71 typesTable->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
75 SupportedTypeList::const_iterator iter = check->supportedTypes.begin();
77 while (iter != check->supportedTypes.end())
79 typesTable->setRowCount(r + 1);
81 tmp.setType(iter->dataFieldType);
82 std::string typeStr = tmp.getTypeName();
84 if (iter->dataFieldType == 0)
89 typesTable->setItem(r, 0,
new QTableWidgetItem(typeStr.c_str()));
91 ParameterTypeList::const_iterator iterList = iter->parameterTypes.begin();
94 while (iterList != iter->parameterTypes.end())
97 tmp2.setType(*iterList);
98 std::string typeStr = tmp2.getTypeName();
102 typeStr =
"Any type";
105 typesTable->setItem(r,
c,
new QTableWidgetItem(typeStr.c_str()));
121 DataFieldIdentifierPtr dataField = DataFieldIdentifierPtr::dynamicCast(check->configuration.dataFieldIdentifier);
122 addProperty(
"Datafield identifier", dataField->getIdentifierStr().c_str());
124 ParameterList::iterator iter = check->configuration.checkParameters.begin();
127 while (iter != check->configuration.checkParameters.end())
129 VariantPtr parameter = VariantPtr::dynamicCast(*iter);
131 addProperty(QString(
"Param %1 type").arg(p), parameter->getTypeName().c_str());
132 addProperty(QString(
"Param %1 value").arg(p),
new VariantWidget(parameter));
144 if (check->fulFilled)