25 #include <QPushButton>
37 _objectPoseStorageComponent(
39 _objectPoseClient(
std::make_unique<objpose::ObjectPoseClient>(*_objectPoseStorageComponent))
52 return *_objectPoseStorageComponent;
59 return getObjectPoseStorageComponent()->ice_getIdentity().name;
65 return *_objectPoseClient;
71 return _objectPoseClient->fetchObjectPosesAsMap();
74 std::vector<ObjectInfo>
77 const auto& finder = _objectPoseClient->getObjectFinder();
78 return finder.findAllObjects();
84 _statusLabel =
new QLabel(
"Not connected",
this);
85 _connectButton =
new QPushButton(
"Connect ...",
this);
87 QBoxLayout* layout =
new QVBoxLayout(
this);
90 layout->addWidget(_statusLabel);
91 layout->addWidget(_connectButton);
101 QString name = QString::fromStdString(
connection().getConnectedName());
102 _statusLabel->setText(
"Connected to '" + name +
"'");
109 return _connection.has_value();
115 return _connection.value();
122 switch (dialog.exec())
124 case QDialog::Accepted:
126 case QDialog::Rejected:
130 auto objectPoseStorageComponent = dialog.
getProxy();
131 if (objectPoseStorageComponent)
133 _connection.emplace(objectPoseStorageComponent);