##

TextView.hh
Go to the documentation of this file.
/*
* Copyright (C) 2012 Open Source Robotics Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
#ifndef _TEXTVIEW_HH_
#define _TEXTVIEW_HH_
#include <string>
#include <boost/thread/mutex.hpp>
#include "gazebo/common/Time.hh"
#include "gazebo/msgs/msgs.hh"
#include "gazebo/transport/TransportTypes.hh"
#include "gazebo/gui/qt.h"
#include "gazebo/gui/viewers/TopicView.hh"
#include "gazebo/util/system.hh"
namespace gazebo
{
namespace gui
{
class GZ_GUI_VISIBLE TextView : public TopicView
{
Q_OBJECT
public: TextView(QWidget *_parent, const std::string &_msgType);
public: virtual ~TextView();
// Documentation inherited
public: virtual void SetTopic(const std::string &_topicName);
signals: void AddMsg(QString _msg);
// Documentation inherited
private: virtual void UpdateImpl();
private: void OnText(const std::string &_msg);
private slots: void OnBuffer(int _value);
private slots: void OnPause(bool _value);
private slots: void OnAddMsg(QString _msg);
private: QListWidget *msgList;
private: int bufferSize;
private: boost::shared_ptr<google::protobuf::Message> msg;
private: boost::mutex mutex;
private: bool paused;
};
}
}
#endif
Time.hh
gazebo
Forward declarations for the common classes.
Definition: Animation.hh:26
qt.h
gazebo::gui::TextView::AddMsg
void AddMsg(QString _msg)
Signal to add a message to the GUI list.
TopicView.hh
TransportTypes.hh
Forward declarations for transport.
system.hh
msgs.hh
gui
gui
Definition: KeyEventHandler.hh:29
gazebo::gui::TopicView
Base class for widgets that display topic data.
Definition: TopicView.hh:78
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::TextView
Definition: TextView.hh:36
gazebo::gui::TextView::~TextView
virtual ~TextView()
Destructor.