AronTreeWidgetModal.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <stack>
4 
5 #include <QDialog>
6 #include <QTreeWidget>
7 
9 
12 
13 #include "../AronTreeWidgetItem.h"
14 #include "../Data.h"
15 
16 namespace armarx::skills::gui
17 {
18  class AronTreeWidgetModal : public QDialog
19  {
20  Q_OBJECT
21 
22  public:
23  AronTreeWidgetModal(const std::string& label,
25  QTreeWidget* parent);
26 
27  protected slots:
28 
29  virtual void
31  {
39  for (int i = 0; i < item->childCount(); ++i)
40  {
41  item->removeChild(item->child(i));
42  }
43  for (int i = 0; i < init.childCount(); ++i)
44  {
45  item->addChild(init.child(i)->clone());
46  }
47  }
48 
49  virtual void
51  {
52  accept();
53  }
54 
55  protected:
58 
59  private:
60  std::string label;
61  QTreeWidget* parent;
62  };
63 
64  using AronTreeWidgetModalControllerPtr = std::shared_ptr<AronTreeWidgetModal>;
65 } // namespace armarx::skills::gui
armarx::skills::gui::AronTreeWidgetModal::AronTreeWidgetModal
AronTreeWidgetModal(const std::string &label, AronTreeWidgetItem *item, QTreeWidget *parent)
Definition: AronTreeWidgetModal.cpp:5
armarx::skills::gui::aron_tree_widget::constantes::TREE_WIDGET_ITEM_NAME
const int TREE_WIDGET_ITEM_NAME
Definition: Data.h:7
armarx::skills::gui::aron_tree_widget::constantes::TREE_WIDGET_ITEM_TYPE
const int TREE_WIDGET_ITEM_TYPE
Definition: Data.h:9
armarx::skills::gui::AronTreeWidgetItem::aronType
aron::type::VariantPtr aronType
Definition: AronTreeWidgetItem.h:30
ArmarXGuiPlugin.h
ArmarXComponentWidgetController.h
armarx::skills::gui::AronTreeWidgetModalControllerPtr
std::shared_ptr< AronTreeWidgetModal > AronTreeWidgetModalControllerPtr
Definition: AronTreeWidgetModal.h:64
armarx::skills::gui
Definition: PeriodicUpdateWidget.cpp:11
armarx::skills::gui::AronTreeWidgetModal::submit
virtual void submit()
Definition: AronTreeWidgetModal.h:50
armarx::skills::gui::AronTreeWidgetModal::reset
virtual void reset()
Definition: AronTreeWidgetModal.h:30
armarx::skills::gui::AronTreeWidgetModal::item
AronTreeWidgetItem * item
Definition: AronTreeWidgetModal.h:57
armarx::skills::gui::AronTreeWidgetModal
Definition: AronTreeWidgetModal.h:18
armarx::skills::gui::AronTreeWidgetItem
Definition: AronTreeWidgetItem.h:19
armarx::skills::gui::AronTreeWidgetModal::init
AronTreeWidgetItem init
Definition: AronTreeWidgetModal.h:56
armarx::skills::gui::aron_tree_widget::constantes::TREE_WIDGET_ITEM_VALUE
const int TREE_WIDGET_ITEM_VALUE
Definition: Data.h:8
ImportExportComponent.h