378{
379 QString ClassName =
ui->ClassCombo->currentText();
380 bool SubClasses =
ui->SubclassesCheckBox->isChecked();
381
383
384 std::vector<dref> candidates;
385 std::copy(tmprefs.begin(), tmprefs.end(), std::back_inserter(candidates));
386
387 if (!candidates.empty()) {
388 filter(candidates, ClassName);
389 }
390
391 if (candidates.empty()) {
392 QMessageBox::information(this, tr("Message"), tr("No objects match filter!"));
393 } else {
394 int NumberOfColumns = 1;
395 bool AttributeEnabled = false;
396 bool RelationshipEnabled = false;
397
398 if (
ui->AttributeComboBox->isEnabled()) {
399 AttributeEnabled = true;
400 NumberOfColumns++;
401 }
402
403 if (
ui->RelationshipComboBox->isEnabled()) {
404 RelationshipEnabled = true;
405 NumberOfColumns++;
406 }
407
408 m_filter_table = std::unique_ptr<QTableWidget>(
new QTableWidget());
412
413 for (size_t i = 0; i < candidates.size(); i++) {
414 QTableWidgetItem* AttributeValue;
415 QTableWidgetItem* RelationshipValue;
416
417 QTableWidgetItem* ObjectUid = new QTableWidgetItem(
418 tr("%1@%2").arg(candidates.at(i).UID().c_str()).arg(candidates.at(i).class_name().c_str()));
420
421 if (AttributeEnabled) {
422 dunedaq::conffwk::attribute_t Attribute =
424
426 Attribute) };
427
428 AttributeValue = new QTableWidgetItem(AttributeValueList.join(" "));
430 }
431
432 if (RelationshipEnabled) {
433 dunedaq::conffwk::relationship_t Relationship =
435
437 Relationship) };
438
439 RelationshipValue = new QTableWidgetItem(RelationshipList.join(" "));
441 }
442 }
443
444 QStringList Headers;
445 Headers << "Object Id";
446
447 if (AttributeEnabled) {
448 Headers <<
ui->AttributeComboBox->currentText();
449 }
450
451 if (RelationshipEnabled) {
452 Headers <<
ui->RelationshipComboBox->currentText();
453 }
454
456
458 HeaderView->setStretchLastSection(true);
461 }
462}
static std::vector< dbe::inner::configobject::tref > objects(std::string const &cname, bool const keep_inherited=true)
dunedaq::conffwk::relationship_t match(T const &, T const &)
dunedaq::conffwk::attribute_t attributematch(QString const &, QString const &)