diff --git a/CMakeLists.txt b/CMakeLists.txt index 34394c397..ac71f9ac8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -98,8 +98,6 @@ add_compile_definitions(QT_DISABLE_DEPRECATED_UP_TO=0x050F00) set(CMAKE_AUTOMOC TRUE) set(CMAKE_AUTOUIC TRUE) set(CMAKE_AUTORCC TRUE) -cmake_policy(SET CMP0100 NEW) - if(POLICY CMP0100) cmake_policy(SET CMP0100 NEW) endif() diff --git a/src/plugins/CameraTracking/CameraTracking.cc b/src/plugins/CameraTracking/CameraTracking.cc index cdf71cc97..cda9a446a 100644 --- a/src/plugins/CameraTracking/CameraTracking.cc +++ b/src/plugins/CameraTracking/CameraTracking.cc @@ -140,6 +140,9 @@ class CameraTracking::Implementation /// \brief The pose set from the move to pose service. public: std::optional moveToPoseValue; + /// \brief The motion duration set from the move to pose service. + public: std::optional moveToPoseDuration; + /// \brief Follow service public: std::string followService; @@ -250,6 +253,7 @@ void CameraTracking::Implementation::OnMoveToComplete() void CameraTracking::Implementation::OnMoveToPoseComplete() { this->moveToPoseValue.reset(); + this->moveToPoseDuration.reset(); } ///////////////////////////////////////////////// @@ -290,6 +294,15 @@ bool CameraTracking::Implementation::OnMoveToPose(const msgs::GUICamera &_msg, this->moveToPoseValue = pose; + if (_msg.duration() > 0) + { + this->moveToPoseDuration = _msg.duration(); + } + else + { + this->moveToPoseDuration = 0.5; + } + _res.set_data(true); return true; } @@ -352,7 +365,8 @@ void CameraTracking::Implementation::OnRender() { this->moveToHelper.MoveTo(this->camera, *(this->moveToPoseValue), - 0.5, std::bind(&Implementation::OnMoveToPoseComplete, this)); + *(this->moveToPoseDuration), + std::bind(&Implementation::OnMoveToPoseComplete, this)); this->prevMoveToTime = std::chrono::system_clock::now(); } else diff --git a/src/plugins/ImageDisplay/ImageDisplay.hh b/src/plugins/ImageDisplay/ImageDisplay.hh index 4e3ec1e82..e89754537 100644 --- a/src/plugins/ImageDisplay/ImageDisplay.hh +++ b/src/plugins/ImageDisplay/ImageDisplay.hh @@ -25,7 +25,7 @@ #include #ifndef _WIN32 -# define ImageDisplay_EXPORTS_API +# define ImageDisplay_EXPORTS_API __attribute__ ((visibility ("default"))) #else # if (defined(ImageDisplay_EXPORTS)) # define ImageDisplay_EXPORTS_API __declspec(dllexport) diff --git a/src/plugins/KeyPublisher/KeyPublisher.hh b/src/plugins/KeyPublisher/KeyPublisher.hh index fbb4b945b..d52fbc78e 100644 --- a/src/plugins/KeyPublisher/KeyPublisher.hh +++ b/src/plugins/KeyPublisher/KeyPublisher.hh @@ -19,7 +19,7 @@ #define GZ_GUI_PLUGINS_KEYPUBLISHER_HH_ #ifndef _WIN32 -# define KeyPublisher_EXPORTS_API +# define KeyPublisher_EXPORTS_API __attribute__ ((visibility ("default"))) #else # if (defined(KeyPublisher_EXPORTS)) # define KeyPublisher_EXPORTS_API __declspec(dllexport) diff --git a/src/plugins/Publisher/Publisher.hh b/src/plugins/Publisher/Publisher.hh index fe8f275fa..864485066 100644 --- a/src/plugins/Publisher/Publisher.hh +++ b/src/plugins/Publisher/Publisher.hh @@ -24,7 +24,7 @@ #include #ifndef _WIN32 -# define Publisher_EXPORTS_API +# define Publisher_EXPORTS_API __attribute__ ((visibility ("default"))) #else # if (defined(Publisher_EXPORTS)) # define Publisher_EXPORTS_API __declspec(dllexport) diff --git a/src/plugins/ShutdownButton/ShutdownButton.hh b/src/plugins/ShutdownButton/ShutdownButton.hh index ba5021b56..c6ba175ef 100644 --- a/src/plugins/ShutdownButton/ShutdownButton.hh +++ b/src/plugins/ShutdownButton/ShutdownButton.hh @@ -21,7 +21,7 @@ #include "gz/gui/Plugin.hh" #ifndef _WIN32 -# define ShutdownButton_EXPORTS_API +# define ShutdownButton_EXPORTS_API __attribute__ ((visibility ("default"))) #else # if (defined(ShutdownButton_EXPORTS)) # define ShutdownButton_EXPORTS_API __declspec(dllexport) diff --git a/src/plugins/Teleop/Teleop.hh b/src/plugins/Teleop/Teleop.hh index 596084e29..d8e770ef5 100644 --- a/src/plugins/Teleop/Teleop.hh +++ b/src/plugins/Teleop/Teleop.hh @@ -26,7 +26,7 @@ #include #ifndef _WIN32 -# define Teleop_EXPORTS_API +# define Teleop_EXPORTS_API __attribute__ ((visibility ("default"))) #else # if (defined(Teleop_EXPORTS)) # define Teleop_EXPORTS_API __declspec(dllexport) diff --git a/src/plugins/TopicEcho/TopicEcho.hh b/src/plugins/TopicEcho/TopicEcho.hh index 5ffd5d358..b5876cbd5 100644 --- a/src/plugins/TopicEcho/TopicEcho.hh +++ b/src/plugins/TopicEcho/TopicEcho.hh @@ -28,7 +28,7 @@ #endif #ifndef _WIN32 -# define TopicEcho_EXPORTS_API +# define TopicEcho_EXPORTS_API __attribute__ ((visibility ("default"))) #else # if (defined(TopicEcho_EXPORTS)) # define TopicEcho_EXPORTS_API __declspec(dllexport) diff --git a/src/plugins/TopicViewer/TopicViewer.hh b/src/plugins/TopicViewer/TopicViewer.hh index a53d2fded..4ac8fce04 100644 --- a/src/plugins/TopicViewer/TopicViewer.hh +++ b/src/plugins/TopicViewer/TopicViewer.hh @@ -24,7 +24,7 @@ #include #ifndef _WIN32 -# define TopicViewer_EXPORTS_API +# define TopicViewer_EXPORTS_API __attribute__ ((visibility ("default"))) #else # if (defined(TopicViewer_EXPORTS)) # define TopicViewer_EXPORTS_API __declspec(dllexport) diff --git a/src/plugins/WorldControl/WorldControl.hh b/src/plugins/WorldControl/WorldControl.hh index fda902b3f..8d50910a0 100644 --- a/src/plugins/WorldControl/WorldControl.hh +++ b/src/plugins/WorldControl/WorldControl.hh @@ -27,7 +27,7 @@ #include #ifndef _WIN32 -# define WorldControl_EXPORTS_API +# define WorldControl_EXPORTS_API __attribute__ ((visibility ("default"))) #else # if (defined(WorldControl_EXPORTS)) # define WorldControl_EXPORTS_API __declspec(dllexport) diff --git a/src/plugins/WorldControl/WorldControlEventListener.hh b/src/plugins/WorldControl/WorldControlEventListener.hh index 5ac7a514f..88230e7ef 100644 --- a/src/plugins/WorldControl/WorldControlEventListener.hh +++ b/src/plugins/WorldControl/WorldControlEventListener.hh @@ -18,17 +18,27 @@ #define GZ_GUI_WORLDCONTROLEVENTLISTENER_HH_ #include "gz/gui/Application.hh" -#include "gz/gui/Export.hh" #include "gz/gui/GuiEvents.hh" #include "gz/gui/MainWindow.hh" #include "gz/gui/qt.h" +#ifndef _WIN32 +# define WorldControl_EXPORTS_API __attribute__ ((visibility ("default"))) +#else +# if (defined(WorldControl_EXPORTS)) +# define WorldControl_EXPORTS_API __declspec(dllexport) +# else +# define WorldControl_EXPORTS_API __declspec(dllimport) +# endif +#endif + + namespace gz::gui { /// \brief Helper class for testing listening to events emitted by the /// WorldControl plugin. This is used for testing the event behavior of /// the WorldControl plugin. - class WorldControlEventListener : public QObject + class WorldControl_EXPORTS_API WorldControlEventListener : public QObject { Q_OBJECT diff --git a/src/plugins/WorldStats/WorldStats.hh b/src/plugins/WorldStats/WorldStats.hh index 07a42721e..942d47dc1 100644 --- a/src/plugins/WorldStats/WorldStats.hh +++ b/src/plugins/WorldStats/WorldStats.hh @@ -22,13 +22,12 @@ #include -#include "gz/gui/Export.hh" #include "gz/gui/Plugin.hh" #include #ifndef _WIN32 -# define WorldStats_EXPORTS_API +# define WorldStats_EXPORTS_API __attribute__ ((visibility ("default"))) #else # if (defined(WorldStats_EXPORTS)) # define WorldStats_EXPORTS_API __declspec(dllexport) diff --git a/test/helpers/TestHelper.hh b/test/helpers/TestHelper.hh index 00c2e0eb5..320db75ac 100644 --- a/test/helpers/TestHelper.hh +++ b/test/helpers/TestHelper.hh @@ -18,11 +18,10 @@ #define GZ_GUI_TESTHELPER_HH_ #include -#include #include #ifndef _WIN32 -# define TestHelper_EXPORTS_API +# define TestHelper_EXPORTS_API __attribute__ ((visibility ("default"))) #else # if (defined(TestHelper_EXPORTS)) # define TestHelper_EXPORTS_API __declspec(dllexport)