#include <render_panel.h>
Public Member Functions | |
bool | contextMenuVisible () |
DisplayContext * | getManager () |
ViewController * | getViewController () |
void | initialize (Ogre::SceneManager *scene_manager, DisplayContext *manager) |
RenderPanel (QWidget *parent=0) | |
virtual void | sceneManagerDestroyed (Ogre::SceneManager *source) |
void | setViewController (ViewController *controller) |
Set the ViewController which should control the camera position for this view. | |
void | showContextMenu (boost::shared_ptr< QMenu > menu) |
virtual | ~RenderPanel () |
Protected Member Functions | |
void | contextMenuEvent (QContextMenuEvent *event) |
virtual void | keyPressEvent (QKeyEvent *event) |
virtual void | leaveEvent (QEvent *event) |
virtual void | mouseDoubleClickEvent (QMouseEvent *event) |
virtual void | mouseMoveEvent (QMouseEvent *event) |
virtual void | mousePressEvent (QMouseEvent *event) |
virtual void | mouseReleaseEvent (QMouseEvent *event) |
void | onRenderWindowMouseEvents (QMouseEvent *event) |
Called when any mouse event happens inside the render window. | |
virtual void | wheelEvent (QWheelEvent *event) |
Called when there is a mouse-wheel event. | |
Protected Attributes | |
DisplayContext * | context_ |
boost::shared_ptr< QMenu > | context_menu_ |
boost::mutex | context_menu_mutex_ |
bool | context_menu_visible_ |
Display * | display_ |
int | mouse_x_ |
X position of the last mouse event. | |
int | mouse_y_ |
Y position of the last mouse event. | |
Ogre::SceneManager * | scene_manager_ |
ViewController * | view_controller_ |
Private Slots | |
void | onContextMenuHide () |
void | sendMouseMoveEvent () |
Private Attributes | |
Ogre::Camera * | default_camera_ |
A default camera created in initialize(). | |
QTimer * | fake_mouse_move_event_timer_ |
A widget which shows an OGRE-rendered scene in RViz.
RenderPanel displays a scene and forwards mouse and key events to the DisplayContext (which further forwards them to the active Tool, etc.)
Definition at line 73 of file render_panel.h.
rviz::RenderPanel::RenderPanel | ( | QWidget * | parent = 0 | ) |
Constructor. Ogre::Root::createRenderWindow() is called within.
Definition at line 48 of file render_panel.cpp.
rviz::RenderPanel::~RenderPanel | ( | ) | [virtual] |
Definition at line 62 of file render_panel.cpp.
void rviz::RenderPanel::contextMenuEvent | ( | QContextMenuEvent * | event | ) | [protected] |
Definition at line 209 of file render_panel.cpp.
Return true if the context menu for this panel is visible
Definition at line 204 of file render_panel.cpp.
DisplayContext* rviz::RenderPanel::getManager | ( | ) | [inline] |
Definition at line 84 of file render_panel.h.
ViewController* rviz::RenderPanel::getViewController | ( | ) | [inline] |
Definition at line 86 of file render_panel.h.
void rviz::RenderPanel::initialize | ( | Ogre::SceneManager * | scene_manager, |
DisplayContext * | manager | ||
) |
This sets up the Ogre::Camera for this widget.
Definition at line 71 of file render_panel.cpp.
void rviz::RenderPanel::keyPressEvent | ( | QKeyEvent * | event | ) | [protected, virtual] |
Definition at line 166 of file render_panel.cpp.
void rviz::RenderPanel::leaveEvent | ( | QEvent * | event | ) | [protected, virtual] |
Definition at line 121 of file render_panel.cpp.
virtual void rviz::RenderPanel::mouseDoubleClickEvent | ( | QMouseEvent * | event | ) | [inline, protected, virtual] |
Definition at line 113 of file render_panel.h.
virtual void rviz::RenderPanel::mouseMoveEvent | ( | QMouseEvent * | event | ) | [inline, protected, virtual] |
Definition at line 110 of file render_panel.h.
virtual void rviz::RenderPanel::mousePressEvent | ( | QMouseEvent * | event | ) | [inline, protected, virtual] |
Definition at line 111 of file render_panel.h.
virtual void rviz::RenderPanel::mouseReleaseEvent | ( | QMouseEvent * | event | ) | [inline, protected, virtual] |
Definition at line 112 of file render_panel.h.
void rviz::RenderPanel::onContextMenuHide | ( | ) | [private, slot] |
Definition at line 198 of file render_panel.cpp.
void rviz::RenderPanel::onRenderWindowMouseEvents | ( | QMouseEvent * | event | ) | [protected] |
Called when any mouse event happens inside the render window.
Definition at line 130 of file render_panel.cpp.
void rviz::RenderPanel::sceneManagerDestroyed | ( | Ogre::SceneManager * | source | ) | [virtual] |
Definition at line 224 of file render_panel.cpp.
void rviz::RenderPanel::sendMouseMoveEvent | ( | ) | [private, slot] |
Definition at line 91 of file render_panel.cpp.
void rviz::RenderPanel::setViewController | ( | ViewController * | controller | ) |
Set the ViewController which should control the camera position for this view.
Definition at line 174 of file render_panel.cpp.
void rviz::RenderPanel::showContextMenu | ( | boost::shared_ptr< QMenu > | menu | ) |
Show the given menu as a context menu, positioned based on the current mouse position. This can be called from any thread.
Definition at line 189 of file render_panel.cpp.
void rviz::RenderPanel::wheelEvent | ( | QWheelEvent * | event | ) | [protected, virtual] |
Called when there is a mouse-wheel event.
Definition at line 148 of file render_panel.cpp.
DisplayContext* rviz::RenderPanel::context_ [protected] |
Definition at line 126 of file render_panel.h.
boost::shared_ptr<QMenu> rviz::RenderPanel::context_menu_ [protected] |
Definition at line 131 of file render_panel.h.
boost::mutex rviz::RenderPanel::context_menu_mutex_ [protected] |
Definition at line 132 of file render_panel.h.
bool rviz::RenderPanel::context_menu_visible_ [protected] |
Definition at line 134 of file render_panel.h.
Ogre::Camera* rviz::RenderPanel::default_camera_ [private] |
A default camera created in initialize().
Definition at line 146 of file render_panel.h.
Display* rviz::RenderPanel::display_ [protected] |
Definition at line 138 of file render_panel.h.
QTimer* rviz::RenderPanel::fake_mouse_move_event_timer_ [private] |
Definition at line 145 of file render_panel.h.
int rviz::RenderPanel::mouse_x_ [protected] |
X position of the last mouse event.
Definition at line 123 of file render_panel.h.
int rviz::RenderPanel::mouse_y_ [protected] |
Y position of the last mouse event.
Definition at line 124 of file render_panel.h.
Ogre::SceneManager* rviz::RenderPanel::scene_manager_ [protected] |
Definition at line 127 of file render_panel.h.
ViewController* rviz::RenderPanel::view_controller_ [protected] |
Definition at line 129 of file render_panel.h.