00001 #ifndef EMPTY_SERCICE_CALL_INTERFACE_H 00002 #define EMPTY_SERCICE_CALL_INTERFACE_H 00003 00004 #include <ros/ros.h> 00005 #include <rviz/panel.h> 00006 #include <std_srvs/Empty.h> 00007 #include <QtGui> 00008 00009 namespace jsk_rviz_plugins 00010 { 00011 struct ServiceCallButtonInfo 00012 { 00013 std::string icon_file_path; 00014 std::string service_name; 00015 std::string text; 00016 }; 00017 00018 class EmptyServiceCallInterfaceAction: public rviz::Panel 00019 { 00020 Q_OBJECT 00021 public: 00022 EmptyServiceCallInterfaceAction( QWidget* parent = 0 ); 00023 00024 virtual void load( const rviz::Config& config ); 00025 virtual void save( rviz::Config config ) const; 00026 00027 protected Q_SLOTS: 00028 void callRequestEmptyCommand(int button_id); 00029 void parseROSParameters(); 00030 protected: 00031 ros::NodeHandle nh_; 00032 std::vector<ServiceCallButtonInfo> service_call_button_infos_; 00033 QVBoxLayout* layout; 00034 QHBoxLayout* h_layout; 00035 QSignalMapper* signal_mapper; 00036 }; 00037 } 00038 00039 #endif