Ignition Gazebo

API Reference

5.0.0
ViewAngle.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 
18 #ifndef IGNITION_GAZEBO_GUI_VIEWANGLE_HH_
19 #define IGNITION_GAZEBO_GUI_VIEWANGLE_HH_
20 
21 #include <ignition/msgs/pose.pb.h>
22 
23 #include <memory>
24 
25 #include <ignition/gui/Plugin.hh>
26 
27 namespace ignition
28 {
29 namespace gazebo
30 {
31  class ViewAnglePrivate;
32 
37  class ViewAngle : public ignition::gui::Plugin
38  {
39  Q_OBJECT
40 
42  Q_PROPERTY(
43  QList<double> camPose
44  READ CamPose
45  NOTIFY CamPoseChanged
46  )
47 
48 
49  public: ViewAngle();
50 
52  public: ~ViewAngle() override;
53 
54  // Documentation inherited
55  public: void LoadConfig(const tinyxml2::XMLElement *_pluginElem) override;
56 
64  public slots: void OnAngleMode(int _x, int _y, int _z);
65 
67  public: Q_INVOKABLE QList<double> CamPose() const;
68 
70  signals: void CamPoseChanged();
71 
75  public slots: void SetCamPose(double _x, double _y, double _z,
76  double _roll, double _pitch, double _yaw);
77 
80  public: void CamPoseCb(const msgs::Pose &_msg);
81 
84  private: std::unique_ptr<ViewAnglePrivate> dataPtr;
85  };
86 }
87 }
88 
89 #endif
Q_INVOKABLE QList< double > CamPose() const
Get the current gui camera pose.
QList< double > camPose
gui camera pose (QList order is x, y, z, roll, pitch, yaw)
Definition: ViewAngle.hh:46
void LoadConfig(const tinyxml2::XMLElement *_pluginElem) override
STL namespace.
void SetCamPose(double _x, double _y, double _z, double _roll, double _pitch, double _yaw)
Callback to update gui camera pose.
void CamPoseCb(const msgs::Pose &_msg)
Callback for retrieving gui camera pose.
void OnAngleMode(int _x, int _y, int _z)
Callback in Qt thread when angle mode changes.
Component< ignition::math::Pose3d, class PoseTag > Pose
A component type that contains pose, ignition::math::Pose3d, information.
Definition: Pose.hh:35
This library is part of the Ignition Robotics project.