Newer
Older
#ifndef SKILLDETAILSTREEWIDGET_H
#define SKILLDETAILSTREEWIDGET_H
#include "RobotAPI/libraries/aron/core/data/variant/container/Dict.h"
#include "RobotAPI/libraries/skills/core/SkillID.h"
#include "RobotAPI/libraries/skills_gui/aron_tree_widget/AronTreeWidgetController.h"
#include "../memory/MemoryCommunicatorBase.h"
namespace armarx::skills::gui
{
class SkillDetailsTreeWidget : public QTreeWidget, public MemoryCommunicatorBase
{
SkillDetailsTreeWidget(std::shared_ptr<SkillManagerWrapper> _memory,
std::optional<skills::SkillID> getShownId();
void updateContents(skills::SkillID const& skillId, skills::SkillDescription const& descr);
aron::data::DictPtr getConfigAsAron();
void pasteCurrentConfig();
void resetWidget();
signals:
void updated(const skills::SkillID shownSkill);
// this will reset the args to the profile defaults
void resetCurrentConfig();
void updateGui(SkillManagerWrapper::Snapshot update);
struct ShownSkill
{
skills::SkillID skillId;
skills::SkillDescription descr;
};
std::optional<ShownSkill> shownSkill;
// The size, which we assume the last column to be.
// If the last column has too little space, increase this value.
const int typeWidth = 200;
AronTreeWidgetControllerPtr aronTreeWidgetController = nullptr;
void checkIfShownSkillIsAvailable(SkillManagerWrapper::Snapshot& update);
bool askUserToConfirmWidgetReset();
bool checkIfParametersAreModified();
bool showWidgetResetConfirmation_ = true;
};
} // namespace armarx::skills::gui
#endif // SKILLDETAILSTREEWIDGET_H