#include <select_service_dialog.h>
Public Member Functions | |
std::string | selectedService () const |
SelectServiceDialog (const std::string &datatype="", QWidget *parent=0) | |
void | setDatatypeFilter (const std::string &datatype) |
virtual | ~SelectServiceDialog () |
Static Public Member Functions | |
static std::string | selectService (const std::string &datatype, QWidget *parent=0) |
Private Slots | |
void | displayUpdateError (const QString) |
void | fetchServices () |
void | updateDisplayedServices () |
void | updateKnownServices (ServiceStringVector services) |
Private Member Functions | |
void | closeEvent (QCloseEvent *) |
std::vector< std::string > | filterServices () |
void | timerEvent (QTimerEvent *) |
Private Attributes | |
std::string | allowed_datatype_ |
QPushButton * | cancel_button_ |
std::vector< std::string > | displayed_services_ |
int | fetch_services_timer_id_ |
std::vector< std::string > | known_services_ |
QListWidget * | list_widget_ |
QLineEdit * | name_filter_ |
ros::NodeHandle | nh_ |
QPushButton * | ok_button_ |
boost::shared_ptr< ServiceUpdaterThread > | worker_thread_ |
Provides a dialog that the user can use to either list all known ROS services or all ROS services that handle a particular type.
Definition at line 87 of file select_service_dialog.h.
mapviz::SelectServiceDialog::SelectServiceDialog | ( | const std::string & | datatype = "" , |
QWidget * | parent = 0 |
||
) |
Constructs a new SelectServiceDialog and automatically starts a timer that will refresh the list of services every 5 seconds.
[in] | datatype | The type of service to search for; if empty, it will show the user a list of all services. |
[in] | parent | The dialog's parent widget. |
Definition at line 109 of file select_service_dialog.cpp.
|
virtual |
Definition at line 152 of file select_service_dialog.cpp.
|
private |
Definition at line 303 of file select_service_dialog.cpp.
|
privateslot |
Displays a message box indicating that there was an error and stops our update timer.
Definition at line 194 of file select_service_dialog.cpp.
|
privateslot |
If no worker thread is currently active, this will start a worker thread that will fetch all of the services matching the known data type.
Definition at line 169 of file select_service_dialog.cpp.
|
private |
Definition at line 203 of file select_service_dialog.cpp.
std::string mapviz::SelectServiceDialog::selectedService | ( | ) | const |
Gets the service the user had selected, or an empty string if there was none.
Definition at line 282 of file select_service_dialog.cpp.
|
static |
Convenience function for creating a dialog that will prompt the user to select a service and then return the value. If no service was selected, the returned value will be empty.
[in] | datatype | The type of service to search for; if empty, it will show the user a list of all services. |
[in] | parent | The dialog's parent widget. |
Definition at line 98 of file select_service_dialog.cpp.
void mapviz::SelectServiceDialog::setDatatypeFilter | ( | const std::string & | datatype | ) |
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.
[in] | datatype | The type of service to search for. |
Definition at line 276 of file select_service_dialog.cpp.
|
private |
Definition at line 296 of file select_service_dialog.cpp.
|
privateslot |
Updates the list of services displayed to the user based on the list of known services and the current filter value.
Definition at line 220 of file select_service_dialog.cpp.
|
privateslot |
Sets our list of known services.
Definition at line 188 of file select_service_dialog.cpp.
|
private |
Definition at line 153 of file select_service_dialog.h.
|
private |
Definition at line 163 of file select_service_dialog.h.
|
private |
Definition at line 158 of file select_service_dialog.h.
|
private |
Definition at line 160 of file select_service_dialog.h.
|
private |
Definition at line 157 of file select_service_dialog.h.
|
private |
Definition at line 164 of file select_service_dialog.h.
|
private |
Definition at line 165 of file select_service_dialog.h.
|
private |
Definition at line 155 of file select_service_dialog.h.
|
private |
Definition at line 162 of file select_service_dialog.h.
|
private |
Definition at line 166 of file select_service_dialog.h.