ElementWidgetBase.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <QWidget>
4 
7 
8 namespace armarx
9 {
10 
11  class ElementWidgetBase : public QWidget
12  {
13  public:
14  ~ElementWidgetBase() override = default;
15  virtual void addTo(viz::Layer& layer) const = 0;
16  virtual bool toDelete() const = 0;
17  };
18 
19  template<class UiT>
21  {
22  public:
24  {
25  _ui.setupUi(this);
26  _ui.pushButtonDelete->setCheckable(true);
27  _ui.pushButtonDelete->setChecked(false);
28  }
29  bool toDelete() const override
30  {
31  return _ui.pushButtonDelete->isChecked();
32  }
33  UiT _ui;
34  };
35 }
armarx::ElementWidgetBaseTemplate::toDelete
bool toDelete() const override
Definition: ElementWidgetBase.h:29
armarx::ElementWidgetBaseTemplate::ElementWidgetBaseTemplate
ElementWidgetBaseTemplate()
Definition: ElementWidgetBase.h:23
Layer.h
armarx::ElementWidgetBase
Definition: ElementWidgetBase.h:11
armarx::ElementWidgetBaseTemplate::_ui
UiT _ui
Definition: ElementWidgetBase.h:33
Elements.h
armarx::ElementWidgetBase::~ElementWidgetBase
~ElementWidgetBase() override=default
armarx::ElementWidgetBase::addTo
virtual void addTo(viz::Layer &layer) const =0
armarx::ElementWidgetBaseTemplate
Definition: ElementWidgetBase.h:20
armarx::viz::Layer
Definition: Layer.h:12
armarx::ElementWidgetBase::toDelete
virtual bool toDelete() const =0
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28