MessageFieldTreeWidget.h
Go to the documentation of this file.
1 /******************************************************************************
2  * Copyright (C) 2015 by Ralf Kaestner *
3  * ralf.kaestner@gmail.com *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the Lesser GNU General Public License as published by*
7  * the Free Software Foundation; either version 3 of the License, or *
8  * (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * Lesser GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the Lesser GNU General Public License *
16  * along with this program. If not, see <http://www.gnu.org/licenses/>. *
17  ******************************************************************************/
18 
19 #ifndef RQT_MULTIPLOT_MESSAGE_FIELD_TREE_WIDGET_H
20 #define RQT_MULTIPLOT_MESSAGE_FIELD_TREE_WIDGET_H
21 
22 #include <QTreeWidget>
23 
24 #include <variant_topic_tools/MessageDataType.h>
25 
26 namespace rqt_multiplot {
28  public QTreeWidget {
29  Q_OBJECT
30  public:
31  MessageFieldTreeWidget(QWidget* parent = 0);
32  virtual ~MessageFieldTreeWidget();
33 
34  void setMessageDataType(const variant_topic_tools::MessageDataType&
35  dataType);
36  variant_topic_tools::MessageDataType getMessageDataType() const;
37  void setCurrentField(const QString& field);
38  QString getCurrentField() const;
39  variant_topic_tools::DataType getCurrentFieldDataType() const;
40  bool isCurrentFieldDefined() const;
41 
42  signals:
43  void currentFieldChanged(const QString& field);
44 
45  private:
46  QString currentField_;
47 
48  void setCurrentItem(const QString& field);
49 
50  void addField(const variant_topic_tools::MessageVariable& variable,
51  QTreeWidgetItem* parent = 0);
52 
53  QTreeWidgetItem* findChild(QTreeWidgetItem* item, int column, const
54  QString& text) const;
55 
56  private slots:
57  void currentItemChanged(QTreeWidgetItem* current, QTreeWidgetItem*
58  previous);
59  void spinBoxIndexValueChanged(int value);
60  };
61 };
62 
63 #endif
void currentFieldChanged(const QString &field)
void setMessageDataType(const variant_topic_tools::MessageDataType &dataType)
void addField(const variant_topic_tools::MessageVariable &variable, QTreeWidgetItem *parent=0)
variant_topic_tools::DataType getCurrentFieldDataType() const
variant_topic_tools::MessageDataType getMessageDataType() const
QTreeWidgetItem * findChild(QTreeWidgetItem *item, int column, const QString &text) const
void currentItemChanged(QTreeWidgetItem *current, QTreeWidgetItem *previous)


rqt_multiplot
Author(s): Ralf Kaestner
autogenerated on Wed Jul 10 2019 03:49:44