Go to the documentation of this file.
   30 #include <QApplication> 
   36 #include <OgreSceneManager.h> 
   37 #include <OgreCamera.h> 
   53   , focus_on_mouse_move_(true)
 
   55   , scene_manager_(nullptr)
 
   56   , view_controller_(nullptr)
 
   57   , context_menu_visible_(false)
 
   58   , default_camera_(nullptr)
 
   60   setFocusPolicy(Qt::WheelFocus);
 
   61   setFocus(Qt::OtherFocusReason);
 
   62   setMouseTracking(
true);
 
   85   ss << 
"RenderPanelCamera" << count++;
 
   96   setCursor(Qt::ArrowCursor);
 
  115       setFocus(Qt::MouseFocusReason);
 
  129 #if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0) 
  174   QApplication::postEvent(
this, 
new QContextMenuEvent(QContextMenuEvent::Mouse, QPoint()));
 
  198     context_menu->exec(QCursor::pos());
 
  
boost::mutex context_menu_mutex_
bool focus_on_mouse_move_
a moving the mouse catches keyboard focus
virtual void handleChar(QKeyEvent *event, RenderPanel *panel)=0
Handle a single key event for a given RenderPanel.
void contextMenuEvent(QContextMenuEvent *event) override
boost::shared_ptr< QMenu > context_menu_
void leaveEvent(QEvent *event) override
void setViewController(ViewController *controller)
Set the ViewController which should control the camera position for this view.
bool context_menu_visible_
bool contextMenuVisible()
Ogre::SceneManager * scene_manager_
void initialize(Ogre::SceneManager *scene_manager, DisplayContext *manager)
void activate()
Called by RenderPanel when this view controller is about to be used.
RenderPanel(QWidget *parent=nullptr)
virtual void setStatus(const QString &message)=0
ViewController * view_controller_
int mouse_y_
Y position of the last mouse event.
void wheelEvent(QWheelEvent *event) override
Called when there is a mouse-wheel event.
void showContextMenu(boost::shared_ptr< QMenu > menu)
void keyPressEvent(QKeyEvent *event) override
void setFocusOnMouseMove(bool enabled)
Pure-virtual base class for objects which give Display subclasses context in which to work.
int mouse_x_
X position of the last mouse event.
Ogre::Camera * getCamera() const
DisplayContext * context_
void onRenderWindowMouseEvents(QMouseEvent *event)
Called when any mouse event happens inside the render window.
bool getFocusOnMouseMove() const
void setCamera(Ogre::Camera *camera)
Ogre::Camera * default_camera_
A default camera created in initialize().
void sceneManagerDestroyed(Ogre::SceneManager *source) override
Ogre::Viewport * getViewport() const
virtual void handleMouseEvent(const ViewportMouseEvent &event)=0
Handle a mouse event.
rviz
Author(s): Dave Hershberger, David Gossow, Josh Faust, William Woodall 
autogenerated on Sun May 4 2025 02:31:26