Skip to content

Commit

Permalink
Fix rqt plugin
Browse files Browse the repository at this point in the history
Signed-off-by: Alberto Tudela <ajtudela@gmail.com>
  • Loading branch information
ajtudela committed Oct 24, 2024
1 parent 2c50cbd commit e704a15
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 22 deletions.
8 changes: 7 additions & 1 deletion dsr_rqt_plugin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,15 @@ set(dsr_LIBRARIES dsr_api dsr_core dsr_gui)
set(fastrtps_LIBRARIES fastrtps fastcdr)
set(qt_LIBRARIES Qt5::Core Qt5::OpenGL Qt5::Widgets)

# QT mocs
qt5_wrap_cpp(qt_view_moc
include/${PROJECT_NAME}/dsr_rqt_plugin.hpp
)

# Library
add_library(${library_name} SHARED
src/${PROJECT_NAME}/dsr_rqt_plugin.cpp
${qt_view_moc}
)
target_include_directories(${library_name} PUBLIC
"$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/include>"
Expand Down Expand Up @@ -142,6 +148,6 @@ ament_export_dependencies(
)

# Export modern CMake targets
ament_export_targets(${library_name})
ament_export_targets(${PROJECT_NAME})

ament_package()
11 changes: 2 additions & 9 deletions dsr_rqt_plugin/include/dsr_rqt_plugin/dsr_rqt_plugin.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
#ifndef DSR_RQT_PLUGIN__DSR_RQT_PLUGIN_HPP_
#define DSR_RQT_PLUGIN__DSR_RQT_PLUGIN_HPP_

// Qt
#include <QObject>

// C++
#include <memory>
#include <string>
Expand All @@ -42,12 +39,8 @@ class DSRView : public rqt_gui_cpp::Plugin
public:
DSRView();
virtual ~DSRView();
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);
void initPlugin(qt_gui_cpp::PluginContext & context) override;
void shutdownPlugin() override;

protected:
QWidget * widget_graph_;
Expand Down
13 changes: 1 addition & 12 deletions dsr_rqt_plugin/src/dsr_rqt_plugin/dsr_rqt_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ DSRView::DSRView()

DSRView::~DSRView()
{
G_.reset();
}

/* Initialize the publishers and subscribers */
Expand Down Expand Up @@ -58,18 +59,6 @@ void DSRView::shutdownPlugin()
G_.reset();
}

void DSRView::saveSettings(
qt_gui_cpp::Settings & /*plugin_settings*/,
qt_gui_cpp::Settings & /*instance_settings*/) const
{
}

void DSRView::restoreSettings(
const qt_gui_cpp::Settings & /*plugin_settings*/,
const qt_gui_cpp::Settings & /*instance_settings*/)
{
}

} // namespace dsr_rqt_plugin

PLUGINLIB_EXPORT_CLASS(dsr_rqt_plugin::DSRView, rqt_gui_cpp::Plugin)
Expand Down

0 comments on commit e704a15

Please sign in to comment.