Ignition Gui

API Reference

7.0.0~pre1
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>
30 #include <ignition/utils/ImplPtr.hh>
31 
32 #include "ignition/gui/Export.hh"
33 
34 namespace ignition
35 {
36  namespace gui
37  {
39  namespace events
40  {
43 
46  class Render : public QEvent
47  {
48  public: Render()
49  : QEvent(kType)
50  {
51  }
53  static const QEvent::Type kType = QEvent::Type(QEvent::MaxUser);
54  };
55 
59  class IGNITION_GUI_VISIBLE SnapIntervals : public QEvent
60  {
65  public: SnapIntervals(
66  const math::Vector3d &_xyz,
67  const math::Vector3d &_rpy,
68  const math::Vector3d &_scale);
69 
72  public: math::Vector3d Position() const;
73 
76  public: math::Vector3d Rotation() const;
77 
80  public: math::Vector3d Scale() const;
81 
83  static const QEvent::Type kType = QEvent::Type(QEvent::MaxUser - 1);
84 
87  IGN_UTILS_IMPL_PTR(dataPtr)
88  };
89 
92  class IGNITION_GUI_VISIBLE SpawnFromDescription : public QEvent
93  {
97  public: explicit SpawnFromDescription(const std::string &_description);
98 
100  static const QEvent::Type kType = QEvent::Type(QEvent::MaxUser - 2);
101 
104  public: const std::string &Description() const;
105 
108  IGN_UTILS_IMPL_PTR(dataPtr)
109  };
110 
113  class IGNITION_GUI_VISIBLE SpawnFromPath : public QEvent
114  {
117  public: explicit SpawnFromPath(const std::string &_filePath);
118 
120  static const QEvent::Type kType = QEvent::Type(QEvent::MaxUser - 3);
121 
124  public: const std::string &FilePath() const;
125 
128  IGN_UTILS_IMPL_PTR(dataPtr)
129  };
130 
133  class IGNITION_GUI_VISIBLE HoverToScene : public QEvent
134  {
138  public: explicit HoverToScene(const math::Vector3d &_point);
139 
141  static const QEvent::Type kType = QEvent::Type(QEvent::MaxUser - 4);
142 
146  public: math::Vector3d Point() const;
147 
150  IGN_UTILS_IMPL_PTR(dataPtr)
151  };
152 
156  class IGNITION_GUI_VISIBLE LeftClickToScene : public QEvent
157  {
161  public: explicit LeftClickToScene(const math::Vector3d &_point);
162 
164  static const QEvent::Type kType = QEvent::Type(QEvent::MaxUser - 5);
165 
168  public: math::Vector3d Point() const;
169 
172  IGN_UTILS_IMPL_PTR(dataPtr)
173  };
174 
178  class IGNITION_GUI_VISIBLE RightClickToScene : public QEvent
179  {
183  public: explicit RightClickToScene(const math::Vector3d &_point);
184 
186  static const QEvent::Type kType = QEvent::Type(QEvent::MaxUser - 6);
187 
190  public: math::Vector3d Point() const;
191 
194  IGN_UTILS_IMPL_PTR(dataPtr)
195  };
196 
200  class IGNITION_GUI_VISIBLE DropdownMenuEnabled : public QEvent
201  {
205  public: explicit DropdownMenuEnabled(bool _menuEnabled);
206 
208  static const QEvent::Type kType = QEvent::Type(QEvent::MaxUser - 7);
209 
212  public: bool MenuEnabled() const;
213 
216  IGN_UTILS_IMPL_PTR(dataPtr)
217  };
218 
221  class IGNITION_GUI_VISIBLE KeyReleaseOnScene : public QEvent
222  {
225  public: explicit KeyReleaseOnScene(const common::KeyEvent &_key);
226 
228  static const QEvent::Type kType = QEvent::Type(QEvent::MaxUser - 8);
229 
232  public: common::KeyEvent Key() const;
233 
236  IGN_UTILS_IMPL_PTR(dataPtr)
237  };
238 
241  class IGNITION_GUI_VISIBLE KeyPressOnScene : public QEvent
242  {
245  public: explicit KeyPressOnScene(const common::KeyEvent &_key);
246 
248  static const QEvent::Type kType = QEvent::Type(QEvent::MaxUser - 9);
249 
252  public: common::KeyEvent Key() const;
253 
256  IGN_UTILS_IMPL_PTR(dataPtr)
257  };
258 
264  class IGNITION_GUI_VISIBLE LeftClickOnScene : public QEvent
265  {
268  public: explicit LeftClickOnScene(
269  const common::MouseEvent &_mouse);
270 
272  static const QEvent::Type kType = QEvent::Type(QEvent::MaxUser - 10);
273 
275  public: const common::MouseEvent &Mouse() const;
276 
279  IGN_UTILS_IMPL_PTR(dataPtr)
280  };
281 
287  class IGNITION_GUI_VISIBLE RightClickOnScene : public QEvent
288  {
291  public: RightClickOnScene(
292  const common::MouseEvent &_mouse);
293 
295  static const QEvent::Type kType = QEvent::Type(QEvent::MaxUser - 11);
296 
298  public: const common::MouseEvent &Mouse() const;
299 
302  IGN_UTILS_IMPL_PTR(dataPtr)
303  };
304 
308  class IGNITION_GUI_VISIBLE BlockOrbit : public QEvent
309  {
312  public: explicit BlockOrbit(const bool &_block);
313 
315  static const QEvent::Type kType = QEvent::Type(QEvent::MaxUser - 12);
316 
320  public: bool Block() const;
321 
324  IGN_UTILS_IMPL_PTR(dataPtr)
325  };
326 
329  class IGNITION_GUI_VISIBLE HoverOnScene : public QEvent
330  {
333  public: explicit HoverOnScene(const common::MouseEvent &_mouse);
334 
336  static const QEvent::Type kType = QEvent::Type(QEvent::MaxUser - 13);
337 
341  public: common::MouseEvent Mouse() const;
342 
345  IGN_UTILS_IMPL_PTR(dataPtr)
346  };
347 
349  class IGNITION_GUI_VISIBLE SpawnCloneFromName : public QEvent
350  {
353  public: explicit SpawnCloneFromName(const std::string &_name);
354 
356  static const QEvent::Type kType = QEvent::Type(QEvent::MaxUser - 14);
357 
360  public: const std::string &Name() const;
361 
364  IGN_UTILS_IMPL_PTR(dataPtr)
365  };
366 
368  class IGNITION_GUI_VISIBLE DropOnScene : public QEvent
369  {
373  public: explicit DropOnScene(
374  const std::string &_dropText,
375  const ignition::math::Vector2i &_dropMouse);
376 
379  public: const std::string &DropText() const;
380 
383  public: const ignition::math::Vector2i &Mouse() const;
384 
386  static const QEvent::Type kType = QEvent::Type(QEvent::MaxUser - 15);
387 
390  IGN_UTILS_IMPL_PTR(dataPtr)
391  };
392 
395  class IGNITION_GUI_VISIBLE ScrollOnScene : public QEvent
396  {
399  public: explicit ScrollOnScene(const common::MouseEvent &_mouse);
400 
402  static const QEvent::Type kType = QEvent::Type(QEvent::MaxUser - 16);
403 
405  public: const common::MouseEvent &Mouse() const;
406 
409  IGN_UTILS_IMPL_PTR(dataPtr)
410  };
411 
414  class IGNITION_GUI_VISIBLE DragOnScene : public QEvent
415  {
418  public: explicit DragOnScene(const common::MouseEvent &_mouse);
419 
421  static const QEvent::Type kType = QEvent::Type(QEvent::MaxUser - 17);
422 
426  public: common::MouseEvent Mouse() const;
427 
430  IGN_UTILS_IMPL_PTR(dataPtr)
431  };
432 
435  class IGNITION_GUI_VISIBLE MousePressOnScene : public QEvent
436  {
439  public: MousePressOnScene(
440  const common::MouseEvent &_mouse);
441 
443  static const QEvent::Type kType = QEvent::Type(QEvent::MaxUser - 18);
444 
446  public: const common::MouseEvent &Mouse() const;
447 
450  IGN_UTILS_IMPL_PTR(dataPtr)
451  };
452  }
453  }
454 }
455 
456 #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:264
Event which is called to broadcast information about mouse scrolls on the scene.
Definition: GuiEvents.hh:395
Event which is called to enable or disable the dropdown menu. This is primarily used by plugins which...
Definition: GuiEvents.hh:200
Event which is called to broadcast the 3D coordinates of a user&#39;s releasing the right button within t...
Definition: GuiEvents.hh:178
The class for sending and receiving custom snap value events. This event is used in the Transform Con...
Definition: GuiEvents.hh:59
Event called in the render thread of a 3D scene. It&#39;s safe to make rendering calls in this event&#39;s ca...
Definition: GuiEvents.hh:46
Event which is called to broadcast information about mouse presses on the scene, with right...
Definition: GuiEvents.hh:435
Render()
Definition: GuiEvents.hh:48
Event called to spawn a resource, given its description as a string.
Definition: GuiEvents.hh:92
STL class.
Event that block the Interactive View control when some of the other plugins require it...
Definition: GuiEvents.hh:308
Event which is called to broadcast the key press within the scene.
Definition: GuiEvents.hh:241
Event which is called to broadcast the 2D coordinates of a user&#39;s mouse hover within the scene...
Definition: GuiEvents.hh:329
Event which is called to broadcast the key release within the scene.
Definition: GuiEvents.hh:221
static const QEvent::Type kType
Unique type for this event.
Definition: GuiEvents.hh:53
Event called to spawn a resource, which takes the path to its file.
Definition: GuiEvents.hh:113
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:287
Event which is called to broadcast the 3D coordinates of a user&#39;s releasing the left button within th...
Definition: GuiEvents.hh:156
Event which is called to broadcast information about mouse drags on the scene.
Definition: GuiEvents.hh:414
Event called to clone a resource, given its name as a string.
Definition: GuiEvents.hh:368
Event called to clone a resource, given its name as a string.
Definition: GuiEvents.hh:349
Event which is called to broadcast the 3D coordinates of a user&#39;s mouse hover within the scene...
Definition: GuiEvents.hh:133