##

AlignWidget.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_ALIGNWIDGET_HH_
#define GAZEBO_GUI_ALIGNWIDGET_HH_
#include <string>
#include "gazebo/gui/qt.h"
#include "gazebo/util/system.hh"
namespace gazebo
{
namespace gui
{
class AlignWidgetPrivate;
class GZ_GUI_VISIBLE AlignWidget : public QWidget
{
Q_OBJECT
public: enum AlignAxis
{
ALIGN_X,
ALIGN_Y,
ALIGN_Z
};
public: enum AlignConfig
{
ALIGN_MIN,
ALIGN_CENTER,
ALIGN_MAX
};
public: explicit AlignWidget(QWidget *_parent = 0);
public: virtual ~AlignWidget();
public: void Add(AlignAxis _axis, AlignConfig _config, QAction *_action);
private slots: void OnAlignMode(QString _mode);
private slots: void OnAlignTargetChanged(int _index);
private slots: void OnDirectionChanged(bool _checked);
private: std::string GetAxisAsString(AlignAxis _axis);
private: std::string GetConfigAsString(AlignConfig _config);
private: bool eventFilter(QObject *_obj, QEvent *_event);
private: AlignWidgetPrivate *dataPtr;
};
}
}
#endif
gazebo::gui::AlignWidget::ALIGN_MIN
minimum
Definition: AlignWidget.hh:50
gazebo
Forward declarations for the common classes.
Definition: Animation.hh:26
qt.h
gazebo::gui::AlignWidget::AlignConfig
AlignConfig
Definition: AlignWidget.hh:47
system.hh
gazebo::gui::AlignWidget::ALIGN_X
X.
Definition: AlignWidget.hh:40
gazebo::gui::AlignWidget::ALIGN_CENTER
center
Definition: AlignWidget.hh:52
gazebo::gui::AlignWidget::ALIGN_Z
Z.
Definition: AlignWidget.hh:44
gazebo::gui::AlignWidget::AlignAxis
AlignAxis
Definition: AlignWidget.hh:37
gazebo::gui::AlignWidget
A gui widget for aligning models.
Definition: AlignWidget.hh:33
gazebo::gui::AlignWidget::~AlignWidget
virtual ~AlignWidget()
Destructor.
gui
gui
Definition: KeyEventHandler.hh:29
gazebo::gui::AlignWidget::ALIGN_Y
Y.
Definition: AlignWidget.hh:42
gazebo::gui::AlignWidget::Add
void Add(AlignAxis _axis, AlignConfig _config, QAction *_action)
Add a Qt alignment action to the widget.
gazebo::gui::AlignWidget::AlignWidget
AlignWidget(QWidget *_parent=0)
Constructor.
gazebo::gui::AlignWidget::ALIGN_MAX
maximum
Definition: AlignWidget.hh:54