AronTreeWidgetModal.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <stack>
4
5
#include <QDialog>
6
#include <QTreeWidget>
7
8
#include <
ArmarXCore/core/system/ImportExportComponent.h
>
9
10
#include <
ArmarXGui/libraries/ArmarXGuiBase/ArmarXComponentWidgetController.h
>
11
#include <
ArmarXGui/libraries/ArmarXGuiBase/ArmarXGuiPlugin.h
>
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,
24
AronTreeWidgetItem
*
item
,
25
QTreeWidget* parent);
26
27
protected
slots:
28
29
virtual
void
30
reset
()
31
{
32
item
->
aronType
=
init
.
aronType
;
33
item
->setText(
aron_tree_widget::constantes::TREE_WIDGET_ITEM_NAME
,
34
init
.text(
aron_tree_widget::constantes::TREE_WIDGET_ITEM_NAME
));
35
item
->setText(
aron_tree_widget::constantes::TREE_WIDGET_ITEM_VALUE
,
36
init
.text(
aron_tree_widget::constantes::TREE_WIDGET_ITEM_VALUE
));
37
item
->setText(
aron_tree_widget::constantes::TREE_WIDGET_ITEM_TYPE
,
38
init
.text(
aron_tree_widget::constantes::TREE_WIDGET_ITEM_TYPE
));
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
50
submit
()
51
{
52
accept();
53
}
54
55
protected
:
56
AronTreeWidgetItem
init
;
57
AronTreeWidgetItem
*
item
;
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
RobotAPI
libraries
skills_gui
aron_tree_widget
modal
AronTreeWidgetModal.h
Generated on Sat Oct 12 2024 09:14:07 for armarx_documentation by
1.8.17