-
Notifications
You must be signed in to change notification settings - Fork 340
Adds a "Attach Plugin" context menu #2956
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
base: main
Are you sure you want to change the base?
Conversation
Adds a ui to attach a plugin from the Qt GUI itself to an object. Signed-off-by: Arjo Chakravarty <[email protected]>
|
||
emit ContextMenuRequested(visual->Name().c_str()); | ||
uint64_t entityId = kNullEntity; | ||
if (std::holds_alternative<uint64_t>(visual->UserData("gazebo-entity"))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
include <variant>
} | ||
|
||
emit ContextMenuRequested(visual->Name().c_str()); | ||
uint64_t entityId = kNullEntity; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#include <cstdint>
|
||
this->dataPtr->removeService = | ||
"/world/" + this->dataPtr->worldName + "/remove"; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove new line
///////////////////////////////////////////////// | ||
void EntityContextMenu::OnAddPlugin(const QString &_name, | ||
const QString &_filename, const QString &_innerXml, | ||
const uint64_t _entity) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
include <cstdint>
} | ||
this->dataPtr->addPluginService = | ||
"/world/" + this->dataPtr->worldName + "/entity/system/add"; | ||
std::function<void(const msgs::Boolean &, const bool)> cb = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
include <functional>
"/world/" + this->dataPtr->worldName + "/remove"; | ||
|
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"/world/" + this->dataPtr->worldName + "/remove"; | |
} | |
"/world/" + this->dataPtr->worldName + "/remove"; | |
} |
this->dataPtr->worldName = worldNameVariant.toString().toStdString(); | ||
} | ||
|
||
this->dataPtr->removeService = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check if service name is valid transport::TopicUtils::AsValidTopic
/// \param[in] _request Request type | ||
/// \param[in] _data Request data |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix doc
Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Arjo Chakravarty <[email protected]>
note the component inspector also has a |
Oh wow I was not aware of this, will look into how we canreuse the code across both the "+" is incredibly small on my gazebosim which is probably why I missed it. Also the fact that its in the component inspector and not the component inspector editor where I'd expect it to be. |
It would be great to get this in since it's a lot more discoverable than the one in the component inspector, but as @iche033 said, is there a way we could reuse the existing code? |
I don't think this will make jetty. |
@arjo129, okay. thanks for the update. |
🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸
🎉 New feature
Closes #
Summary
Adds a ui to attach a plugin from the Qt GUI itself to an object.

Test it
Right click on any entity, click "Attach Plugin" you should see the UI and plugin.
Checklist
codecheck
passed (See contributing)Generated-by: Remove this if GenAI was not used.
Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining
Signed-off-by
andGenerated-by
messages.🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸