Ignition Gui

API Reference

7.0.0~pre1
Conversions.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 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 IGNITION_GUI_CONVERSIONS_HH_
19 #define IGNITION_GUI_CONVERSIONS_HH_
20 
21 #ifdef _MSC_VER
22 #pragma warning(push, 0)
23 #endif
24 #include <ignition/msgs/time.pb.h>
25 #ifdef _MSC_VER
26 #pragma warning(pop)
27 #endif
30 #include <ignition/common/Time.hh>
31 #include <ignition/math/Color.hh>
32 #include <ignition/math/Vector2.hh>
33 #include <ignition/math/Vector3.hh>
34 
35 #include "ignition/gui/qt.h"
36 #include "ignition/gui/Export.hh"
37 
38 namespace ignition
39 {
40  namespace common
41  {
42  class MouseEvent;
43  }
44 
45  namespace gui
46  {
50  IGNITION_GUI_VISIBLE
51  QColor convert(const math::Color &_color);
52 
56  IGNITION_GUI_VISIBLE
57  math::Color convert(const QColor &_color);
58 
62  IGNITION_GUI_VISIBLE
63  QPointF convert(const math::Vector2d &_pt);
64 
68  IGNITION_GUI_VISIBLE
69  math::Vector2d convert(const QPointF &_pt);
70 
74  IGNITION_GUI_VISIBLE
75  QVector3D convert(const math::Vector3d &_vec);
76 
80  IGNITION_GUI_VISIBLE
81  math::Vector3d convert(const QVector3D &_vec);
82 
89  IGNITION_GUI_VISIBLE
90  common::MouseEvent convert(const QMouseEvent &_e);
91 
97  IGNITION_GUI_VISIBLE
98  common::MouseEvent convert(const QWheelEvent &_e);
99 
104  IGNITION_GUI_VISIBLE
105  common::KeyEvent convert(const QKeyEvent &_e);
106  }
107 }
108 #endif
common::KeyEvent convert(const QKeyEvent &_e)
Return the equivalent ignition key event.
Vector3< double > Vector3d
Vector2< double > Vector2d