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 <vector>
28 
29 #include <QAction>
30 #include <QComboBox>
31 #include <QDialog>
32 #include <QItemSelectionModel>
33 #include <QList>
34 #include <QMenu>
35 #include <QStandardItemModel>
36 
38 #include <ArmarXCore/interface/observers/ConditionHandlerInterface.h>
39 
41 #include <ArmarXGui/gui-plugins/PlotterPlugin/ui_ArmarXPlotterDialog.h>
42 
43 namespace armarx
44 {
45  class InfixFilterModel;
46  class ArmarXPlotter;
47 
48  class ArmarXPlotterDialog : public QDialog
49  {
50  Q_OBJECT
51  QStringList availableChannelsList;
52  ObserverItemModel* model;
53  InfixFilterModel* proxyModel;
54  std::string uuid;
55  IceManagerPtr iceManager;
56  int mdiId;
57 
58 
59  public:
60  ArmarXPlotterDialog(QWidget* parent, IceManagerPtr iceManager);
61  ~ArmarXPlotterDialog() override;
62  ConditionHandlerInterfacePrx handler;
63 
65  {
66  QComboBox* comboBox;
67  QLabel* label;
68  QPushButton* deleteButton;
69  };
70 
71  void setIceManager(IceManagerPtr iceManager);
72 
73  Ui::ArmarXPlotterDialog ui;
74  std::vector<ChannelWidgetsEntry> sensorChannelList;
75  QStringList getSelectedDatafields();
76 
77 
78  // // inherited from Component
79  // std::string getDefaultName() const;
80  // virtual void onInitComponent();
81  // virtual void onConnectComponent();
82  // void onExitComponent();
83  /**
84  * emits the closeRequest signal
85  */
86  void onCloseWidget(QCloseEvent* event);
87  public slots:
90  void ButtonRemoveChannelClicked(QModelIndex index);
91  void updateObservers();
92  void treeView_selected(const QItemSelection& selected, const QItemSelection& deselected);
93  void treeView_doubleClick(const QModelIndex& proxyIndex);
94  void destroyed(QObject*);
95  void showEvent(QShowEvent*) override;
96  private slots:
97  void on_btnSelectLoggingDir_clicked();
98  };
99 } // namespace armarx
armarx::ArmarXPlotterDialog::getSelectedDatafields
QStringList getSelectedDatafields()
Definition: ArmarXPlotterDialog.cpp:161
armarx::ArmarXPlotterDialog
Definition: ArmarXPlotterDialog.h:48
armarx::ArmarXPlotterDialog::updateObservers
void updateObservers()
Definition: ArmarXPlotterDialog.cpp:103
armarx::ArmarXPlotterDialog::handler
ConditionHandlerInterfacePrx handler
Definition: ArmarXPlotterDialog.h:62
armarx::ArmarXPlotterDialog::onCloseWidget
void onCloseWidget(QCloseEvent *event)
emits the closeRequest signal
Definition: ArmarXPlotterDialog.cpp:98
index
uint8_t index
Definition: EtherCATFrame.h:59
armarx::ArmarXPlotterDialog::ArmarXPlotterDialog
ArmarXPlotterDialog(QWidget *parent, IceManagerPtr iceManager)
Definition: ArmarXPlotterDialog.cpp:37
armarx::ArmarXPlotterDialog::treeView_selected
void treeView_selected(const QItemSelection &selected, const QItemSelection &deselected)
Definition: ArmarXPlotterDialog.cpp:175
armarx::ArmarXPlotterDialog::destroyed
void destroyed(QObject *)
Definition: ArmarXPlotterDialog.cpp:201
armarx::ArmarXPlotterDialog::ChannelWidgetsEntry::comboBox
QComboBox * comboBox
Definition: ArmarXPlotterDialog.h:66
armarx::ArmarXPlotterDialog::ChannelWidgetsEntry::label
QLabel * label
Definition: ArmarXPlotterDialog.h:67
ObserverItemModel.h
armarx::ArmarXPlotterDialog::ButtonAddSelectedChannelClicked
void ButtonAddSelectedChannelClicked()
Definition: ArmarXPlotterDialog.cpp:129
armarx::ArmarXPlotterDialog::ChannelWidgetsEntry
Definition: ArmarXPlotterDialog.h:64
armarx::ArmarXPlotterDialog::ButtonRemoveChannelClicked
void ButtonRemoveChannelClicked()
Definition: ArmarXPlotterDialog.cpp:144
armarx::ArmarXPlotterDialog::setIceManager
void setIceManager(IceManagerPtr iceManager)
Definition: ArmarXPlotterDialog.cpp:66
IceManager.h
armarx::ArmarXPlotterDialog::~ArmarXPlotterDialog
~ArmarXPlotterDialog() override
Definition: ArmarXPlotterDialog.cpp:60
armarx::ArmarXPlotterDialog::treeView_doubleClick
void treeView_doubleClick(const QModelIndex &proxyIndex)
Definition: ArmarXPlotterDialog.cpp:181
armarx::ArmarXPlotterDialog::ui
Ui::ArmarXPlotterDialog ui
Definition: ArmarXPlotterDialog.h:73
IceUtil::Handle< IceManager >
armarx::ObserverItemModel
Definition: ObserverItemModel.h:61
armarx::ArmarXPlotterDialog::showEvent
void showEvent(QShowEvent *) override
Definition: ArmarXPlotterDialog.cpp:207
armarx::InfixFilterModel
This proxy model reimplements the filterAcceptsRow function with a new behavior: All elements that fi...
Definition: InfixFilterModel.h:42
armarx::ArmarXPlotterDialog::sensorChannelList
std::vector< ChannelWidgetsEntry > sensorChannelList
Definition: ArmarXPlotterDialog.h:74
armarx::ArmarXPlotterDialog::ChannelWidgetsEntry::deleteButton
QPushButton * deleteButton
Definition: ArmarXPlotterDialog.h:68
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:27