isis/src/qisis/objs/PlotWindow/PlotWindow.cpp
bool PlotWindow::eventFilter(QObject *o, QEvent *e) {
    bool blockWidgetFromEvent = false;

    switch (e->type()) {
      case QEvent::MouseButtonPress:
        if (o == this &&
            childAt(((QMouseEvent *)e)->pos()) != plot()->canvas()) {
          mousePressEvent(o, (QMouseEvent *)e);
          blockWidgetFromEvent = true;
        }
        break;

      default:
        break;
    }

    bool stopHandlingEvent = false;
    if (!blockWidgetFromEvent && o == this) {
      stopHandlingEvent = MainWindow::eventFilter(o, e);

      if (e->type() == QEvent::Close && !stopHandlingEvent) {
        emit closed();
      }
    }

    return stopHandlingEvent || blockWidgetFromEvent;
  }
/**
   * This method filters the events of the objects it is connected
   * to.  In this case, the eventFilter has been installed on the m_plot and
   * m_legend.
   * @param o
   * @param e
   *
   * @return bool
   */
This method filters the events of the objects it is connected
to.  In this case, the eventFilter has been installed on the m_plot and
m_legend.
@param o
@param e

@return bool
This method filters the events of the objects it is connected to . In this case the eventFilter has been installed on the m_plot and m_legend . @param o @param e @return bool
bool PlotWindow::eventFilter(QObject *o, QEvent *e) {
    bool blockWidgetFromEvent = false;
    switch (e->type()) {
      case QEvent::MouseButtonPress:
        if (o == this &&
            childAt(((QMouseEvent *)e)->pos()) != plot()->canvas()) {
          mousePressEvent(o, (QMouseEvent *)e);
          blockWidgetFromEvent = true;
        }
        break;
      default:
        break;
    }
    bool stopHandlingEvent = false;
    if (!blockWidgetFromEvent && o == this) {
      stopHandlingEvent = MainWindow::eventFilter(o, e);
      if (e->type() == QEvent::Close && !stopHandlingEvent) {
        emit closed();
      }
    }
    return stopHandlingEvent || blockWidgetFromEvent;
  }
bool PlotWindow :: eventFilter ( QObject * o , QEvent * e ) { bool blockWidgetFromEvent = false ; switch ( e -> type ( ) ) { case QEvent :: MouseButtonPress : if ( o == this && childAt ( ( ( QMouseEvent * ) e ) -> pos ( ) ) != plot ( ) -> canvas ( ) ) { mousePressEvent ( o , ( QMouseEvent * ) e ) ; blockWidgetFromEvent = true ; } break ; default : break ; } bool stopHandlingEvent = false ; if ( ! blockWidgetFromEvent && o == this ) { stopHandlingEvent = MainWindow :: eventFilter ( o , e ) ; if ( e -> type ( ) == QEvent :: Close && ! stopHandlingEvent ) { emit closed ( ) ; } } return stopHandlingEvent || blockWidgetFromEvent ; }
This method filters the events of the objects it is connected
 to.
This method filters the events of the objects it is connected to .