ArmarXPlotterDialog.h
Go to the documentation of this file.
1 /*
2 * This file is part of ArmarX.
3 *
4 * ArmarX is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 *
8 * ArmarX is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * @package ArmarX::Gui
17 * @author Mirko Waechter ( mirko.waechter at kit dot edu)
18 * @date 2012
19 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20 * GNU General Public License
21 */
22 
23 #pragma once
24 
25 
26 // QT
27 #include <ArmarXGui/gui-plugins/PlotterPlugin/ui_ArmarXPlotterDialog.h>
28 
30 
32 #include <ArmarXCore/interface/observers/ConditionHandlerInterface.h>
33 
34 #include <QDialog>
35 #include <QComboBox>
36 #include <QList>
37 #include <QMenu>
38 #include <QAction>
39 #include <QItemSelectionModel>
40 #include <QStandardItemModel>
41 
42 #include <vector>
43 
44 
45 namespace armarx
46 {
47  class InfixFilterModel;
48  class ArmarXPlotter;
50  public QDialog
51  {
52  Q_OBJECT
53  QStringList availableChannelsList;
54  ObserverItemModel* model;
55  InfixFilterModel* proxyModel;
56  std::string uuid;
57  IceManagerPtr iceManager;
58  int mdiId;
59 
60 
61  public:
62  ArmarXPlotterDialog(QWidget* parent, IceManagerPtr iceManager);
63  ~ArmarXPlotterDialog() override;
64  ConditionHandlerInterfacePrx handler;
66  {
67  QComboBox* comboBox;
68  QLabel* label;
69  QPushButton* deleteButton;
70  };
71 
72  void setIceManager(IceManagerPtr iceManager);
73 
74  Ui::ArmarXPlotterDialog ui;
75  std::vector< ChannelWidgetsEntry > sensorChannelList;
76  QStringList getSelectedDatafields();
77 
78 
79  // // inherited from Component
80  // std::string getDefaultName() const;
81  // virtual void onInitComponent();
82  // virtual void onConnectComponent();
83  // void onExitComponent();
84  /**
85  * emits the closeRequest signal
86  */
87  void onCloseWidget(QCloseEvent* event);
88  public slots:
91  void ButtonRemoveChannelClicked(QModelIndex index);
92  void updateObservers();
93  void treeView_selected(const QItemSelection& selected, const QItemSelection& deselected);
94  void treeView_doubleClick(const QModelIndex& proxyIndex);
95  void destroyed(QObject*);
96  void showEvent(QShowEvent*) override;
97  private slots:
98  void on_btnSelectLoggingDir_clicked();
99  };
100 }
armarx::ArmarXPlotterDialog::getSelectedDatafields
QStringList getSelectedDatafields()
Definition: ArmarXPlotterDialog.cpp:158
armarx::ArmarXPlotterDialog
Definition: ArmarXPlotterDialog.h:49
armarx::ArmarXPlotterDialog::updateObservers
void updateObservers()
Definition: ArmarXPlotterDialog.cpp:97
armarx::ArmarXPlotterDialog::handler
ConditionHandlerInterfacePrx handler
Definition: ArmarXPlotterDialog.h:64
armarx::ArmarXPlotterDialog::onCloseWidget
void onCloseWidget(QCloseEvent *event)
emits the closeRequest signal
Definition: ArmarXPlotterDialog.cpp:92
armarx::ArmarXPlotterDialog::sensorChannelList
std::vector< ChannelWidgetsEntry > sensorChannelList
Definition: ArmarXPlotterDialog.h:75
index
uint8_t index
Definition: EtherCATFrame.h:59
armarx::ArmarXPlotterDialog::ArmarXPlotterDialog
ArmarXPlotterDialog(QWidget *parent, IceManagerPtr iceManager)
Definition: ArmarXPlotterDialog.cpp:36
armarx::ArmarXPlotterDialog::treeView_selected
void treeView_selected(const QItemSelection &selected, const QItemSelection &deselected)
Definition: ArmarXPlotterDialog.cpp:170
armarx::ArmarXPlotterDialog::destroyed
void destroyed(QObject *)
Definition: ArmarXPlotterDialog.cpp:194
armarx::ArmarXPlotterDialog::ChannelWidgetsEntry::comboBox
QComboBox * comboBox
Definition: ArmarXPlotterDialog.h:67
armarx::ArmarXPlotterDialog::ChannelWidgetsEntry::label
QLabel * label
Definition: ArmarXPlotterDialog.h:68
ObserverItemModel.h
armarx::ArmarXPlotterDialog::ButtonAddSelectedChannelClicked
void ButtonAddSelectedChannelClicked()
Definition: ArmarXPlotterDialog.cpp:128
armarx::ArmarXPlotterDialog::ChannelWidgetsEntry
Definition: ArmarXPlotterDialog.h:65
armarx::ArmarXPlotterDialog::ButtonRemoveChannelClicked
void ButtonRemoveChannelClicked()
Definition: ArmarXPlotterDialog.cpp:143
armarx::ArmarXPlotterDialog::setIceManager
void setIceManager(IceManagerPtr iceManager)
Definition: ArmarXPlotterDialog.cpp:59
IceManager.h
armarx::ArmarXPlotterDialog::~ArmarXPlotterDialog
~ArmarXPlotterDialog() override
Definition: ArmarXPlotterDialog.cpp:54
armarx::ArmarXPlotterDialog::treeView_doubleClick
void treeView_doubleClick(const QModelIndex &proxyIndex)
Definition: ArmarXPlotterDialog.cpp:174
armarx::ArmarXPlotterDialog::ui
Ui::ArmarXPlotterDialog ui
Definition: ArmarXPlotterDialog.h:74
IceUtil::Handle< IceManager >
armarx::ObserverItemModel
Definition: ObserverItemModel.h:64
armarx::ArmarXPlotterDialog::showEvent
void showEvent(QShowEvent *) override
Definition: ArmarXPlotterDialog.cpp:199
armarx::InfixFilterModel
This proxy model reimplements the filterAcceptsRow function with a new behavior: All elements that fi...
Definition: InfixFilterModel.h:41
armarx::ArmarXPlotterDialog::ChannelWidgetsEntry::deleteButton
QPushButton * deleteButton
Definition: ArmarXPlotterDialog.h:69
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28