ProfileMenuWidget.h
Go to the documentation of this file.
1#ifndef PROFILEMENUWIDGET_H
2#define PROFILEMENUWIDGET_H
3
4#include <QComboBox>
5#include <QPushButton>
6#include <QWidget>
7#include <qpushbutton.h>
8
10
11namespace armarx::skills::gui
12{
13 class ProfileMenuWidget : public QWidget, public MemoryCommunicatorBase
14 {
15 Q_OBJECT
16 public:
17 static const constexpr char* SET_ARGS_BUTTON_TEXT = "Set Params from Clipboard";
18 static const constexpr char* COPY_ARGS_BUTTON_TEXT = " Copy Params to Clipboard";
19 static const constexpr char* COPY_SHORTCUT_BUTTON_TEXT = " Copy Shortcut to Clipboard";
20 static const constexpr char* RESET_ARGS_BUTTON_TEXT = " Reset Params to Defaults";
21 static const constexpr char* DEFAULT_PROFILE_TEXT = "<No Profile selected. Using root>";
22 static const constexpr char* PROFILE_NOT_IMPLEMENTED =
23 "Profiles other than the root profile are currently not supported.";
24 static const constexpr char* HIST_BUTTON_TEXT = "Load Parameters from Last Execution";
25 static const constexpr char* CNGS_BUTTON_TEXT = "Reload lost Parameters";
26
27 // contents are public, as this class is just a convenience wrapper
28 QPushButton* setArgsFromClipboard = nullptr;
29 QPushButton* copyArgsToClipboard = nullptr;
30 QPushButton* copyShortcutToClipboard = nullptr;
31 QPushButton* resetArgsToProfile = nullptr;
32 QComboBox* profileSelector = nullptr;
33 QPushButton* historySelector = nullptr;
34 QPushButton* changesSelector = nullptr;
35
36 ProfileMenuWidget(std::shared_ptr<SkillManagerWrapper> _memory, QWidget* parent = nullptr) :
37 QWidget(parent), MemoryCommunicatorBase(_memory)
38 {
39 setupUi();
40 }
41
42 public slots:
43
44 void updateChangesSelector(const skills::SkillID shownSkill);
45
46 private:
47 void setupUi();
48 };
49} // namespace armarx::skills::gui
50
51#endif // PROFILEMENUWIDGET_H
MemoryCommunicatorBase(std::shared_ptr< SkillManagerWrapper > _memory)
static const constexpr char * HIST_BUTTON_TEXT
static const constexpr char * PROFILE_NOT_IMPLEMENTED
static const constexpr char * SET_ARGS_BUTTON_TEXT
static const constexpr char * RESET_ARGS_BUTTON_TEXT
static const constexpr char * DEFAULT_PROFILE_TEXT
static const constexpr char * CNGS_BUTTON_TEXT
ProfileMenuWidget(std::shared_ptr< SkillManagerWrapper > _memory, QWidget *parent=nullptr)
void updateChangesSelector(const skills::SkillID shownSkill)
static const constexpr char * COPY_SHORTCUT_BUTTON_TEXT
static const constexpr char * COPY_ARGS_BUTTON_TEXT