Gazebo Gui
API Reference
10.0.0~pre1
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
#include <gz/utils/ImplPtr.hh>
26
27
namespace
gz::gui::plugins
28
{
29
class
GridConfigPrivate;
30
47
class
GridConfig
:
public
gz::gui::Plugin
48
{
49
Q_OBJECT
50
52
Q_PROPERTY(
53
QStringList
nameList
54
READ NameList
55
WRITE SetNameList
56
NOTIFY NameListChanged
57
)
58
59
60
Q_PROPERTY(
61
QList
<
double
> gridPose
62
READ GridPose
63
WRITE SetGridPose
64
NOTIFY GridPoseChanged
65
)
66
68
public:
GridConfig
();
69
71
public: ~
GridConfig
() override;
72
73
// Documentation inherited
74
public:
void
LoadConfig(const
tinyxml2
::XMLElement *) override;
75
76
// Documentation inherited
77
protected:
bool
eventFilter(
QObject
*_obj,
QEvent
*_event) override;
78
80
public:
void
CreateGrids();
81
83
public:
void
UpdateGrid();
84
86
public:
void
ConnectToGrid();
87
89
public:
void
RefreshList();
90
92
public: Q_INVOKABLE
QList
<
double
> GridPose() const;
93
97
public slots:
void
SetGridPose(const
QList
<
double
> &_gridPose);
98
100
signals:
void
GridPoseChanged();
101
103
public slots:
void
OnRefresh();
104
107
public slots:
void
OnName(const
QString
&_name);
108
111
public slots:
QStringList
NameList() const;
112
115
public slots:
void
SetNameList(const
QStringList
&_nameList);
116
118
signals:
void
NameListChanged();
119
122
public slots:
void
UpdateVCellCount(
int
_cellCount);
123
126
public slots:
void
UpdateHCellCount(
int
_cellCount);
127
130
public slots:
void
UpdateCellLength(
double
_length);
131
134
public slots:
void
SetColor(
double
_r,
double
_g,
double
_b,
double
_a);
135
138
public slots:
void
OnShow(
bool
_checked);
139
145
signals:
void
newParams(
146
int
_hCellCount,
147
int
_vCellCount,
148
double
_cellLength,
149
QColor
_color);
150
153
private: GZ_UTILS_UNIQUE_IMPL_PTR(dataPtr)
154
};
155
}
// namespace gz::gui::plugins
156
#endif
// GZ_GUI_PLUGINS_GRIDCONFIG_HH_