SkillGroupBox.h
Go to the documentation of this file.
1#ifndef SKILLGROUPBOX_H
2#define SKILLGROUPBOX_H
3
4#include <QGroupBox>
5#include <QLineEdit>
6#include <QPushButton>
7
9#include "SkillTreeWidget.h"
10
11namespace armarx::skills::gui
12{
13 class SkillGroupBox : public QGroupBox, public MemoryCommunicatorBase
14 {
15 Q_OBJECT
16 public:
17 static const constexpr char* GROUP_BOX_TITLE = "Skills";
18
19 SkillGroupBox(std::shared_ptr<SkillManagerWrapper> _memory, QWidget* parent = nullptr) :
20 QGroupBox(parent), MemoryCommunicatorBase(_memory)
21 {
22 setupUi();
23 }
24
25 signals:
26 /**
27 * @brief Output signal to controller.
28 */
29 void searchRequest(std::string search);
30
31 /**
32 * @brief Notify the skill description widget of an updated selection.
33 * @param skillId
34 */
36
38
39 public slots:
40 void connectGui(std::string observerName);
41
43
44 // is called, after the search has been accepted in the memory wrapper.
45 void searchCallback();
46
47 private slots:
48 /**
49 * Takes string from line edit and emits the search request.
50 */
51 void handleSearch();
52
53 /**
54 * @brief Applies the update, and requests an update from memory.
55 */
56 void filterAndFetch();
57
58 private:
59 void setupUi();
60 void connectSignals();
61 QLineEdit* searchBar = nullptr;
62 QPushButton* acceptSearchButton = nullptr;
63 SkillTreeWidget* skillTreeWidget = nullptr;
64 };
65} // namespace armarx::skills::gui
66
67#endif // SKILLGROUPBOX_H
MemoryCommunicatorBase(std::shared_ptr< SkillManagerWrapper > _memory)
void connectGui(std::string observerName)
SkillGroupBox(std::shared_ptr< SkillManagerWrapper > _memory, QWidget *parent=nullptr)
static const constexpr char * GROUP_BOX_TITLE
void searchRequest(std::string search)
Output signal to controller.
void updateSkillDetails(skills::SkillID &skillId)
Notify the skill description widget of an updated selection.
void updateGui(SkillManagerWrapper::Snapshot update)