Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed topic echo test #448

Merged
merged 3 commits into from
Aug 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/plugins/topic_echo/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@ ign_gui_add_plugin(TopicEcho
QT_HEADERS
TopicEcho.hh
TEST_SOURCES
# TopicEcho_TEST.cc
TopicEcho_TEST.cc
)

1 change: 0 additions & 1 deletion src/plugins/topic_echo/TopicEcho.cc
Original file line number Diff line number Diff line change
Expand Up @@ -180,4 +180,3 @@ void TopicEcho::SetPaused(const bool &_paused)
// Register this plugin
IGNITION_ADD_PLUGIN(ignition::gui::plugins::TopicEcho,
ignition::gui::Plugin)

12 changes: 11 additions & 1 deletion src/plugins/topic_echo/TopicEcho.hh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,16 @@
#pragma warning(pop)
#endif

#ifndef _WIN32
# define TopicEcho_EXPORTS_API
#else
# if (defined(TopicEcho_EXPORTS))
# define TopicEcho_EXPORTS_API __declspec(dllexport)
# else
# define TopicEcho_EXPORTS_API __declspec(dllimport)
# endif
#endif

#include <memory>

#include "ignition/gui/Plugin.hh"
Expand All @@ -42,7 +52,7 @@ namespace plugins
///
/// ## Configuration
/// This plugin doesn't accept any custom configuration.
class TopicEcho : public Plugin
class TopicEcho_EXPORTS_API TopicEcho : public Plugin
{
Q_OBJECT

Expand Down
5 changes: 5 additions & 0 deletions src/plugins/topic_echo/TopicEcho.qml
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,14 @@ Rectangle {

TextField {
id: topicField
objectName: "topicField"
text: TopicEcho.topic
selectByMouse: true
}
}

Switch {
objectName: "echoSwitch"
text: qsTr("Echo")
onToggled: {
TopicEcho.topic = topicField.text
Expand All @@ -64,13 +66,15 @@ Rectangle {

SpinBox {
id: bufferField
objectName: "bufferField"
value: 10
onValueChanged: {
TopicEcho.OnBuffer(value)
}
}

CheckBox {
objectName: "pauseCheck"
text: qsTr("Pause")
checked: TopicEcho.paused
onClicked: {
Expand All @@ -90,6 +94,7 @@ Rectangle {

ListView {
id: listView
objectName: "listView"
clip: true
anchors.fill: parent

Expand Down
Loading