Skip to content

Commit

Permalink
fixed typos
Browse files Browse the repository at this point in the history
Signed-off-by: Jenn Nguyen <jenn@openrobotics.org>
  • Loading branch information
jennuine committed Sep 22, 2021
1 parent 5541db4 commit 55d9790
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 19 deletions.
2 changes: 1 addition & 1 deletion Migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ since pose information is being logged in the `changed_state` topic.
+ `CameraTracking`: Move to, follow, set camera pose
+ `MarkerManager`: Enables the use of markers
+ `SelectEntities`: Select entities clicking on the scene
+ `Spawn`: Functionality to sawn entities into the scene via GUI
+ `Spawn`: Functionality to spawn entities into the scene via GUI
+ `VisualizationCapabilities`: View collisions, inertial, CoM, joints, etc.

Moreover, legacy mode needs to be turned off for the following plugins
Expand Down
20 changes: 9 additions & 11 deletions src/gui/plugins/entity_context_menu/EntityContextMenuPlugin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#include <QtQml>

#include <ignition/common/Console.hh>
#include <ignition/common/MouseEvent.hh>

#include <ignition/gui/Application.hh>
#include <ignition/gui/GuiEvents.hh>
Expand All @@ -32,7 +31,6 @@

#include <ignition/plugin/Register.hh>

#include <ignition/rendering/Camera.hh>
#include <ignition/rendering/RenderingIface.hh>
#include <ignition/rendering/Visual.hh>
#include <ignition/rendering/Scene.hh>
Expand All @@ -50,8 +48,8 @@ namespace ignition::gazebo
/// \brief User camera
public: rendering::CameraPtr camera{nullptr};

/// \brief Entity context menu hanlder
public: EntityContextMenuHanlder entityContextMenuHanlder;
/// \brief Entity context menu handler
public: EntityContextMenuHandler entityContextMenuHandler;
};
}

Expand Down Expand Up @@ -111,7 +109,7 @@ void EntityContextMenu::LoadConfig(const tinyxml2::XMLElement *)
}

renderWindowOverlay->SetEntityContextMenuHandler(
this->dataPtr->entityContextMenuHanlder);
this->dataPtr->entityContextMenuHandler);

if (this->title.empty())
this->title = "EntityContextMenu";
Expand All @@ -133,7 +131,7 @@ bool EntityContextMenu::eventFilter(QObject *_obj, QEvent *_event)
static_cast<ignition::gui::events::RightClickOnScene*>(_event);
if (_e)
{
this->dataPtr->entityContextMenuHanlder.HandleMouseContextMenu(
this->dataPtr->entityContextMenuHandler.HandleMouseContextMenu(
_e->Mouse(), this->dataPtr->camera);
}
}
Expand All @@ -152,11 +150,11 @@ EntityContextMenuItem::EntityContextMenuItem(QQuickItem *_parent)

/////////////////////////////////////////////////
void EntityContextMenuItem::SetEntityContextMenuHandler(
const EntityContextMenuHanlder &_entityContextMenuHanlder)
const EntityContextMenuHandler &_entityContextMenuHandler)
{
this->connect(
&_entityContextMenuHanlder,
&EntityContextMenuHanlder::ContextMenuRequested,
&_entityContextMenuHandler,
&EntityContextMenuHandler::ContextMenuRequested,
this,
&EntityContextMenuItem::OnContextMenuRequested,
Qt::QueuedConnection);
Expand All @@ -170,11 +168,11 @@ void EntityContextMenuItem::OnContextMenuRequested(
}

/////////////////////////////////////////////////
EntityContextMenuHanlder::EntityContextMenuHanlder()
EntityContextMenuHandler::EntityContextMenuHandler()
{
}

void EntityContextMenuHanlder::HandleMouseContextMenu(
void EntityContextMenuHandler::HandleMouseContextMenu(
const common::MouseEvent &_mouseEvent, const rendering::CameraPtr &_camera)
{
if (!_mouseEvent.Dragging() &&
Expand Down
14 changes: 7 additions & 7 deletions src/gui/plugins/entity_context_menu/EntityContextMenuPlugin.hh
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ namespace gazebo
{
class EntityContextMenuPrivate;

/// \brief This plugin is in charge to show the entity context menu when the
/// right button is clicked on a visual.
/// \brief This plugin is in charge of showing the entity context menu when
/// the right button is clicked on a visual.
class EntityContextMenu : public ignition::gui::Plugin
{
Q_OBJECT
Expand All @@ -55,12 +55,12 @@ namespace gazebo
private: std::unique_ptr<EntityContextMenuPrivate> dataPtr;
};

class EntityContextMenuHanlder : public QObject
class EntityContextMenuHandler : public QObject
{
Q_OBJECT

/// \brief Constructor
public: EntityContextMenuHanlder();
public: EntityContextMenuHandler();

/// \brief Handle mouse event for context menu
/// \param[in] _mouseEvent Right click mouse event
Expand All @@ -85,10 +85,10 @@ namespace gazebo
/// \param[in] _parent Parent item
public: explicit EntityContextMenuItem(QQuickItem *_parent = nullptr);

/// \brief Set the entity context menu hanlder
/// \param[in] _entityContextMenuHandler Entity context menu hanlder
/// \brief Set the entity context menu handler
/// \param[in] _entityContextMenuHandler Entity context menu handler
public: void SetEntityContextMenuHandler(
const EntityContextMenuHanlder &_entityContextMenuHandler);
const EntityContextMenuHandler &_entityContextMenuHandler);

/// \brief Signal fired to open context menu
/// Note that the function name needs to start with lowercase in order for
Expand Down

0 comments on commit 55d9790

Please sign in to comment.