diff --git a/source/RobotAPI/libraries/skills_gui/StatusLabel.cpp b/source/RobotAPI/libraries/skills_gui/StatusLabel.cpp index 06425af49102db7be27a9f77318bc9a32058002c..6b65f166aa9677f0eed55b95436a1a76777471f3 100644 --- a/source/RobotAPI/libraries/skills_gui/StatusLabel.cpp +++ b/source/RobotAPI/libraries/skills_gui/StatusLabel.cpp @@ -13,10 +13,11 @@ namespace armarx::skills::gui } void - StatusLabel::handleMessage(const std::string& message) + StatusLabel::handleMessage(const std::string& message, std::string const& error) { this->label->setText(QString::fromStdString(message)); this->resetButton->setHidden(false); + label->setToolTip(QString::fromStdString(error)); } void @@ -38,6 +39,7 @@ namespace armarx::skills::gui this->resetButton->setHidden(true); label->setMinimumHeight(35); + label->setMaximumHeight(35); QPixmap pixmap(":/icons/delete.ico"); QIcon ButtonIcon(pixmap); diff --git a/source/RobotAPI/libraries/skills_gui/StatusLabel.h b/source/RobotAPI/libraries/skills_gui/StatusLabel.h index f3693ab0fb7c1e116fb6a010841454e3a7bae3e5..b8e0f91e425e3715d5d5f617f877cfeeceee9a39 100644 --- a/source/RobotAPI/libraries/skills_gui/StatusLabel.h +++ b/source/RobotAPI/libraries/skills_gui/StatusLabel.h @@ -17,7 +17,7 @@ namespace armarx::skills::gui /** * @brief Display a message to indicate an update. */ - void handleMessage(std::string const& message); + void handleMessage(std::string const& message, std::string const& error); private slots: /** diff --git a/source/RobotAPI/libraries/skills_gui/memory/SkillManagerWrapper.cpp b/source/RobotAPI/libraries/skills_gui/memory/SkillManagerWrapper.cpp index 9f68289665408e6fd104e900015ec44509bb6111..92277c0eba7e1277a658e8ed685156d70bd100bc 100644 --- a/source/RobotAPI/libraries/skills_gui/memory/SkillManagerWrapper.cpp +++ b/source/RobotAPI/libraries/skills_gui/memory/SkillManagerWrapper.cpp @@ -44,9 +44,7 @@ namespace armarx::skills::gui ARMARX_WARNING << "Unhandled Ice exception encountered while updating executions. Exception was: " << e; - std::stringstream sstream; - sstream << "Could not fetch executions: " << e.what(); - emit connectionUpdate(sstream.str()); + emit connectionUpdate("Could not fetch executions", e.what()); return {}; } catch (...) @@ -122,9 +120,7 @@ namespace armarx::skills::gui ARMARX_WARNING << "Unhandled Ice exception encountered while updating skills. Exception was: " << e; - std::stringstream sstream; - sstream << "Could not fetch skills: " << e.what(); - emit connectionUpdate(sstream.str()); + emit connectionUpdate("Could not fetch skills", e.what()); return {}; } catch (...) @@ -223,10 +219,8 @@ namespace armarx::skills::gui retry = true; ARMARX_ERROR << "Unhandeled Ice exception while aborting skill '" << executionId.skillId.skillName << "'."; - std::stringstream sstream; - sstream << "Could not abort skill " << executionId.skillId.skillName << " : " - << e.what(); - emit connectionUpdate(sstream.str()); + emit connectionUpdate("Could not abort skill " + executionId.skillId.skillName, + e.what()); } catch (...) { @@ -305,8 +299,7 @@ namespace armarx::skills::gui { ARMARX_ERROR << "Unhandeled Ice exception while executing skill '" << skillId.skillName << "'. Aborting..."; - emit connectionUpdate("Could not begin execution of skill " + skillId.skillName + ": " + - e.what()); + emit connectionUpdate("Execution failed of skill " + skillId.skillName, e.what()); } catch (...) { diff --git a/source/RobotAPI/libraries/skills_gui/memory/SkillManagerWrapper.h b/source/RobotAPI/libraries/skills_gui/memory/SkillManagerWrapper.h index a4f1407e0dd8c20435a6457fb8b4542a5a63de55..22eec04e20bfd499aa444eae74136be6d4c5490f 100644 --- a/source/RobotAPI/libraries/skills_gui/memory/SkillManagerWrapper.h +++ b/source/RobotAPI/libraries/skills_gui/memory/SkillManagerWrapper.h @@ -68,7 +68,7 @@ namespace armarx::skills::gui SkillID const& skillId); signals: - void connectionUpdate(std::string const& message); + void connectionUpdate(std::string const& message, std::string const& error); public slots: /**