Gazebo Gazebo

API Reference

3.15.2
GridConfig.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 GZ_GAZEBO_GUI_GRIDCONFIG_HH_
19 #define GZ_GAZEBO_GUI_GRIDCONFIG_HH_
20 
21 #include <memory>
22 
23 #include <gz/gui/Plugin.hh>
24 #include <gz/rendering.hh>
25 
26 namespace ignition
27 {
28 namespace gazebo
29 {
30  class GridConfigPrivate;
31 
32  class GridConfig : public gz::gui::Plugin
33  {
34  Q_OBJECT
35 
37  public: GridConfig();
38 
40  public: ~GridConfig() override;
41 
42  // Documentation inherited
43  public: void LoadConfig(const tinyxml2::XMLElement *) override;
44 
45  // Documentation inherited
46  protected: bool eventFilter(QObject *_obj, QEvent *_event) override;
47 
49  public: void UpdateGrid();
50 
53  public: void LoadGrid();
54 
57  public slots: void UpdateVCellCount(int _cellCount);
58 
61  public slots: void UpdateHCellCount(int _cellCount);
62 
65  public slots: void UpdateCellLength(double _length);
66 
70  public slots: void SetPose(double _x, double _y, double _z,
71  double _roll, double _pitch, double _yaw);
72 
75  public slots: void SetColor(double _r, double _g, double _b, double _a);
76 
79  public slots: void OnShow(bool _checked);
80 
83  private: std::unique_ptr<GridConfigPrivate> dataPtr;
84  };
85 }
86 }
87 
88 #endif
This library is part of the Ignition Robotics project.
Definition: GridConfig.hh:32
void LoadGrid()
Callback to retrieve existing grid or create a new one.
void UpdateCellLength(double _length)
Callback to update cell length.
void LoadConfig(const tinyxml2::XMLElement *) override
void SetColor(double _r, double _g, double _b, double _a)
Callback to update grid color.
void UpdateGrid()
Update grid.
void UpdateVCellCount(int _cellCount)
Callback to update vertical cell count.
~GridConfig() override
Destructor.
void OnShow(bool _checked)
Callback when checkbox is clicked.
void SetPose(double _x, double _y, double _z, double _roll, double _pitch, double _yaw)
Callback to update grid pose.
void UpdateHCellCount(int _cellCount)
Callback to update horizontal cell count.
bool eventFilter(QObject *_obj, QEvent *_event) override