Ignition Gazebo

API Reference

5.0.0
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 IGNITION_GAZEBO_GUI_GRIDCONFIG_HH_
19 #define IGNITION_GAZEBO_GUI_GRIDCONFIG_HH_
20 
21 #include <memory>
22 
23 #include <ignition/gui/Plugin.hh>
24 #include <ignition/rendering.hh>
25 
26 namespace ignition
27 {
28 namespace gazebo
29 {
30  class GridConfigPrivate;
31 
32  class GridConfig : public ignition::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
void LoadGrid()
Callback to retrieve existing grid or create a new one.
void UpdateHCellCount(int _cellCount)
Callback to update horizontal cell count.
void UpdateGrid()
Update grid.
~GridConfig() override
Destructor.
void SetPose(double _x, double _y, double _z, double _roll, double _pitch, double _yaw)
Callback to update grid pose.
void LoadConfig(const tinyxml2::XMLElement *) override
bool eventFilter(QObject *_obj, QEvent *_event) override
void UpdateVCellCount(int _cellCount)
Callback to update vertical cell count.
Definition: GridConfig.hh:32
void OnShow(bool _checked)
Callback when checkbox is clicked.
This library is part of the Ignition Robotics project.
void UpdateCellLength(double _length)
Callback to update cell length.
void SetColor(double _r, double _g, double _b, double _a)
Callback to update grid color.