##

TopicSelector.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 GAZEBO_GUI_TOPICSELECTOR_HH_
#define GAZEBO_GUI_TOPICSELECTOR_HH_
#include <string>
#include "gazebo/common/Time.hh"
#include "gazebo/gui/qt.h"
#include "gazebo/util/system.hh"
namespace gazebo
{
namespace gui
{
class GZ_GUI_VISIBLE TopicSelector : public QDialog
{
Q_OBJECT
public: explicit TopicSelector(QWidget *_parent = 0);
public: virtual ~TopicSelector();
public: std::string GetTopic() const;
public: std::string GetMsgType() const;
private: void GetTopicList();
private slots: void OnOkay();
private slots: void OnCancel();
private slots: void OnSelection(QTreeWidgetItem *_item, int _column);
private slots: void OnDoubleClickSelection(QTreeWidgetItem *_item,
int _column);
private: QTreeWidget *treeWidget;
private: QPushButton *okayButton;
private: std::string topicName;
private: std::string msgType;
private: common::Time prevTime;
};
}
}
#endif
Time.hh
gazebo
Forward declarations for the common classes.
Definition: Animation.hh:26
qt.h
gazebo::common::Time
A Time class, can be used to hold wall- or sim-time. stored as sec and nano-sec.
Definition: Time.hh:47
system.hh
gazebo::gui::TopicSelector::GetMsgType
std::string GetMsgType() const
Get the message type that was selected.
gazebo::gui::TopicSelector::GetTopic
std::string GetTopic() const
Get the topic that was selected.
gui
gui
Definition: KeyEventHandler.hh:29
gazebo::gui::TopicSelector
A widget that provides a list of topics to select from.
Definition: TopicSelector.hh:35
gazebo::gui::TopicSelector::TopicSelector
TopicSelector(QWidget *_parent=0)
Constructor.
gazebo::gui::TopicSelector::~TopicSelector
virtual ~TopicSelector()
Destructor.