##

ModelEditorPalette.hh
Go to the documentation of this file.
/*
* Copyright (C) 2013 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_MODEL_MODELEDITORPALETTE_HH_
#define GAZEBO_GUI_MODEL_MODELEDITORPALETTE_HH_
#include <memory>
#include <string>
#include "gazebo/gui/qt.h"
#include "gazebo/gui/model/ModelCreator.hh"
#include "gazebo/util/system.hh"
namespace gazebo
{
namespace common
{
class KeyEvent;
}
namespace gui
{
// Forward declare private data.
class ModelEditorPalettePrivate;
class GZ_GUI_VISIBLE ModelEditorPalette : public QWidget
{
Q_OBJECT
public: explicit ModelEditorPalette(QWidget *_parent = 0);
public: ~ModelEditorPalette();
public: void AddItem(QWidget *_item,
const std::string &_category = "Other");
public: void InsertWidget(const unsigned int _index, QWidget *_widget);
public: void RemoveWidget(QWidget *_widget);
public: void CreateJoint(const std::string &_type);
public: gui::ModelCreator *ModelCreator();
private: bool OnKeyPress(const common::KeyEvent &_event);
private slots: void OnCylinder();
private slots: void OnSphere();
private slots: void OnBox();
private slots: void OnCustom();
private slots: void OnLinkAdded();
private: std::unique_ptr<ModelEditorPalettePrivate> dataPtr;
};
}
}
#endif
gazebo
Forward declarations for the common classes.
Definition: Animation.hh:26
qt.h
gazebo::gui::ModelCreator
Create and manage 3D visuals of a model with links, nested models and joints.
Definition: ModelCreator.hh:60
gazebo::gui::ModelEditorPalette::AddItem
void AddItem(QWidget *_item, const std::string &_category="Other")
Add an item to the model editor palette.
common
common
Definition: FuelModelDatabase.hh:37
gazebo::gui::ModelEditorPalette::CreateJoint
void CreateJoint(const std::string &_type)
Add a joint to the model.
system.hh
ModelCreator.hh
gazebo::gui::ModelEditorPalette::ModelEditorPalette
ModelEditorPalette(QWidget *_parent=0)
Constructor.
gazebo::gui::ModelEditorPalette::ModelCreator
gui::ModelCreator * ModelCreator()
Get the model creator.
gazebo::common::KeyEvent
Generic description of a keyboard event.
Definition: KeyEvent.hh:32
gazebo::gui::ModelEditorPalette::~ModelEditorPalette
~ModelEditorPalette()
Destructor.
gui
gui
Definition: KeyEventHandler.hh:29
gazebo::gui::ModelEditorPalette::InsertWidget
void InsertWidget(const unsigned int _index, QWidget *_widget)
Add a widget inside the model editor palette widget.
gazebo::gui::ModelEditorPalette
A palette of model items which can be added to the editor.
Definition: ModelEditorPalette.hh:46
gazebo::gui::ModelEditorPalette::RemoveWidget
void RemoveWidget(QWidget *_widget)
Remove a widget from the model editor palette widget.