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

Connected stop action to stopSkill

parent e719476f
No related branches found
No related tags found
No related merge requests found
......@@ -35,8 +35,10 @@
#include "aronTreeWidget/modal/text/AronTreeWidgetTextInputModalController.h"
// debug
#include <QAction>
#include <QClipboard>
#include <QDoubleSpinBox>
#include <QMenu>
#include <RobotAPI/libraries/aron/converter/json/NLohmannJSONConverter.h>
#include <RobotAPI/libraries/skills/core/SkillExecutionRequest.h>
......@@ -83,7 +85,15 @@ namespace armarx
void
SkillManagerMonitorWidgetController::prepareMenu(const QPoint& pos)
{
ARMARX_IMPORTANT << "Function not implemented!";
QMenu* menu = new QMenu();
// TODO: gray out option if skill has finished
QAction* stopSkillAction = new QAction("Stop Skill", this);
menu->addAction(stopSkillAction);
connect(stopSkillAction,
&QAction::triggered,
this,
&SkillManagerMonitorWidgetController::stopSkill);
menu->popup(widget.treeWidgetSkillExecutions->viewport()->mapToGlobal(pos));
}
SkillExecutionInfoTreeWidgetItem*
......@@ -477,6 +487,7 @@ namespace armarx
void
SkillManagerMonitorWidgetController::stopSkill()
{
ARMARX_IMPORTANT << "Stop skill triggered";
// std::scoped_lock l(updateMutex);
// if (selectedSkill.skillId.fullySpecified())
// {
......
......@@ -129,7 +129,7 @@ namespace armarx
void pasteCurrentConfig();
void resetCurrentConfig();
void prepareMenu();
void prepareMenu(const QPoint& pos);
private:
......
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