AronTreeWidgetTextInputModalController.cpp
Go to the documentation of this file.
2 
3 namespace armarx
4 {
6  AronTreeWidgetModal(label, item, parent)
7  {
8  widget.setupUi(this);
9 
10  // set header
11  widget.groupBoxInput->setTitle(QString::fromStdString(label));
12  reset();
13 
14  // connect signals
15  connect(widget.pushButtonReset, &QPushButton::clicked,
16  this, &AronTreeWidgetTextInputModalController::reset);
17  connect(widget.pushButtonSubmit, &QPushButton::clicked,
18  this, &AronTreeWidgetTextInputModalController::submit);
19  }
20 
21  void AronTreeWidgetTextInputModalController::submit()
22  {
23  item->setText(aron_tree_widget::constantes::TREE_WIDGET_ITEM_VALUE, widget.textEditInput->toPlainText());
24 
26  }
27 
28  void AronTreeWidgetTextInputModalController::reset()
29  {
31 
32  // reset to initial value
33  widget.textEditInput->setPlainText(init.text(aron_tree_widget::constantes::TREE_WIDGET_ITEM_VALUE));
34  }
35 }
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
AronTreeWidgetTextInputModalController.h
armarx::AronTreeWidgetTextInputModalController::AronTreeWidgetTextInputModalController
AronTreeWidgetTextInputModalController(const std::string &label, AronTreeWidgetItem *item, QTreeWidget *parent)
Definition: AronTreeWidgetTextInputModalController.cpp:5
armarx::AronTreeWidgetModal::init
AronTreeWidgetItem init
Definition: AronTreeWidgetModal.h:48
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::AronTreeWidgetModal::item
AronTreeWidgetItem * item
Definition: AronTreeWidgetModal.h:49