Skip to content
Snippets Groups Projects
Commit 2c14bab7 authored by Peter Albrecht's avatar Peter Albrecht
Browse files

Changed status bar: only the message is displayed, error in tooltip

parent 46717f03
No related branches found
No related tags found
1 merge request!406Refactor skill memory GUI
Pipeline #17082 passed
......@@ -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);
......
......@@ -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:
/**
......
......@@ -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 (...)
{
......
......@@ -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:
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment