Gazebo Gui
API Reference
9.0.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-gui
include
gz
gui
GuiEvents.hh
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2020 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
#ifndef GZ_GUI_GUIEVENTS_HH_
18
#define GZ_GUI_GUIEVENTS_HH_
19
20
#include <QEvent>
21
#include <memory>
22
#include <string>
23
#include <utility>
24
#include <vector>
25
26
#include <
gz/common/KeyEvent.hh
>
27
#include <
gz/common/MouseEvent.hh
>
28
#include <
gz/math/Vector2.hh
>
29
#include <
gz/math/Vector3.hh
>
30
#include <gz/msgs/world_control.pb.h>
31
#include <gz/utils/ImplPtr.hh>
32
33
#include "gz/gui/Export.hh"
34
35
namespace
gz::gui::events
36
{
39
43
class
Render
:
public
QEvent
44
{
45
public
:
Render
()
46
:
QEvent
(kType)
47
{
48
}
50
static
const
QEvent::Type kType = QEvent::Type(QEvent::MaxUser);
51
};
52
56
class
GZ_GUI_VISIBLE
SnapIntervals
:
public
QEvent
57
{
62
public
:
SnapIntervals
(
63
const
math::Vector3d &_xyz,
64
const
math::Vector3d &_rpy,
65
const
math::Vector3d &_scale);
66
69
public
: math::Vector3d
Position
()
const
;
70
73
public
: math::Vector3d
Rotation
()
const
;
74
77
public
: math::Vector3d
Scale
()
const
;
78
80
static
const
QEvent::Type kType = QEvent::Type(QEvent::MaxUser - 1);
81
84
GZ_UTILS_IMPL_PTR(dataPtr)
85
};
86
89
class
GZ_GUI_VISIBLE
SpawnFromDescription
:
public
QEvent
90
{
94
public
:
explicit
SpawnFromDescription
(
const
std::string
&_description);
95
97
static
const
QEvent::Type kType = QEvent::Type(QEvent::MaxUser - 2);
98
101
public
:
const
std::string
&
Description
()
const
;
102
105
GZ_UTILS_IMPL_PTR(dataPtr)
106
};
107
110
class
GZ_GUI_VISIBLE
SpawnFromPath
:
public
QEvent
111
{
114
public
:
explicit
SpawnFromPath
(
const
std::string
&_filePath);
115
117
static
const
QEvent::Type kType = QEvent::Type(QEvent::MaxUser - 3);
118
121
public
:
const
std::string
&
FilePath
()
const
;
122
125
GZ_UTILS_IMPL_PTR(dataPtr)
126
};
127
130
class
GZ_GUI_VISIBLE
HoverToScene
:
public
QEvent
131
{
135
public
:
explicit
HoverToScene
(
const
math::Vector3d &_point);
136
138
static
const
QEvent::Type kType = QEvent::Type(QEvent::MaxUser - 4);
139
143
public
: math::Vector3d
Point
()
const
;
144
147
GZ_UTILS_IMPL_PTR(dataPtr)
148
};
149
153
class
GZ_GUI_VISIBLE
LeftClickToScene
:
public
QEvent
154
{
158
public
:
explicit
LeftClickToScene
(
const
math::Vector3d &_point);
159
161
static
const
QEvent::Type kType = QEvent::Type(QEvent::MaxUser - 5);
162
165
public
: math::Vector3d
Point
()
const
;
166
169
GZ_UTILS_IMPL_PTR(dataPtr)
170
};
171
175
class
GZ_GUI_VISIBLE
RightClickToScene
:
public
QEvent
176
{
180
public
:
explicit
RightClickToScene
(
const
math::Vector3d &_point);
181
183
static
const
QEvent::Type kType = QEvent::Type(QEvent::MaxUser - 6);
184
187
public
: math::Vector3d
Point
()
const
;
188
191
GZ_UTILS_IMPL_PTR(dataPtr)
192
};
193
197
class
GZ_GUI_VISIBLE
DropdownMenuEnabled
:
public
QEvent
198
{
202
public
:
explicit
DropdownMenuEnabled
(
bool
_menuEnabled);
203
205
static
const
QEvent::Type kType = QEvent::Type(QEvent::MaxUser - 7);
206
209
public
:
bool
MenuEnabled
()
const
;
210
213
GZ_UTILS_IMPL_PTR(dataPtr)
214
};
215
218
class
GZ_GUI_VISIBLE
KeyReleaseOnScene
:
public
QEvent
219
{
222
public
:
explicit
KeyReleaseOnScene
(
const
common::KeyEvent &_key);
223
225
static
const
QEvent::Type kType = QEvent::Type(QEvent::MaxUser - 8);
226
229
public
: common::KeyEvent
Key
()
const
;
230
233
GZ_UTILS_IMPL_PTR(dataPtr)
234
};
235
238
class
GZ_GUI_VISIBLE
KeyPressOnScene
:
public
QEvent
239
{
242
public
:
explicit
KeyPressOnScene
(
const
common::KeyEvent &_key);
243
245
static
const
QEvent::Type kType = QEvent::Type(QEvent::MaxUser - 9);
246
249
public
: common::KeyEvent
Key
()
const
;
250
253
GZ_UTILS_IMPL_PTR(dataPtr)
254
};
255
261
class
GZ_GUI_VISIBLE
LeftClickOnScene
:
public
QEvent
262
{
265
public
:
explicit
LeftClickOnScene
(
266
const
common::MouseEvent &_mouse);
267
269
static
const
QEvent::Type kType = QEvent::Type(QEvent::MaxUser - 10);
270
272
public
:
const
common::MouseEvent &
Mouse
()
const
;
273
276
GZ_UTILS_IMPL_PTR(dataPtr)
277
};
278
284
class
GZ_GUI_VISIBLE
RightClickOnScene
:
public
QEvent
285
{
288
public
:
RightClickOnScene
(
289
const
common::MouseEvent &_mouse);
290
292
static
const
QEvent::Type kType = QEvent::Type(QEvent::MaxUser - 11);
293
295
public
:
const
common::MouseEvent &
Mouse
()
const
;
296
299
GZ_UTILS_IMPL_PTR(dataPtr)
300
};
301
305
class
GZ_GUI_VISIBLE
BlockOrbit
:
public
QEvent
306
{
309
public
:
explicit
BlockOrbit
(
const
bool
&_block);
310
312
static
const
QEvent::Type kType = QEvent::Type(QEvent::MaxUser - 12);
313
317
public
:
bool
Block
()
const
;
318
321
GZ_UTILS_IMPL_PTR(dataPtr)
322
};
323
326
class
GZ_GUI_VISIBLE
HoverOnScene
:
public
QEvent
327
{
330
public
:
explicit
HoverOnScene
(
const
common::MouseEvent &_mouse);
331
333
static
const
QEvent::Type kType = QEvent::Type(QEvent::MaxUser - 13);
334
338
public
: common::MouseEvent
Mouse
()
const
;
339
342
GZ_UTILS_IMPL_PTR(dataPtr)
343
};
344
346
class
GZ_GUI_VISIBLE
SpawnCloneFromName
:
public
QEvent
347
{
350
public
:
explicit
SpawnCloneFromName
(
const
std::string
&_name);
351
353
static
const
QEvent::Type kType = QEvent::Type(QEvent::MaxUser - 14);
354
357
public
:
const
std::string
&
Name
()
const
;
358
361
GZ_UTILS_IMPL_PTR(dataPtr)
362
};
363
365
class
GZ_GUI_VISIBLE
DropOnScene
:
public
QEvent
366
{
370
public
:
explicit
DropOnScene
(
371
const
std::string
&_dropText,
372
const
math::Vector2i &_dropMouse);
373
376
public
:
const
std::string
&
DropText
()
const
;
377
380
public
:
const
math::Vector2i &
Mouse
()
const
;
381
383
static
const
QEvent::Type kType = QEvent::Type(QEvent::MaxUser - 15);
384
387
GZ_UTILS_IMPL_PTR(dataPtr)
388
};
389
392
class
GZ_GUI_VISIBLE
ScrollOnScene
:
public
QEvent
393
{
396
public
:
explicit
ScrollOnScene
(
const
common::MouseEvent &_mouse);
397
399
static
const
QEvent::Type kType = QEvent::Type(QEvent::MaxUser - 16);
400
402
public
:
const
common::MouseEvent &
Mouse
()
const
;
403
406
GZ_UTILS_IMPL_PTR(dataPtr)
407
};
408
411
class
GZ_GUI_VISIBLE
DragOnScene
:
public
QEvent
412
{
415
public
:
explicit
DragOnScene
(
const
common::MouseEvent &_mouse);
416
418
static
const
QEvent::Type kType = QEvent::Type(QEvent::MaxUser - 17);
419
423
public
: common::MouseEvent
Mouse
()
const
;
424
427
GZ_UTILS_IMPL_PTR(dataPtr)
428
};
429
432
class
GZ_GUI_VISIBLE
MousePressOnScene
:
public
QEvent
433
{
436
public
:
MousePressOnScene
(
437
const
common::MouseEvent &_mouse);
438
440
static
const
QEvent::Type kType = QEvent::Type(QEvent::MaxUser - 18);
441
443
public
:
const
common::MouseEvent &
Mouse
()
const
;
444
447
GZ_UTILS_IMPL_PTR(dataPtr)
448
};
449
451
class
GZ_GUI_VISIBLE
WorldControl
:
public
QEvent
452
{
455
public
:
explicit
WorldControl
(
const
msgs::WorldControl &_worldControl);
456
458
static
const
QEvent::Type kType = QEvent::Type(QEvent::MaxUser - 19);
459
462
public
:
const
msgs::WorldControl &
WorldControlInfo
()
const
;
463
466
GZ_UTILS_IMPL_PTR(dataPtr)
467
};
468
472
class
GZ_GUI_VISIBLE
PreRender
:
public
QEvent
473
{
475
public
:
PreRender
();
476
478
static
const
QEvent::Type kType = QEvent::Type(QEvent::MaxUser - 20);
479
482
GZ_UTILS_IMPL_PTR(dataPtr)
483
};
484
}
// namespace gz::gui::events
485
486
#endif
// GZ_GUI_GUIEVENTS_HH_