BuildingEditorPalette.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2012 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 #ifndef GAZEBO_GUI_BUILDING_BUILDINGEDITORPALETTE_HH_
18 #define GAZEBO_GUI_BUILDING_BUILDINGEDITORPALETTE_HH_
19 
20 #include <string>
21 
22 #include "gazebo/gui/qt.h"
23 #include "gazebo/util/system.hh"
24 
25 namespace gazebo
26 {
27  namespace gui
28  {
30  class BuildingEditorPalettePrivate;
31 
34 
37  class GZ_GUI_VISIBLE BuildingEditorPalette : public QWidget
38  {
39  Q_OBJECT
40 
43  public: explicit BuildingEditorPalette(QWidget *_parent = 0);
44 
46  public: ~BuildingEditorPalette();
47 
50  public: std::string GetModelName() const;
51 
54  public: QColorDialog *CustomColorDialog() const;
55 
58  private slots: void OnBrush(int _buttonId);
59 
62  private slots: void OnNameChanged(const QString &_name);
63 
66  private slots: void OnCustomColor(const QColor _color);
67 
69  private slots: void CancelDrawModes();
70 
74  private: void OnSaveModel(const std::string &_saveName);
75 
78  private: void OnCreateEditorItem(const std::string &_mode);
79 
81  private: void OnNewModel();
82 
85  private: void mousePressEvent(QMouseEvent *_event);
86 
88  private: void OnDrawWall();
89 
91  private: void OnAddWindow();
92 
94  private: void OnAddDoor();
95 
97  private: void OnAddStair();
98 
101  private: void OnDefaultColor(int _colorId);
102 
104  private: void OnCustomColorDialog();
105 
108  private: void OnColor(QColor _color);
109 
112  private: void OnTexture(int _textureId);
113 
115  private: void OnImportImage();
116 
119  private: BuildingEditorPalettePrivate *dataPtr;
120  };
122  }
123 }
124 
125 #endif
A palette of building items which can be added to the editor.
Definition: BuildingEditorPalette.hh:37