Gazebo Sim
API Reference
7.9.0
insert_drive_file
Tutorials
library_books
Classes
toc
Namespaces
insert_drive_file
Files
launch
Gazebo Website
Index
List
Hierarchy
Members: All
Members: Functions
Members: Variables
Members: Typedefs
Members: Enumerations
Members: Enumerator
List
Members
Functions
Typedefs
Variables
Enumerations
Enumerator
src
gz-sim
src
gui
plugins
modules
EntityContextMenu.hh
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2019 Open Source Robotics Foundation
3
*
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
6
* You may obtain a copy of the License at
7
*
8
* http://www.apache.org/licenses/LICENSE-2.0
9
*
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
15
*
16
*/
17
18
#ifndef GZ_SIM_GUI_ENTITYCONTEXTMENU_HH_
19
#define GZ_SIM_GUI_ENTITYCONTEXTMENU_HH_
20
21
#include <gz/gui/qt.h>
22
#include <QtQml/QQmlExtensionPlugin>
23
#include <memory>
24
25
namespace
gz
26
{
27
namespace
sim
28
{
29
class
EntityContextMenuPrivate;
30
33
class
GzSimPlugin
:
public
QQmlExtensionPlugin
34
{
35
Q_OBJECT
36
37
// unique id
38
Q_PLUGIN_METADATA(IID
"GzSim/1.0"
)
39
40
41
public
:
void
registerTypes(
const
char
*_uri)
override
;
43
};
44
46
class
EntityContextMenu
:
public
QQuickItem
47
{
48
Q_OBJECT
49
51
public
:
EntityContextMenu
();
52
54
public
:
~EntityContextMenu
()
override
;
55
59
public
: Q_INVOKABLE
void
OnRemove
(
60
const
QString &_data,
const
QString &_type);
61
65
public
: Q_INVOKABLE
void
OnRequest
(
const
QString &_request,
66
const
QString &_data);
67
70
private
:
std::unique_ptr<EntityContextMenuPrivate>
dataPtr;
71
};
72
}
73
}
74
75
#endif