Commit 7fdf1ab9 authored by Kaitlyn Lee's avatar Kaitlyn Lee
Browse files

Cleaned up Footprint view.

parent b8b43a49
Loading
Loading
Loading
Loading
+7 −26
Original line number Diff line number Diff line
@@ -121,7 +121,6 @@ namespace Isis {
    addDockWidget(Qt::LeftDockWidgetArea, imageFileListdock, Qt::Vertical);
    setCentralWidget(m_sceneWidget);


    m_permToolBar = addToolBar("Standard Tools");
    m_permToolBar->setObjectName("permToolBar");
    m_permToolBar->setIconSize(QSize(22, 22));
@@ -149,15 +148,7 @@ namespace Isis {
      m_controlNetTool->setEnabled(false);
    }

//  m_activeToolBarAction = new QWidgetAction(this);
//  m_activeToolBarAction->setDefaultWidget(m_activeToolBar);

    setAcceptDrops(true);

    // QSizePolicy policy = sizePolicy();
    // policy.setHorizontalPolicy(QSizePolicy::Expanding);
    // policy.setVerticalPolicy(QSizePolicy::Expanding);
    // setSizePolicy(policy);
  }


@@ -327,27 +318,17 @@ namespace Isis {
  }

  /**
   * This is a slot function which is called when directory emits a siganl to
   * CubeDnView when an active control network is set. It enables the control
   * network editor tool in the toolpad.
   * A slot function that is called when directory emits a siganl that an active
   * control network is set. It enables the control network editor tool in the
   * toolpad and loads the network.
   */
  void Footprint2DView::enableControlNetTool(bool value) {
    m_controlNetTool->setEnabled(value);
    if (value) {
      MosaicControlNetTool *cnetTool = static_cast<MosaicControlNetTool *>(m_controlNetTool->parent());
      cnetTool->loadNetwork();
    }
  }

  // /**
  //  * Returns a list of actions for the tool pad.
  //  *
  //  * @return @b QList<QAction*> The actions
  //  */
  // QList<QAction *> Footprint2DView::toolPadActions() {
  //   return m_toolPad->actions();
    // if (value) {
    //   MosaicControlNetTool *cnetTool = static_cast<MosaicControlNetTool *>(m_controlNetTool->parent());
    //   cnetTool->loadNetwork();
    // }

  }

  /**
   * @brief Loads the Footprint2DView from an XML file.
+10 −5
Original line number Diff line number Diff line
@@ -78,6 +78,15 @@ namespace Isis {
   *                           instead of QWidget. References #5433.
   *   @history 2018-06-08 Tracie Sucharski - Remove deletion of m_window from destructor. This
   *                           member variable no longer exists.
   *   @history 2018-06-13 Kaitlyn Lee - Since views now inherit from QMainWindow, each individual
   *                           view has its own toolbar, so having getters that return toolbar
   *                           actions to fill the toolbar of the IpceMainWindow are unnecessary.
   *                           Removed methods that returned menu and toolbar actions.
   *                           Made it so that on default and if there is no active control net,
   *                           the Control Net Tool will be disabled.
   *                           Added enableControlNetTool(bool) so when an active control net is set,
   *                           the tool becomes enabled.

   */
  class Footprint2DView : public AbstractProjectItemView {

@@ -89,8 +98,6 @@ namespace Isis {

      MosaicSceneWidget *mosaicSceneWidget();

      //virtual QList<QAction *> toolPadActions();

      QSize sizeHint() const;

      void load(XmlStackedHandlerReader *xmlReader);
@@ -148,9 +155,7 @@ namespace Isis {
      QToolBar *m_activeToolBar; //!< The active tool bar
      ToolPad *m_toolPad; //!< The tool pad

      QAction *m_controlNetTool;

      QWidgetAction *m_activeToolBarAction; //!< Stores the active tool bar
      QAction *m_controlNetTool;  //!< The Control Point Editor Tool
  };
}