isis/src/qisis/objs/PlotWindow/PlotWindow.cpp
void PlotWindow::mousePressEvent(QObject *object, QMouseEvent *event) {
    if (qobject_cast<QWidget *>(object) &&
        event->button() == Qt::RightButton &&
        userCanAddCurve(QApplication::clipboard()->mimeData())) {
      QMenu contextMenu;

      QAction *pasteAct = new QAction(QIcon::fromTheme("edit-paste"), "Paste",
                                      this);
      contextMenu.addAction(pasteAct);

      QAction *chosenAct = contextMenu.exec(
          qobject_cast<QWidget *>(object)->mapToGlobal(event->pos()));

      if (chosenAct == pasteAct) {
        pasteCurve();
      }
    }
  }
/**
   * This is a helper method for the eventFilter() method. When a mouse press
   *   event is seen, this handles it. For example, if the user right clicks
   *   and the clipboard contains compatible data then this will give a paste
   *   option.
   *
   * @param object The object which was pressed
   * @param event The mouse event which contains button information
   */
This is a helper method for the eventFilter() method. When a mouse press
event is seen, this handles it. For example, if the user right clicks
and the clipboard contains compatible data then this will give a paste
option.

@param object The object which was pressed
@param event The mouse event which contains button information
This is a helper method for the eventFilter () method . When a mouse press event is seen this handles it . For example if the user right clicks and the clipboard contains compatible data then this will give a paste option . @param object The object which was pressed @param event The mouse event which contains button information
void PlotWindow::mousePressEvent(QObject *object, QMouseEvent *event) {
    if (qobject_cast<QWidget *>(object) &&
        event->button() == Qt::RightButton &&
        userCanAddCurve(QApplication::clipboard()->mimeData())) {
      QMenu contextMenu;
      QAction *pasteAct = new QAction(QIcon::fromTheme("edit-paste"), "Paste",
                                      this);
      contextMenu.addAction(pasteAct);
      QAction *chosenAct = contextMenu.exec(
          qobject_cast<QWidget *>(object)->mapToGlobal(event->pos()));
      if (chosenAct == pasteAct) {
        pasteCurve();
      }
    }
  }
void PlotWindow :: mousePressEvent ( QObject * object , QMouseEvent * event ) { if ( qobject_cast < QWidget * > ( object ) && event -> button ( ) == Qt :: RightButton && userCanAddCurve ( QApplication :: clipboard ( ) -> mimeData ( ) ) ) { QMenu contextMenu ; QAction * pasteAct = new QAction ( QIcon :: fromTheme ( " " ) , " " , this ) ; contextMenu . addAction ( pasteAct ) ; QAction * chosenAct = contextMenu . exec ( qobject_cast < QWidget * > ( object ) -> mapToGlobal ( event -> pos ( ) ) ) ; if ( chosenAct == pasteAct ) { pasteCurve ( ) ; } } }
This is a helper method for the eventFilter() method.
This is a helper method for the eventFilter () method .