##

TerrainEditorPalette.hh
Go to the documentation of this file.
/*
* Copyright (C) 2012 Open Source Robotics Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
#ifndef GAZEBO_GUI_TERRAIN_TERRAINEDITORPALETTE_HH_
#define GAZEBO_GUI_TERRAIN_TERRAINEDITORPALETTE_HH_
#include <memory>
#include <string>
#include "gazebo/rendering/RenderTypes.hh"
#include "gazebo/common/Event.hh"
#include "gazebo/common/MouseEvent.hh"
#include "gazebo/gui/qt.h"
#include "gazebo/util/system.hh"
namespace gazebo
{
namespace rendering
{
class Heightmap;
}
namespace gui
{
class TerrainEditorPalettePrivate;
class GZ_GUI_VISIBLE TerrainEditorPalette : public QWidget
{
Q_OBJECT
public: explicit TerrainEditorPalette(QWidget *_parent = 0);
public: ~TerrainEditorPalette();
private: bool OnMousePress(const common::MouseEvent &_event);
private: bool OnMouseMove(const common::MouseEvent &_event);
private: bool Apply(const common::MouseEvent &_event,
rendering::CameraPtr _camera,
rendering::Heightmap *_heightmap) const;
private: void SetState(const std::string &_state);
private slots: void OnRaise(bool _toggle);
private slots: void OnLower(bool _toggle);
private slots: void OnFlatten(bool _toggle);
private slots: void OnPickHeight(bool _toggle);
private slots: void OnSave();
private slots: void OnOutsideRadiusSpin(double _value);
private slots: void OnOutsideRadiusSlider(int _value);
private slots: void OnInsideRadiusSpin(double _value);
private slots: void OnInsideRadiusSlider(int _value);
private slots: void OnWeightSpin(double _value);
private slots: void OnWeightSlider(int _value);
private slots: void OnHeightSpin(double _value);
private slots: void OnHeightSlider(int _value);
private: std::unique_ptr<TerrainEditorPalettePrivate> dataPtr;
};
}
}
#endif
gazebo
Forward declarations for the common classes.
Definition: Animation.hh:26
qt.h
gazebo::rendering::Heightmap
Rendering a terrain using heightmap information.
Definition: Heightmap.hh:62
system.hh
RenderTypes.hh
rendering
rendering
Definition: RenderEngine.hh:31
gazebo::gui::TerrainEditorPalette::TerrainEditorPalette
TerrainEditorPalette(QWidget *_parent=0)
Constructor.
gazebo::gui::TerrainEditorPalette::~TerrainEditorPalette
~TerrainEditorPalette()
Destructor.
gui
gui
Definition: KeyEventHandler.hh:29
Event.hh
gazebo::rendering::CameraPtr
boost::shared_ptr< Camera > CameraPtr
Definition: RenderTypes.hh:90
gazebo::gui::TerrainEditorPalette
A palette of building items which can be added to the editor.
Definition: TerrainEditorPalette.hh:45
MouseEvent.hh
gazebo::common::MouseEvent
Generic description of a mouse event.
Definition: MouseEvent.hh:35