00001 #ifndef OBJECT_FIT_OPERATOR_H 00002 #define OBJECT_FIT_OPERATOR_H 00003 00004 #ifndef Q_MOC_RUN 00005 #include <ros/ros.h> 00006 #include <rviz/panel.h> 00007 #include <QtGlobal> 00008 #if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) 00009 # include <QtWidgets> 00010 #else 00011 # include <QtGui> 00012 #endif 00013 #include <QToolButton> 00014 #include <QCheckBox> 00015 #include <jsk_rviz_plugins/ObjectFitCommand.h> 00016 #endif 00017 00018 class QLineEdit; 00019 class QToolButton; 00020 00021 namespace jsk_rviz_plugins 00022 { 00023 class ObjectFitOperatorAction: public rviz::Panel 00024 { 00025 Q_OBJECT 00026 public: 00027 ObjectFitOperatorAction( QWidget* parent = 0 ); 00028 00029 virtual void load( const rviz::Config& config ); 00030 virtual void save( rviz::Config config ) const; 00031 00032 protected Q_SLOTS: 00033 void commandFit(); 00034 void commandNear(); 00035 void commandOther(); 00036 void checkBoxChanged(bool state); 00037 void publishObjectFitOder(int type); 00038 00039 protected: 00040 QToolButton* fit_button_; 00041 QToolButton* near_button_; 00042 QToolButton* other_button_; 00043 QCheckBox* check_box_; 00044 00045 QHBoxLayout* horizontal_layout1_; 00046 QHBoxLayout* horizontal_layout2_; 00047 QVBoxLayout* layout; 00048 bool reverse_; 00049 00050 ros::NodeHandle nh_; 00051 ros::Publisher pub_; 00052 }; 00053 } 00054 00055 #endif