Gazebo Sim

API Reference

8.7.0
EntityContextMenuItem Class Reference

A QQUickItem that manages the render window. More...

#include <EntityContextMenuPlugin.hh>

Public Slots

void OnContextMenuRequested (QString _entity, int _mouseX, int _mouseY)
 Qt callback when context menu request is received. More...
 

Signals

void openContextMenu (QString _entity, int _mouseX, int _mouseY)
 Signal fired to open context menu Note that the function name needs to start with lowercase in order for the connection to work on the QML side. More...
 

Public Member Functions

 EntityContextMenuItem (QQuickItem *_parent=nullptr)
 Constructor. More...
 
void SetEntityContextMenuHandler (const EntityContextMenuHandler &_entityContextMenuHandler)
 Set the entity context menu handler. More...
 

Detailed Description

A QQUickItem that manages the render window.

Constructor & Destructor Documentation

◆ EntityContextMenuItem()

EntityContextMenuItem ( QQuickItem *  _parent = nullptr)
explicit

Constructor.

Parameters
[in]_parentParent item

Member Function Documentation

◆ OnContextMenuRequested

void OnContextMenuRequested ( QString  _entity,
int  _mouseX,
int  _mouseY 
)
slot

Qt callback when context menu request is received.

Parameters
[in]_entityScoped name of entity.
[in]_mouseXX coordinate of the right click
[in]_mouseYY coordinate of the right click

◆ openContextMenu

void openContextMenu ( QString  _entity,
int  _mouseX,
int  _mouseY 
)
signal

Signal fired to open context menu Note that the function name needs to start with lowercase in order for the connection to work on the QML side.

Parameters
[in]_entityScoped name of entity.
[in]_mouseXX coordinate of the right click
[in]_mouseYY coordinate of the right click

◆ SetEntityContextMenuHandler()

void SetEntityContextMenuHandler ( const EntityContextMenuHandler _entityContextMenuHandler)

Set the entity context menu handler.

Parameters
[in]_entityContextMenuHandlerEntity context menu handler

The documentation for this class was generated from the following file: