AronTreeWidgetModal.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <stack>
5 
6 #include "../AronTreeWidgetItem.h"
7 #include "../Data.h"
8 
11 
12 #include <QDialog>
13 #include <QTreeWidget>
14 
15 namespace armarx
16 {
18  public QDialog
19  {
20  Q_OBJECT
21 
22  public:
23  AronTreeWidgetModal(const std::string& label, AronTreeWidgetItem* item, QTreeWidget* parent);
24 
25  protected slots:
26  virtual void reset()
27  {
32  for (int i = 0; i < item->childCount(); ++i)
33  {
34  item->removeChild(item->child(i));
35  }
36  for (int i = 0; i < init.childCount(); ++i)
37  {
38  item->addChild(init.child(i)->clone());
39  }
40  }
41  virtual void submit()
42  {
43  accept();
44  }
45 
46  protected:
47 
50 
51  private:
52  std::string label;
53  QTreeWidget* parent;
54  };
55 
56  using AronTreeWidgetModalControllerPtr = std::shared_ptr<AronTreeWidgetModal>;
57 }
armarx::AronTreeWidgetModal::reset
virtual void reset()
Definition: AronTreeWidgetModal.h:26
armarx::AronTreeWidgetItem
Definition: AronTreeWidgetItem.h:19
armarx::AronTreeWidgetModal::submit
virtual void submit()
Definition: AronTreeWidgetModal.h:41
armarx::aron_tree_widget::constantes::TREE_WIDGET_ITEM_VALUE
const int TREE_WIDGET_ITEM_VALUE
Definition: Data.h:8
ArmarXGuiPlugin.h
armarx::AronTreeWidgetModal::AronTreeWidgetModal
AronTreeWidgetModal(const std::string &label, AronTreeWidgetItem *item, QTreeWidget *parent)
Definition: AronTreeWidgetModal.cpp:5
ArmarXComponentWidgetController.h
armarx::AronTreeWidgetModal::init
AronTreeWidgetItem init
Definition: AronTreeWidgetModal.h:48
armarx::aron_tree_widget::constantes::TREE_WIDGET_ITEM_TYPE
const int TREE_WIDGET_ITEM_TYPE
Definition: Data.h:9
armarx::AronTreeWidgetModalControllerPtr
std::shared_ptr< AronTreeWidgetModal > AronTreeWidgetModalControllerPtr
Definition: AronTreeWidgetModal.h:56
armarx::aron_tree_widget::constantes::TREE_WIDGET_ITEM_NAME
const int TREE_WIDGET_ITEM_NAME
Definition: Data.h:7
armarx::AronTreeWidgetModal
Definition: AronTreeWidgetModal.h:17
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28
armarx::AronTreeWidgetItem::aronType
aron::type::VariantPtr aronType
Definition: AronTreeWidgetItem.h:30
armarx::AronTreeWidgetModal::item
AronTreeWidgetItem * item
Definition: AronTreeWidgetModal.h:49
ImportExportComponent.h