LinkInspector.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015-2016 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 _GAZEBO_GUI_LINK_INSPECTOR_HH_
19 #define _GAZEBO_GUI_LINK_INSPECTOR_HH_
20 
21 #include <memory>
22 #include <string>
23 
24 #include "gazebo/gui/qt.h"
25 #include "gazebo/util/system.hh"
26 
27 namespace gazebo
28 {
29  namespace gui
30  {
31  class CollisionConfig;
32  class LinkConfig;
33  class VisualConfig;
34 
35  // Forward declare private data.
36  class LinkInspectorPrivate;
37 
38  class GZ_GUI_VISIBLE LinkInspector : public QDialog
39  {
40  Q_OBJECT
41 
44  public: LinkInspector(QWidget *_parent = 0);
45 
47  public: ~LinkInspector();
48 
51  public: void SetName(const std::string &_name);
52 
55  public: std::string Name() const;
56 
59  public: LinkConfig *GetLinkConfig() const;
60 
63  public: VisualConfig *GetVisualConfig() const;
64 
67  public: CollisionConfig *GetCollisionConfig() const;
68 
71  public: void SetLinkId(const std::string &_id);
72 
74  public: void Open();
75 
78  protected: virtual void enterEvent(QEvent *_event);
79 
82  // public: void SetName(const std::string &_name);
83 
85  Q_SIGNALS: void Opened();
86 
88  Q_SIGNALS: void Applied();
89 
92  Q_SIGNALS: void Accepted();
93 
95  private slots: void OnRemove();
96 
98  private slots: void OnCancel();
99 
101  private slots: void OnOK();
102 
104  private slots: void OnConfigApplied();
105 
107  private slots: void RestoreOriginalData();
108 
111  private: void keyPressEvent(QKeyEvent *_event);
112 
115  private: std::unique_ptr<LinkInspectorPrivate> dataPtr;
116  };
118  }
119 }
120 
121 #endif
Definition: LinkInspector.hh:38
Forward declarations for the common classes.
Definition: Animation.hh:33
A tab for configuring visual properties of a link.
Definition: VisualConfig.hh:68
A tab for configuring properties of a link.
Definition: LinkConfig.hh:39
A tab for configuring collision properties of a link.
Definition: CollisionConfig.hh:68