DataLogger.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2012-2015 Open Source Robotics Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17 #ifndef _DATALOGGER_HH_
18 #define _DATALOGGER_HH_
19 
21 #include "gazebo/msgs/msgs.hh"
22 #include "gazebo/gui/qt.h"
23 #include "gazebo/util/system.hh"
24 
25 namespace gazebo
26 {
27  namespace gui
28  {
31 
34  class GAZEBO_VISIBLE DataLogger : public QDialog
35  {
36  Q_OBJECT
37 
40  public: DataLogger(QWidget *_parent = 0);
41 
43  public: virtual ~DataLogger();
44 
47  signals: void SetTime(QString _string);
48 
51  signals: void SetSize(QString _string);
52 
55  signals: void SetDestinationPath(QString _string);
56 
59  signals: void SetDestinationURI(QString _string);
60 
63  private slots: void OnRecord(bool _toggle);
64 
67  private slots: void OnSetDestinationPath(QString _string);
68 
71  private slots: void OnSetDestinationURI(QString _string);
72 
74  private slots: void OnBrowse();
75 
79  private slots: void OnToggleSettings(bool _checked);
80 
82  private slots: void OnBlinkStatus();
83 
85  private slots: void OnConfirmationTimeout();
86 
88  private slots: void OnCancel();
89 
92  private: void OnStatus(ConstLogStatusPtr &_msg);
93 
95  private: transport::NodePtr node;
96 
98  private: transport::PublisherPtr pub;
99 
101  private: transport::SubscriberPtr sub;
102 
104  private: QToolButton *recordButton;
105 
107  private: QLabel *timeLabel;
108 
110  private: QString basePath;
111 
113  private: QLineEdit *destPath;
114 
116  private: QLineEdit *destURI;
117 
119  private: QLabel *sizeLabel;
120 
122  private: QLabel *statusLabel;
123 
125  private: QTimer *statusTimer;
126 
128  private: double statusTime;
129 
131  private: QLineEdit *filenameEdit;
132 
134  private: QFrame *settingsFrame;
135 
136  // private: QListWidget *logList;
137  private: QTextBrowser *logList;
138 
140  private: QDialog *confirmationDialog;
141 
143  private: QTimer *confirmationTimer;
144  };
146  }
147 }
148 #endif
A widget that provides data logging functionality.
Definition: DataLogger.hh:34
boost::shared_ptr< Subscriber > SubscriberPtr
Definition: TransportTypes.hh:53
Forward declarations for transport.
boost::shared_ptr< Node > NodePtr
Definition: TransportTypes.hh:57
boost::shared_ptr< Publisher > PublisherPtr
Definition: TransportTypes.hh:49
#define GAZEBO_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system.hh:66