SkillMemoryGui.h
Go to the documentation of this file.
1 #ifndef SKILLMEMORYGUI_H
2 #define SKILLMEMORYGUI_H
3 
4 #include <QHBoxLayout>
5 #include <QLabel>
6 #include <QSplitter>
7 #include <QTreeWidget>
8 #include <QWidget>
9 
11 
14 
19 #include "./skills/SkillGroupBox.h"
20 
21 namespace armarx::skills::gui
22 {
23  class SkillMemoryGUI : public QObject, public armarx::Logging
24  {
25  Q_OBJECT
26 
27  public:
28  static const constexpr char* STOP_ALL_BUTTON_TEXT = "Stop all executions";
29  SkillMemoryGUI(QTreeWidget* _skillExecutionTreeWidget,
30  QLayout* _skillExecutionTreeWidgetParentLayout,
31  QGroupBox* _skillGroupBox,
32  QSplitter* _skillGroupBoxParentLayout,
33  QGroupBox* _skillDetailGroupBox,
34  QSplitter* _skillDetailGroupBoxParentLayout,
35  QHBoxLayout* _updateWidgetLayout,
36 
37  QLayout* stopAllLayout,
38 
39  QWidget* connectionStatusLabel,
40 
41  std::shared_ptr<SkillManagerWrapper> _memory);
42 
43  signals:
44  /**
45  * @brief Notify affected widgets to clear all saved state.
46  */
47  void disconnectGui();
48 
49  /**
50  * @brief Notify widgets of new connection.
51  * @param observerName the observer name.
52  */
53  void connectGui(std::string observerName);
54 
56 
57  private:
58  void setupUi();
59  void connectSignals();
60 
61  SkillExecutionTreeWidget* skillExecutionTreeWidget = nullptr;
62  SkillGroupBox* skillGroupBox = nullptr;
63  SkillDetailGroupBox* skillDetailGroupBox = nullptr;
64  QBoxLayout* updateWidgetLayout = nullptr;
65 
66  std::shared_ptr<SkillManagerWrapper> memory = nullptr;
67 
68  PeriodicUpdateWidget* updateWidget = nullptr;
69 
70  QPushButton* stopAllButton = nullptr;
71 
72  StatusLabel* connectionStatusLabel = nullptr;
73  };
74 } // namespace armarx::skills::gui
75 
76 #endif // SKILLMEMORYGUI_H
armarx::skills::gui::SkillMemoryGUI::SkillMemoryGUI
SkillMemoryGUI(QTreeWidget *_skillExecutionTreeWidget, QLayout *_skillExecutionTreeWidgetParentLayout, QGroupBox *_skillGroupBox, QSplitter *_skillGroupBoxParentLayout, QGroupBox *_skillDetailGroupBox, QSplitter *_skillDetailGroupBoxParentLayout, QHBoxLayout *_updateWidgetLayout, QLayout *stopAllLayout, QWidget *connectionStatusLabel, std::shared_ptr< SkillManagerWrapper > _memory)
Definition: SkillMemoryGui.cpp:7
PeriodicUpdateWidget.h
armarx::skills::gui::SkillMemoryGUI::STOP_ALL_BUTTON_TEXT
static const constexpr char * STOP_ALL_BUTTON_TEXT
Definition: SkillMemoryGui.h:28
armarx::skills::gui::SkillMemoryGUI::disconnectGui
void disconnectGui()
Notify affected widgets to clear all saved state.
armarx::skills::gui::SkillMemoryGUI::connectGui
void connectGui(std::string observerName)
Notify widgets of new connection.
armarx::skills::gui::SkillDetailGroupBox
Definition: SkillDetailsGroupBox.h:19
armarx::memory
Brief description of class memory.
Definition: memory.h:39
SkillManagerWrapper.h
armarx::skills::gui::SkillManagerWrapper::Snapshot
Definition: SkillManagerWrapper.h:70
SkillDescriptionWidget.h
armarx::skills::gui::PeriodicUpdateWidget
Definition: PeriodicUpdateWidget.h:14
armarx::skills::gui::SkillGroupBox
Definition: SkillGroupBox.h:13
SkillDetailsGroupBox.h
armarx::skills::gui
Definition: PeriodicUpdateWidget.cpp:11
armarx::skills::gui::StatusLabel
Definition: StatusLabel.h:8
armarx::skills::gui::SkillMemoryGUI
Definition: SkillMemoryGui.h:23
armarx::armem::server::ltm::util::mongodb::detail::update
bool update(mongocxx::collection &coll, const nlohmann::json &query, const nlohmann::json &update)
Definition: mongodb.cpp:67
armarx::skills::gui::SkillMemoryGUI::updateGui
void updateGui(SkillManagerWrapper::Snapshot update)
armarx::Logging
Base Class for all Logging classes.
Definition: Logging.h:232
StatusLabel.h
SkillExecutionTreeWidget.h
SkillGroupBox.h
Logging.h
armarx::skills::gui::SkillExecutionTreeWidget
Definition: SkillExecutionTreeWidget.h:14