##

RotateHandle.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_BUILDING_ROTATEHANDLE_HH_
#define GAZEBO_GUI_BUILDING_ROTATEHANDLE_HH_
#include <memory>
#include "gazebo/gui/qt.h"
#include "gazebo/util/system.hh"
namespace gazebo
{
namespace gui
{
// Forward declare private data.
class RotateHandlePrivate;
class GZ_GUI_VISIBLE RotateHandle : public QGraphicsItem
{
public: explicit RotateHandle(QGraphicsItem *_parent = 0);
public: ~RotateHandle();
public: void SetMouseState(const int _state);
public: int MouseState() const;
public: double MouseDownX() const;
public: double MouseDownY() const;
public: void SetMouseDownX(const double _x);
public: void SetMouseDownY(const double _y);
protected: void hoverEnterEvent(QGraphicsSceneHoverEvent *_event);
protected: void hoverLeaveEvent(QGraphicsSceneHoverEvent *_event);
protected: void mouseMoveEvent(QGraphicsSceneMouseEvent *_event);
protected: void mousePressEvent(QGraphicsSceneMouseEvent *_event);
protected: void mouseReleaseEvent(QGraphicsSceneMouseEvent *_event);
public: virtual QRectF boundingRect() const;
private: void paint(QPainter *_painter,
const QStyleOptionGraphicsItem *_option, QWidget *_widget);
private: std::unique_ptr<RotateHandlePrivate> dataPtr;
};
}
}
#endif
gazebo
Forward declarations for the common classes.
Definition: Animation.hh:26
qt.h
system.hh
gazebo::gui::RotateHandle::mousePressEvent
void mousePressEvent(QGraphicsSceneMouseEvent *_event)
Qt mouse press event.
gazebo::gui::RotateHandle::mouseReleaseEvent
void mouseReleaseEvent(QGraphicsSceneMouseEvent *_event)
Qt mouse release event.
gazebo::gui::RotateHandle::SetMouseDownY
void SetMouseDownY(const double _y)
Set the Y position of the mouse press.
gazebo::gui::RotateHandle::mouseMoveEvent
void mouseMoveEvent(QGraphicsSceneMouseEvent *_event)
Qt mouse move event.
gazebo::gui::RotateHandle::RotateHandle
RotateHandle(QGraphicsItem *_parent=0)
Constructor param[in] _parent Parent graphics item.
gazebo::gui::RotateHandle::SetMouseDownX
void SetMouseDownX(const double _x)
Set the X position of the mouse press.
gazebo::gui::RotateHandle::MouseDownY
double MouseDownY() const
Get the Y position of the mouse press.
gazebo::gui::RotateHandle::SetMouseState
void SetMouseState(const int _state)
Set the current mouse state.
gazebo::gui::RotateHandle::MouseState
int MouseState() const
Get the current mouse state.
gazebo::gui::RotateHandle::MouseDownX
double MouseDownX() const
Get the X position of the mouse press.
gazebo::gui::RotateHandle
Handle for rotating an editor item.
Definition: RotateHandle.hh:37
gui
gui
Definition: KeyEventHandler.hh:29
gazebo::gui::RotateHandle::hoverLeaveEvent
void hoverLeaveEvent(QGraphicsSceneHoverEvent *_event)
Qt mouse hover leave event.
gazebo::gui::RotateHandle::hoverEnterEvent
void hoverEnterEvent(QGraphicsSceneHoverEvent *_event)
Qt mouse hover enter event.
gazebo::gui::RotateHandle::boundingRect
virtual QRectF boundingRect() const
Get the bounding box of the rotate handle.
gazebo::gui::RotateHandle::~RotateHandle
~RotateHandle()
Destructor.