Class
List
Modules
Common
Events
Messages
Physics
Rendering
Sensors
Transport
Links
Gazebo Website
Tutorials
Download
Report Documentation Issues
gazebo
gui
viewers
TextView.hh
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2012 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 _TEXTVIEW_HH_
18
#define _TEXTVIEW_HH_
19
20
#include <string>
21
#include <boost/thread/mutex.hpp>
22
23
#include "
gazebo/common/Time.hh
"
24
#include "
gazebo/msgs/msgs.hh
"
25
26
#include "
gazebo/transport/TransportTypes.hh
"
27
28
#include "
gazebo/gui/qt.h
"
29
#include "
gazebo/gui/viewers/TopicView.hh
"
30
#include "
gazebo/util/system.hh
"
31
32
namespace
gazebo
33
{
34
namespace
gui
35
{
36
class
GZ_GUI_VISIBLE
TextView
:
public
TopicView
37
{
38
Q_OBJECT
39
42
public
:
TextView
(QWidget *_parent,
const
std::string &_msgType);
43
45
public
:
virtual
~TextView
();
46
47
// Documentation inherited
48
public
:
virtual
void
SetTopic
(
const
std::string &_topicName);
49
52
signals:
void
AddMsg
(QString _msg);
53
54
// Documentation inherited
55
private
:
virtual
void
UpdateImpl();
56
59
private
:
void
OnText(
const
std::string &_msg);
60
63
private
slots:
void
OnBuffer(
int
_value);
64
67
private
slots:
void
OnPause(
bool
_value);
68
71
private
slots:
void
OnAddMsg(QString _msg);
72
74
private
: QListWidget *msgList;
75
78
private
:
int
bufferSize;
79
81
private
: boost::shared_ptr<google::protobuf::Message> msg;
82
84
private
: boost::mutex mutex;
85
87
private
:
bool
paused;
88
};
89
}
90
}
91
#endif
Time.hh
TopicView.hh
TransportTypes.hh
Forward declarations for transport.
gazebo::gui::TextView::~TextView
virtual ~TextView()
Destructor.
gazebo::gui::TextView::AddMsg
void AddMsg(QString _msg)
Signal to add a message to the GUI list.
gazebo::gui::TextView::TextView
TextView(QWidget *_parent, const std::string &_msgType)
Constructor.
gazebo::gui::TextView::SetTopic
virtual void SetTopic(const std::string &_topicName)
Set the name of the topic to get data from.
gazebo::gui::TopicView::TopicView
TopicView(QWidget *_parent, const std::string &_msgType, const std::string &_viewType, unsigned int _displayPeriod=500)
Constructor.
msgs.hh
gazebo::gui
gui namespace
Definition
Actions.hh:28
gazebo
Forward declarations for the common classes.
Definition
Animation.hh:27
qt.h
system.hh