BuildingEditorPalette.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2012-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 _BUILDING_EDITOR_PALETTE_HH_
19 #define _BUILDING_EDITOR_PALETTE_HH_
20 
21 #include <string>
22 
23 #include "gazebo/gui/qt.h"
24 #include "gazebo/util/system.hh"
25 
26 namespace gazebo
27 {
28  namespace gui
29  {
31  class BuildingEditorPalettePrivate;
32 
35 
38  class GZ_GUI_VISIBLE BuildingEditorPalette : public QWidget
39  {
40  Q_OBJECT
41 
44  public: BuildingEditorPalette(QWidget *_parent = 0);
45 
47  public: ~BuildingEditorPalette();
48 
51  public: std::string GetModelName() const;
52 
55  public: QColorDialog *CustomColorDialog() const;
56 
59  private slots: void OnBrush(int _buttonId);
60 
63  private slots: void OnNameChanged(const QString &_name);
64 
67  private slots: void OnCustomColor(const QColor _color);
68 
70  private slots: void CancelDrawModes();
71 
75  private: void OnSaveModel(const std::string &_saveName);
76 
79  private: void OnCreateEditorItem(const std::string &_mode);
80 
82  private: void OnNewModel();
83 
86  private: void mousePressEvent(QMouseEvent *_event);
87 
89  private: void OnDrawWall();
90 
92  private: void OnAddWindow();
93 
95  private: void OnAddDoor();
96 
98  private: void OnAddStair();
99 
102  private: void OnDefaultColor(int _colorId);
103 
105  private: void OnCustomColorDialog();
106 
109  private: void OnColor(QColor _color);
110 
113  private: void OnTexture(int _textureId);
114 
116  private: void OnImportImage();
117 
120  private: BuildingEditorPalettePrivate *dataPtr;
121  };
123  }
124 }
125 
126 #endif
#define GZ_GUI_VISIBLE
Definition: system.hh:284
A palette of building items which can be added to the editor.
Definition: BuildingEditorPalette.hh:38
Definition: BuildingEditorPalettePrivate.hh:33