All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ModelEditorPalette.hh
Go to the documentation of this file.
1 /*
2  * Copyright 2013 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 _MODEL_EDITOR_PALETTE_HH_
19 #define _MODEL_EDITOR_PALETTE_HH_
20 
21 #include <string>
22 
24 #include "gazebo/common/Event.hh"
26 
29 #include "gazebo/gui/qt.h"
30 #include "gazebo/util/system.hh"
31 
32 namespace gazebo
33 {
34  namespace rendering
35  {
36  }
37 
38  namespace gui
39  {
40  class JointMaker;
41  class ModelCreator;
42 
45 
48  class GAZEBO_VISIBLE ModelEditorPalette : public QWidget
49  {
50  Q_OBJECT
51 
54  public: ModelEditorPalette(QWidget *_parent = 0);
55 
57  public: ~ModelEditorPalette();
58 
62  private: bool OnKeyPress(const common::KeyEvent &_event);
63 
67  private slots: void OnItemSelection(QTreeWidgetItem *_item, int _column);
68 
70  private slots: void OnCylinder();
71 
73  private slots: void OnSphere();
74 
76  private slots: void OnBox();
77 
79  private slots: void OnCustom();
80 
82  private slots: void OnFixedJoint();
83 
85  private slots: void OnHingeJoint();
86 
88  private slots: void OnHinge2Joint();
89 
91  private slots: void OnSliderJoint();
92 
94  private slots: void OnScrewJoint();
95 
97  private slots: void OnUniversalJoint();
98 
100  private slots: void OnBallJoint();
101 
103  private slots: void OnJointAdded();
104 
106  private slots: void OnPartAdded();
107 
109  private slots: void OnStatic();
110 
112  private slots: void OnAutoDisable();
113 
115  private slots: void OnSave();
116 
118  private slots: void OnDiscard();
119 
121  private slots: void OnDone();
122 
124  private: QTreeWidget *modelTreeWidget;
125 
127  private: QTreeWidgetItem *modelSettingsItem;
128 
130  private: QTreeWidgetItem *modelItem;
131 
133  private: QTreeWidgetItem *pluginItem;
134 
136  private: QButtonGroup *partJointsButtonGroup;
137 
139  private: ModelCreator *modelCreator;
140 
142  private: QPushButton *saveButton;
143 
145  private: bool saved;
146 
148  private: std::string saveLocation;
149 
151  private: std::string modelName;
152 
154  private: QCheckBox *staticCheck;
155 
158  private: QCheckBox *autoDisableCheck;
159  };
160  }
161 }
162 #endif
A palette of building items which can be added to the editor.
Definition: ModelEditorPalette.hh:48
Generic description of a keyboard event.
Definition: KeyEvent.hh:31
Create and manage 3D visuals of a model with parts and joints.
Definition: ModelCreator.hh:53
#define GAZEBO_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system.hh:48