Public Member Functions | Static Public Member Functions | Private Slots | Private Member Functions | Private Attributes
mapviz::SelectTopicDialog Class Reference

#include <select_topic_dialog.h>

List of all members.

Public Member Functions

void allowMultipleTopics (bool allow)
ros::master::TopicInfo selectedTopic () const
std::vector
< ros::master::TopicInfo
selectedTopics () const
 SelectTopicDialog (QWidget *parent=0)
void setDatatypeFilter (const std::vector< std::string > &datatypes)

Static Public Member Functions

static ros::master::TopicInfo selectTopic (const std::string &datatype, QWidget *parent=0)
static ros::master::TopicInfo selectTopic (const std::string &datatype1, const std::string &datatype2, QWidget *parent=0)
static ros::master::TopicInfo selectTopic (const std::vector< std::string > &datatypes, QWidget *parent=0)
static std::vector
< ros::master::TopicInfo
selectTopics (const std::string &datatype, QWidget *parent=0)
static std::vector
< ros::master::TopicInfo
selectTopics (const std::string &datatype1, const std::string &datatype2, QWidget *parent=0)
static std::vector
< ros::master::TopicInfo
selectTopics (const std::vector< std::string > &datatypes, QWidget *parent=0)

Private Slots

void fetchTopics ()
void updateDisplayedTopics ()

Private Member Functions

void closeEvent (QCloseEvent *)
std::vector
< ros::master::TopicInfo
filterTopics (const std::vector< ros::master::TopicInfo > &) const
void timerEvent (QTimerEvent *)

Private Attributes

std::set< std::string > allowed_datatypes_
QPushButton * cancel_button_
std::vector
< ros::master::TopicInfo
displayed_topics_
int fetch_topics_timer_id_
std::vector
< ros::master::TopicInfo
known_topics_
QListWidget * list_widget_
QLineEdit * name_filter_
QPushButton * ok_button_

Detailed Description

Provides a dialog for the user to select one or more topics. Several static functions are provided that can be used instead of instantiating the class directly.

Definition at line 53 of file select_topic_dialog.h.


Constructor & Destructor Documentation

Constructor for the SelectTopicDialog.

Definition at line 111 of file select_topic_dialog.cpp.


Member Function Documentation

Choose whether the user can select one (allow=false) or multiple (allow=true) topics. The default is false.

Definition at line 163 of file select_topic_dialog.cpp.

void mapviz::SelectTopicDialog::closeEvent ( QCloseEvent *  event) [private]

Definition at line 156 of file select_topic_dialog.cpp.

void mapviz::SelectTopicDialog::fetchTopics ( ) [private, slot]

Definition at line 221 of file select_topic_dialog.cpp.

std::vector< ros::master::TopicInfo > mapviz::SelectTopicDialog::filterTopics ( const std::vector< ros::master::TopicInfo > &  topics) const [private]

Definition at line 228 of file select_topic_dialog.cpp.

Returns the currently selected topic. If multiple topics are allowed, this will only return the first selected element. If there is no selection, the returned info will have an empty topic name and datatype.

Definition at line 183 of file select_topic_dialog.cpp.

Returns the currently selected topics. If there is no selection, the returned vector will be empty.

Definition at line 193 of file select_topic_dialog.cpp.

ros::master::TopicInfo mapviz::SelectTopicDialog::selectTopic ( const std::string &  datatype,
QWidget *  parent = 0 
) [static]

Present the user with a dialog to select a single topic. This is convenience wrapper for the common case where only one datatype is allowed.

If the user cancels the selection or doesn't make a valid selection, the topic and datatype fields of the returned topic info will be empty.

Definition at line 43 of file select_topic_dialog.cpp.

ros::master::TopicInfo mapviz::SelectTopicDialog::selectTopic ( const std::string &  datatype1,
const std::string &  datatype2,
QWidget *  parent = 0 
) [static]

Present the user with a dialog to select a single topic This is a convenience wrapper for the common case where two datatypes are allowed.

If the user cancels the selection or doesn't make a valid selection, the topic and datatype fields of the returned topic info will be empty.

Definition at line 52 of file select_topic_dialog.cpp.

ros::master::TopicInfo mapviz::SelectTopicDialog::selectTopic ( const std::vector< std::string > &  datatypes,
QWidget *  parent = 0 
) [static]

Present the user with a dialog to select a single topic.

If the user cancels the selection or doesn't make a valid selection, the topic and datatype fields of the returned topic info will be empty.

Definition at line 63 of file select_topic_dialog.cpp.

std::vector< ros::master::TopicInfo > mapviz::SelectTopicDialog::selectTopics ( const std::string &  datatype,
QWidget *  parent = 0 
) [static]

Present the user with a dialog to select a multiple topics. This is a convenience wrapper for the common case where only one datatype is allowed.

If the user cancels the selection or doesn't make a valid selection, the returned vector will be empty.

Definition at line 77 of file select_topic_dialog.cpp.

std::vector< ros::master::TopicInfo > mapviz::SelectTopicDialog::selectTopics ( const std::string &  datatype1,
const std::string &  datatype2,
QWidget *  parent = 0 
) [static]

Present the user with a dialog to select a multiple topics. This is a convenience wrapper for the common case where two datatypes are allowed.

If the user cancels the selection or doesn't make a valid selection, the returned vector will be empty.

Definition at line 86 of file select_topic_dialog.cpp.

std::vector< ros::master::TopicInfo > mapviz::SelectTopicDialog::selectTopics ( const std::vector< std::string > &  datatypes,
QWidget *  parent = 0 
) [static]

Present the user with a dialog to select a multiple topics.

If the user cancels the selection or doesn't make a valid selection, the returned vector will be empty.

Definition at line 97 of file select_topic_dialog.cpp.

void mapviz::SelectTopicDialog::setDatatypeFilter ( const std::vector< std::string > &  datatypes)

Set a datatype filter to limit displayed topics based on their types. If the vector is empty (default), the dialog will display all available topics.

Definition at line 173 of file select_topic_dialog.cpp.

void mapviz::SelectTopicDialog::timerEvent ( QTimerEvent *  event) [private]

Definition at line 149 of file select_topic_dialog.cpp.

Definition at line 252 of file select_topic_dialog.cpp.


Member Data Documentation

Definition at line 173 of file select_topic_dialog.h.

Definition at line 179 of file select_topic_dialog.h.

Definition at line 175 of file select_topic_dialog.h.

Definition at line 176 of file select_topic_dialog.h.

Definition at line 174 of file select_topic_dialog.h.

Definition at line 180 of file select_topic_dialog.h.

Definition at line 181 of file select_topic_dialog.h.

QPushButton* mapviz::SelectTopicDialog::ok_button_ [private]

Definition at line 178 of file select_topic_dialog.h.


The documentation for this class was generated from the following files:


mapviz
Author(s): Marc Alban
autogenerated on Thu Aug 24 2017 02:45:59