Ignition Gui

API Reference

6.4.0
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 IGNITION_GUI_GUIEVENTS_HH_
18 #define IGNITION_GUI_GUIEVENTS_HH_
19 
20 #include <QEvent>
21 #include <memory>
22 #include <string>
23 #include <utility>
24 #include <vector>
25 
28 #include <ignition/math/Vector2.hh>
29 #include <ignition/math/Vector3.hh>
31 #include <ignition/utils/ImplPtr.hh>
32 
33 #include "ignition/gui/Export.hh"
34 
35 namespace ignition
36 {
37  namespace gui
38  {
40  namespace events
41  {
44 
48  class Render : public QEvent
49  {
50  public: Render()
51  : QEvent(kType)
52  {
53  }
55  static const QEvent::Type kType = QEvent::Type(QEvent::MaxUser);
56  };
57 
61  class IGNITION_GUI_VISIBLE SnapIntervals : public QEvent
62  {
67  public: SnapIntervals(
68  const math::Vector3d &_xyz,
69  const math::Vector3d &_rpy,
70  const math::Vector3d &_scale);
71 
74  public: math::Vector3d Position() const;
75 
78  public: math::Vector3d Rotation() const;
79 
82  public: math::Vector3d Scale() const;
83 
85  static const QEvent::Type kType = QEvent::Type(QEvent::MaxUser - 1);
86 
89  IGN_UTILS_IMPL_PTR(dataPtr)
90  };
91 
94  class IGNITION_GUI_VISIBLE SpawnFromDescription : public QEvent
95  {
99  public: explicit SpawnFromDescription(const std::string &_description);
100 
102  static const QEvent::Type kType = QEvent::Type(QEvent::MaxUser - 2);
103 
106  public: const std::string &Description() const;
107 
110  IGN_UTILS_IMPL_PTR(dataPtr)
111  };
112 
115  class IGNITION_GUI_VISIBLE SpawnFromPath : public QEvent
116  {
119  public: explicit SpawnFromPath(const std::string &_filePath);
120 
122  static const QEvent::Type kType = QEvent::Type(QEvent::MaxUser - 3);
123 
126  public: const std::string &FilePath() const;
127 
130  IGN_UTILS_IMPL_PTR(dataPtr)
131  };
132 
135  class IGNITION_GUI_VISIBLE HoverToScene : public QEvent
136  {
140  public: explicit HoverToScene(const math::Vector3d &_point);
141 
143  static const QEvent::Type kType = QEvent::Type(QEvent::MaxUser - 4);
144 
148  public: math::Vector3d Point() const;
149 
152  IGN_UTILS_IMPL_PTR(dataPtr)
153  };
154 
158  class IGNITION_GUI_VISIBLE LeftClickToScene : public QEvent
159  {
163  public: explicit LeftClickToScene(const math::Vector3d &_point);
164 
166  static const QEvent::Type kType = QEvent::Type(QEvent::MaxUser - 5);
167 
170  public: math::Vector3d Point() const;
171 
174  IGN_UTILS_IMPL_PTR(dataPtr)
175  };
176 
180  class IGNITION_GUI_VISIBLE RightClickToScene : public QEvent
181  {
185  public: explicit RightClickToScene(const math::Vector3d &_point);
186 
188  static const QEvent::Type kType = QEvent::Type(QEvent::MaxUser - 6);
189 
192  public: math::Vector3d Point() const;
193 
196  IGN_UTILS_IMPL_PTR(dataPtr)
197  };
198 
202  class IGNITION_GUI_VISIBLE DropdownMenuEnabled : public QEvent
203  {
207  public: explicit DropdownMenuEnabled(bool _menuEnabled);
208 
210  static const QEvent::Type kType = QEvent::Type(QEvent::MaxUser - 7);
211 
214  public: bool MenuEnabled() const;
215 
218  IGN_UTILS_IMPL_PTR(dataPtr)
219  };
220 
223  class IGNITION_GUI_VISIBLE KeyReleaseOnScene : public QEvent
224  {
227  public: explicit KeyReleaseOnScene(const common::KeyEvent &_key);
228 
230  static const QEvent::Type kType = QEvent::Type(QEvent::MaxUser - 8);
231 
234  public: common::KeyEvent Key() const;
235 
238  IGN_UTILS_IMPL_PTR(dataPtr)
239  };
240 
243  class IGNITION_GUI_VISIBLE KeyPressOnScene : public QEvent
244  {
247  public: explicit KeyPressOnScene(const common::KeyEvent &_key);
248 
250  static const QEvent::Type kType = QEvent::Type(QEvent::MaxUser - 9);
251 
254  public: common::KeyEvent Key() const;
255 
258  IGN_UTILS_IMPL_PTR(dataPtr)
259  };
260 
266  class IGNITION_GUI_VISIBLE LeftClickOnScene : public QEvent
267  {
270  public: explicit LeftClickOnScene(
271  const common::MouseEvent &_mouse);
272 
274  static const QEvent::Type kType = QEvent::Type(QEvent::MaxUser - 10);
275 
277  public: const common::MouseEvent &Mouse() const;
278 
281  IGN_UTILS_IMPL_PTR(dataPtr)
282  };
283 
289  class IGNITION_GUI_VISIBLE RightClickOnScene : public QEvent
290  {
293  public: RightClickOnScene(
294  const common::MouseEvent &_mouse);
295 
297  static const QEvent::Type kType = QEvent::Type(QEvent::MaxUser - 11);
298 
300  public: const common::MouseEvent &Mouse() const;
301 
304  IGN_UTILS_IMPL_PTR(dataPtr)
305  };
306 
310  class IGNITION_GUI_VISIBLE BlockOrbit : public QEvent
311  {
314  public: explicit BlockOrbit(const bool &_block);
315 
317  static const QEvent::Type kType = QEvent::Type(QEvent::MaxUser - 12);
318 
322  public: bool Block() const;
323 
326  IGN_UTILS_IMPL_PTR(dataPtr)
327  };
328 
331  class IGNITION_GUI_VISIBLE HoverOnScene : public QEvent
332  {
335  public: explicit HoverOnScene(const common::MouseEvent &_mouse);
336 
338  static const QEvent::Type kType = QEvent::Type(QEvent::MaxUser - 13);
339 
343  public: common::MouseEvent Mouse() const;
344 
347  IGN_UTILS_IMPL_PTR(dataPtr)
348  };
349 
351  class IGNITION_GUI_VISIBLE SpawnCloneFromName : public QEvent
352  {
355  public: explicit SpawnCloneFromName(const std::string &_name);
356 
358  static const QEvent::Type kType = QEvent::Type(QEvent::MaxUser - 14);
359 
362  public: const std::string &Name() const;
363 
366  IGN_UTILS_IMPL_PTR(dataPtr)
367  };
368 
370  class IGNITION_GUI_VISIBLE DropOnScene : public QEvent
371  {
375  public: explicit DropOnScene(
376  const std::string &_dropText,
377  const ignition::math::Vector2i &_dropMouse);
378 
381  public: const std::string &DropText() const;
382 
385  public: const ignition::math::Vector2i &Mouse() const;
386 
388  static const QEvent::Type kType = QEvent::Type(QEvent::MaxUser - 15);
389 
392  IGN_UTILS_IMPL_PTR(dataPtr)
393  };
394 
397  class IGNITION_GUI_VISIBLE ScrollOnScene : public QEvent
398  {
401  public: explicit ScrollOnScene(const common::MouseEvent &_mouse);
402 
404  static const QEvent::Type kType = QEvent::Type(QEvent::MaxUser - 16);
405 
407  public: const common::MouseEvent &Mouse() const;
408 
411  IGN_UTILS_IMPL_PTR(dataPtr)
412  };
413 
416  class IGNITION_GUI_VISIBLE DragOnScene : public QEvent
417  {
420  public: explicit DragOnScene(const common::MouseEvent &_mouse);
421 
423  static const QEvent::Type kType = QEvent::Type(QEvent::MaxUser - 17);
424 
428  public: common::MouseEvent Mouse() const;
429 
432  IGN_UTILS_IMPL_PTR(dataPtr)
433  };
434 
437  class IGNITION_GUI_VISIBLE MousePressOnScene : public QEvent
438  {
441  public: MousePressOnScene(
442  const common::MouseEvent &_mouse);
443 
445  static const QEvent::Type kType = QEvent::Type(QEvent::MaxUser - 18);
446 
448  public: const common::MouseEvent &Mouse() const;
449 
452  IGN_UTILS_IMPL_PTR(dataPtr)
453  };
454 
456  class IGNITION_GUI_VISIBLE WorldControl : public QEvent
457  {
460  public: explicit WorldControl(const msgs::WorldControl &_worldControl);
461 
463  static const QEvent::Type kType = QEvent::Type(QEvent::MaxUser - 19);
464 
467  public: const msgs::WorldControl &WorldControlInfo() const;
468 
471  IGN_UTILS_IMPL_PTR(dataPtr)
472  };
473 
477  class IGNITION_GUI_VISIBLE PreRender : public QEvent
478  {
480  public: PreRender();
481 
483  static const QEvent::Type kType = QEvent::Type(QEvent::MaxUser - 20);
484 
487  IGN_UTILS_IMPL_PTR(dataPtr)
488  };
489  }
490  }
491 }
492 
493 #endif // IGNITION_GUI_GUIEVENTS_HH_
Event which is called to broadcast information about left mouse releases on the scene. For the 3D coordinates of that point on the scene, see LeftClickToScene.
Definition: GuiEvents.hh:266
Event which is called to broadcast information about mouse scrolls on the scene.
Definition: GuiEvents.hh:397
Event which is called to enable or disable the dropdown menu. This is primarily used by plugins which...
Definition: GuiEvents.hh:202
Event which is called to broadcast the 3D coordinates of a user&#39;s releasing the right button within t...
Definition: GuiEvents.hh:180
The class for sending and receiving custom snap value events. This event is used in the Transform Con...
Definition: GuiEvents.hh:61
Event called in the render thread of a 3D scene after the user camera has rendered. It&#39;s safe to make rendering calls in this event&#39;s callback.
Definition: GuiEvents.hh:48
Event which is called to broadcast information about mouse presses on the scene, with right...
Definition: GuiEvents.hh:437
Render()
Definition: GuiEvents.hh:50
Event called to spawn a resource, given its description as a string.
Definition: GuiEvents.hh:94
STL class.
Event that block the Interactive View control when some of the other plugins require it...
Definition: GuiEvents.hh:310
Event which is called to broadcast the key press within the scene.
Definition: GuiEvents.hh:243
Event called in the render thread of a 3D scene, before the user camera is rendered. It&#39;s safe to make rendering calls in this event&#39;s callback.
Definition: GuiEvents.hh:477
Event which is called to broadcast the 2D coordinates of a user&#39;s mouse hover within the scene...
Definition: GuiEvents.hh:331
Event which is called to broadcast the key release within the scene.
Definition: GuiEvents.hh:223
static const QEvent::Type kType
Unique type for this event.
Definition: GuiEvents.hh:55
Event called to spawn a resource, which takes the path to its file.
Definition: GuiEvents.hh:115
Event which is called to broadcast information about right mouse releases on the scene. For the 3D coordinates of that point on the scene, see RightClickToScene.
Definition: GuiEvents.hh:289
Event which is called to broadcast the 3D coordinates of a user&#39;s releasing the left button within th...
Definition: GuiEvents.hh:158
Event which is called to broadcast information about mouse drags on the scene.
Definition: GuiEvents.hh:416
Event called to clone a resource, given its name as a string.
Definition: GuiEvents.hh:370
Event which is called to share WorldControl information.
Definition: GuiEvents.hh:456
Event called to clone a resource, given its name as a string.
Definition: GuiEvents.hh:351
Event which is called to broadcast the 3D coordinates of a user&#39;s mouse hover within the scene...
Definition: GuiEvents.hh:135