#include <select_topic_dialog.h>
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_ |
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.
mapviz::SelectTopicDialog::SelectTopicDialog | ( | QWidget * | parent = 0 | ) |
Constructor for the SelectTopicDialog.
Definition at line 111 of file select_topic_dialog.cpp.
void mapviz::SelectTopicDialog::allowMultipleTopics | ( | bool | allow | ) |
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.
|
private |
Definition at line 156 of file select_topic_dialog.cpp.
|
privateslot |
Definition at line 221 of file select_topic_dialog.cpp.
|
private |
Definition at line 228 of file select_topic_dialog.cpp.
ros::master::TopicInfo mapviz::SelectTopicDialog::selectedTopic | ( | ) | const |
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.
std::vector< ros::master::TopicInfo > mapviz::SelectTopicDialog::selectedTopics | ( | ) | const |
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
private |
Definition at line 149 of file select_topic_dialog.cpp.
|
privateslot |
Definition at line 252 of file select_topic_dialog.cpp.
|
private |
Definition at line 173 of file select_topic_dialog.h.
|
private |
Definition at line 179 of file select_topic_dialog.h.
|
private |
Definition at line 175 of file select_topic_dialog.h.
|
private |
Definition at line 176 of file select_topic_dialog.h.
|
private |
Definition at line 174 of file select_topic_dialog.h.
|
private |
Definition at line 180 of file select_topic_dialog.h.
|
private |
Definition at line 181 of file select_topic_dialog.h.
|
private |
Definition at line 178 of file select_topic_dialog.h.