Skip to content

Commit

Permalink
cleanup ros-visualization#1433: remove deprecated code
Browse files Browse the repository at this point in the history
  • Loading branch information
rhaschke committed Sep 29, 2019
1 parent e1556fa commit 6a74c4d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 40 deletions.
36 changes: 0 additions & 36 deletions src/rviz/render_panel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ RenderPanel::RenderPanel( QWidget* parent )
, scene_manager_( 0 )
, view_controller_( 0 )
, context_menu_visible_(false)
//TODO(simonschmeisser) remove this in noetic
, fake_mouse_move_event_timer_( new QTimer() )
, default_camera_(0)
{
setFocusPolicy(Qt::WheelFocus);
Expand All @@ -65,8 +63,6 @@ RenderPanel::RenderPanel( QWidget* parent )

RenderPanel::~RenderPanel()
{
//TODO(simonschmeisser) remove this in noetic
delete fake_mouse_move_event_timer_;
if( scene_manager_ && default_camera_ )
{
scene_manager_->destroyCamera( default_camera_ );
Expand Down Expand Up @@ -94,38 +90,6 @@ void RenderPanel::initialize(Ogre::SceneManager* scene_manager, DisplayContext*
setCamera( default_camera_ );
}

//TODO(simonschmeisser) remove this in noetic
void RenderPanel::sendMouseMoveEvent()
{
QPoint cursor_pos = QCursor::pos();
QPoint mouse_rel_widget = mapFromGlobal( cursor_pos );
if( rect().contains( mouse_rel_widget ))
{
bool mouse_over_this = false;
QWidget *w = QApplication::widgetAt( cursor_pos );
while( w )
{
if( w == this )
{
mouse_over_this = true;
break;
}
w = w->parentWidget();
}
if( !mouse_over_this )
{
return;
}

QMouseEvent fake_event( QEvent::MouseMove,
mouse_rel_widget,
Qt::NoButton,
QApplication::mouseButtons(),
QApplication::queryKeyboardModifiers() );
onRenderWindowMouseEvents( &fake_event );
}
}

void RenderPanel::leaveEvent ( QEvent * event )
{
setCursor( Qt::ArrowCursor );
Expand Down
4 changes: 0 additions & 4 deletions src/rviz/render_panel.h
Original file line number Diff line number Diff line change
Expand Up @@ -147,13 +147,9 @@ Q_OBJECT
Display* display_;

private Q_SLOTS:
//TODO(simonschmeisser) remove this in noetic
void sendMouseMoveEvent();
void onContextMenuHide();

private:
//TODO(simonschmeisser) remove this in noetic
QTimer* fake_mouse_move_event_timer_;
Ogre::Camera* default_camera_; ///< A default camera created in initialize().
};

Expand Down

0 comments on commit 6a74c4d

Please sign in to comment.