.. _program_listing_file__tmp_ws_src_ros2_planning_system_plansys2_tools_include_rqt_plansys2_performers_RQTPerformers.hpp: Program Listing for File RQTPerformers.hpp ========================================== |exhale_lsh| :ref:`Return to documentation for file ` (``/tmp/ws/src/ros2_planning_system/plansys2_tools/include/rqt_plansys2_performers/RQTPerformers.hpp``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp // Copyright 2022 Intelligent Robotics Lab // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. #ifndef RQT_PLANSYS2_PERFORMERS__RQTPERFORMERS_HPP_ #define RQT_PLANSYS2_PERFORMERS__RQTPERFORMERS_HPP_ #include #include #include #include #include #include #include #include #include #include #include #include #include "rqt_plansys2_performers/PerformersTree.hpp" #include "plansys2_problem_expert/ProblemExpertClient.hpp" #include "plansys2_msgs/msg/action_performer_status.hpp" #include "rclcpp/rclcpp.hpp" namespace rqt_plansys2_performers { class RQTPerformers : public rqt_gui_cpp::Plugin { Q_OBJECT public: RQTPerformers(); virtual void initPlugin(qt_gui_cpp::PluginContext & context); virtual void shutdownPlugin(); virtual void saveSettings( qt_gui_cpp::Settings & plugin_settings, qt_gui_cpp::Settings & instance_settings) const; virtual void restoreSettings( const qt_gui_cpp::Settings & plugin_settings, const qt_gui_cpp::Settings & instance_settings); protected slots: void spin_loop(); protected: Ui::RqtPlansys2Performers ui_; QWidget * widget_; private: QTimer * controller_spin_timer_; PerformersTree * performers_tree_; std::map performers_info_; rclcpp::Subscription::SharedPtr performers_sub_; bool need_update_; std::shared_ptr problem_; void performers_callback(plansys2_msgs::msg::ActionPerformerStatus::UniquePtr msg); std::optional get_performer_line(const std::string & performer_name); void update_performer_row( QTreeWidgetItem * row, const plansys2_msgs::msg::ActionPerformerStatus & performer); void add_new_row(const plansys2_msgs::msg::ActionPerformerStatus & performer); }; } // namespace rqt_plansys2_performers #endif // RQT_PLANSYS2_PERFORMERS__RQTPERFORMERS_HPP_