All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
gui/Diagnostics.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2012-2014 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 
18 #ifndef _DIAGNOSTICS_WIDGET_HH_
19 #define _DIAGNOSTICS_WIDGET_HH_
20 
21 #include <map>
22 #include <list>
23 #include <vector>
24 #include <boost/thread/mutex.hpp>
25 
26 #include "gazebo/msgs/msgs.hh"
27 #include "gazebo/common/Time.hh"
29 #include "gazebo/gui/qt.h"
30 #include "gazebo/util/system.hh"
31 
32 namespace gazebo
33 {
34  namespace gui
35  {
36  class IncrementalPlot;
37 
39  class GAZEBO_VISIBLE Diagnostics : public QDialog
40  {
41  Q_OBJECT
42 
45  public: Diagnostics(QWidget *_parent);
46 
48  public: virtual ~Diagnostics();
49 
53  public: virtual bool eventFilter(QObject *_o, QEvent *_e);
54 
57  private: void OnMsg(ConstDiagnosticsPtr &_msg);
58 
60  private slots: void Update();
61 
64  private slots: void OnPause(bool _value);
65 
67  private slots: void OnAddPlot();
68 
70  private: transport::NodePtr node;
71 
73  private: transport::SubscriberPtr sub;
74 
76  private: QListWidget *labelList;
77 
78  private: typedef std::map<QString, std::list<QPointF> > PointMap;
79 
81  private: PointMap selectedLabels;
82 
84  private: bool paused;
85 
87  private: boost::mutex mutex;
88 
90  private: std::vector<IncrementalPlot *> plots;
91 
93  private: QVBoxLayout *plotLayout;
94  };
95  }
96 }
97 #endif
boost::shared_ptr< Subscriber > SubscriberPtr
Definition: TransportTypes.hh:48
Forward declarations for transport.
Plot diagnostic information.
Definition: gui/Diagnostics.hh:39
boost::shared_ptr< Node > NodePtr
Definition: TransportTypes.hh:52
#define GAZEBO_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system.hh:48