MessageFieldWidget.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_WIDGET_H
20 #define RQT_MULTIPLOT_MESSAGE_FIELD_WIDGET_H
21 
22 #include <QGridLayout>
23 #include <QTimer>
24 #include <QWidget>
25 
30 
31 namespace Ui {
32  class MessageFieldWidget;
33 };
34 
35 namespace rqt_multiplot {
37  public QWidget {
38  Q_OBJECT
39  public:
40  MessageFieldWidget(QWidget* parent = 0);
41  virtual ~MessageFieldWidget();
42 
43  QString getCurrentMessageType() const;
44  variant_topic_tools::MessageDataType getCurrentMessageDataType() const;
45  void setCurrentField(const QString& field);
46  QString getCurrentField() const;
47  variant_topic_tools::DataType getCurrentFieldDataType() const;
48  bool isLoading() const;
49  bool isConnecting() const;
50  bool isCurrentFieldDefined() const;
51 
52  void loadFields(const QString& type);
53  void connectTopic(const QString& topic, double timeout = 0.0);
54 
55  signals:
56  void loadingStarted();
57  void loadingFinished();
58  void loadingFailed(const QString& error);
59 
60  void connecting(const QString& topic);
61  void connected(const QString& topic);
62  void connectionTimeout(const QString& topic, double timeout);
63 
64  void currentFieldChanged(const QString& field);
65 
66  private:
67  Ui::MessageFieldWidget* ui_;
68 
69  QString currentField_;
70 
72  bool isLoading_;
73 
78 
79  void disconnect();
80 
81  private slots:
82  void loaderLoadingStarted();
83  void loaderLoadingFinished();
84  void loaderLoadingFailed(const QString& error);
85 
86  void subscriberMessageReceived(const QString& topic, const Message&
87  message);
88 
89  void connectionTimerTimeout();
90 
91  void lineEditCurrentFieldChanged(const QString& field);
92  void treeWidgetCurrentFieldChanged(const QString& field);
93  };
94 };
95 
96 #endif
MessageDefinitionLoader * loader_
MessageSubscriberRegistry * registry_


rqt_multiplot_plugin
Author(s): Ralf Kaestner
autogenerated on Fri Jan 15 2021 03:47:53