Gazebo Gui
API Reference
7.2.2
insert_drive_file
Tutorials
library_books
Classes
toc
Namespaces
insert_drive_file
Files
launch
Gazebo Website
Index
List
Hierarchy
Members: All
Members: Functions
Members: Variables
Members: Typedefs
Members: Enumerations
Members: Enumerator
List
Members
Functions
Typedefs
Variables
Enumerations
Enumerator
src
gz-gui
src
plugins
grid_config
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_GUI_GRIDCONFIG_HH_
19
#define GZ_GUI_GRIDCONFIG_HH_
20
21
#include <memory>
22
23
#include <
gz/gui/Plugin.hh
>
24
25
namespace
gz::gui
26
{
27
class
GridConfigPrivate;
28
45
class
GridConfig
:
public
gz::gui::Plugin
46
{
47
Q_OBJECT
48
50
Q_PROPERTY(
51
QStringList
nameList
52
READ
NameList
53
WRITE
SetNameList
54
NOTIFY
NameListChanged
55
)
56
57
58
public:
GridConfig
();
59
61
public: ~
GridConfig
() override;
62
63
// Documentation inherited
64
public:
void
LoadConfig
(const
tinyxml2
::XMLElement *) override;
65
66
// Documentation inherited
67
protected:
bool
eventFilter
(
QObject
*_obj,
QEvent
*_event) override;
68
70
public:
void
CreateGrids
();
71
73
public:
void
UpdateGrid
();
74
76
public:
void
ConnectToGrid
();
77
79
public:
void
RefreshList
();
80
82
public slots:
void
OnRefresh
();
83
86
public slots:
void
OnName
(const
QString
&_name);
87
90
public slots:
QStringList
NameList
() const;
91
94
public slots:
void
SetNameList
(const
QStringList
&_nameList);
95
97
signals:
void
NameListChanged
();
98
101
public slots:
void
UpdateVCellCount
(
int
_cellCount);
102
105
public slots:
void
UpdateHCellCount
(
int
_cellCount);
106
109
public slots:
void
UpdateCellLength
(
double
_length);
110
114
public slots:
void
SetPose
(
double
_x,
double
_y,
double
_z,
115
double
_roll,
double
_pitch,
double
_yaw);
116
119
public slots:
void
SetColor
(
double
_r,
double
_g,
double
_b,
double
_a);
120
123
public slots:
void
OnShow
(
bool
_checked);
124
132
signals:
void
newParams
(
133
int
_hCellCount,
134
int
_vCellCount,
135
double
_cellLength,
136
QVector3D
_pos,
137
QVector3D
_rot,
138
QColor
_color);
139
142
private:
std
::unique_ptr<GridConfigPrivate> dataPtr;
143
};
144
}
// namespace gz::gui
145
146
#endif // GZ_GUI_GRIDCONFIG_HH_