##

ModelEditor.hh
Go to the documentation of this file.
/*
* Copyright (C) 2014 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_MODELEDITOR_HH_
#define GAZEBO_GUI_MODEL_MODELEDITOR_HH_
#include <memory>
#include <string>
#include <sdf/sdf.hh>
#include "gazebo/gui/qt.h"
#include "gazebo/gui/Editor.hh"
#include "gazebo/util/system.hh"
namespace gazebo
{
namespace gui
{
class TopToolbar;
class ModelEditorPrivate;
class GZ_GUI_VISIBLE ModelEditor : public Editor
{
Q_OBJECT
public: explicit ModelEditor(MainWindow *_mainWindow);
public: virtual ~ModelEditor();
public: void AddItemToPalette(QWidget *_item,
const std::string &_category = "");
public: void AddEntity(sdf::ElementPtr _sdf);
private slots: void Save();
private slots: void SaveAs();
private slots: void New();
private slots: void Exit();
private slots: void OnEdit(bool _checked);
private slots: void OnAddSelectedJoint();
private slots: void OnAddJoint(const QString &_type);
private slots: void OnJointAdded();
private slots: void OnSchematicView(bool _show);
private: void OnFinish();
private: void ToggleMaterialScheme();
private: void ToggleToolbar();
private: void ToggleInsertWidget();
private: void CreateMenus();
private: void OnCreateEntity(const std::string &_type,
const std::string &_data);
private: std::unique_ptr<ModelEditorPrivate> dataPtr;
};
}
}
#endif
gazebo
Forward declarations for the common classes.
Definition: Animation.hh:26
qt.h
system.hh
gazebo::gui::ModelEditor
Interface to the terrain editor.
Definition: ModelEditor.hh:38
gazebo::gui::Editor
Base class for editors, such as BuildingEditor and TerrainEditor.
Definition: Editor.hh:35
gazebo::gui::ModelEditor::ModelEditor
ModelEditor(MainWindow *_mainWindow)
Constuctor.
gazebo::gui::ModelEditor::~ModelEditor
virtual ~ModelEditor()
Destuctor.
gazebo::gui::ModelEditor::AddEntity
void AddEntity(sdf::ElementPtr _sdf)
Add an entity to the editor.
gui
gui
Definition: KeyEventHandler.hh:29
gazebo::gui::MainWindow
Definition: MainWindow.hh:43
gazebo::gui::ModelEditor::AddItemToPalette
void AddItemToPalette(QWidget *_item, const std::string &_category="")
Add an item to palette.
Editor.hh