From d0dad673d3b53f4dbe013af9ba52ffa91e01a288 Mon Sep 17 00:00:00 2001 From: Peter Albrecht <usnlf@student.kit.edu> Date: Mon, 23 Dec 2024 17:34:22 +0100 Subject: [PATCH] add includes --- .../skill_details/SkillDetailsTreeWidget.cpp | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/source/RobotAPI/libraries/skills_gui/skill_details/SkillDetailsTreeWidget.cpp b/source/RobotAPI/libraries/skills_gui/skill_details/SkillDetailsTreeWidget.cpp index 862024ab5..10c521380 100644 --- a/source/RobotAPI/libraries/skills_gui/skill_details/SkillDetailsTreeWidget.cpp +++ b/source/RobotAPI/libraries/skills_gui/skill_details/SkillDetailsTreeWidget.cpp @@ -1,4 +1,5 @@ #include "SkillDetailsTreeWidget.h" + #include <optional> #include <QApplication> @@ -6,6 +7,9 @@ #include <QHeaderView> #include <QResizeEvent> #include <QVBoxLayout> +#include <qchar.h> +#include <qmessagebox.h> + #include <ArmarXCore/core/logging/Logging.h> #include <RobotAPI/libraries/aron/converter/json/NLohmannJSONConverter.h> @@ -108,7 +112,9 @@ namespace armarx::skills::gui // only triggers if the description does not match if (descr != shownSkill->descr) { - if (askUserToConfirmWidgetReset("The currently shown skill in the details widget has not been found in the latest manager update. Did the skill provider die?")) + if (askUserToConfirmWidgetReset( + "The currently shown skill in the details widget has not been found in the " + "latest manager update. Did the skill provider die?")) { this->updateContents(sid, descr); } @@ -131,9 +137,15 @@ namespace armarx::skills::gui setColumnHidden(3, true); } - - bool SkillDetailsTreeWidget::askUserToConfirmWidgetReset(std::string reason) + + bool + SkillDetailsTreeWidget::askUserToConfirmWidgetReset(std::string reason) { + std::string msg = "The skill details widget will be reset.\nReason: " + reason; + QMessageBox msgBox; + msgBox.setText(QString::fromStdString(msg)); + QPushButton* connectButton = msgBox.addButton(tr("Connect"), QMessageBox::ActionRole); + QPushButton* abortButton = msgBox.addButton(QMessageBox::Abort); ARMARX_WARNING << "The skill details widget will be reset. Reason: " << reason; return true; } -- GitLab