Commit 68a43a1b authored by Kaitlyn Lee's avatar Kaitlyn Lee
Browse files

Cleaned up ControlPointEditView.

parent 66d7bd3d
Loading
Loading
Loading
Loading
+0 −63
Original line number Diff line number Diff line
@@ -60,28 +60,6 @@ namespace Isis {

    layout->addWidget(m_controlPointEditWidget);

    m_permToolBar = new QToolBar("Standard Tools", 0);
    m_permToolBar->setObjectName("permToolBar");
    m_permToolBar->setIconSize(QSize(22, 22));
    //toolBarLayout->addWidget(m_permToolBar);

    m_activeToolBar = new QToolBar("Active Tool", 0);
    m_activeToolBar->setObjectName("activeToolBar");
    m_activeToolBar->setIconSize(QSize(22, 22));
    //toolBarLayout->addWidget(m_activeToolBar);

    m_toolPad = new ToolPad("Tool Pad", 0);
    m_toolPad->setObjectName("toolPad");
    //toolBarLayout->addWidget(m_toolPad);


//  m_controlPointEditWidget->addToPermanent(m_permToolBar);
//  m_controlPointEditWidget->addTo(m_activeToolBar);
//  m_controlPointEditWidget->addTo(m_toolPad);

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

    setAcceptDrops(true);

    QSizePolicy policy = sizePolicy();
@@ -97,13 +75,6 @@ namespace Isis {
   */
  ControlPointEditView::~ControlPointEditView() {
    delete m_controlPointEditWidget;
    delete m_permToolBar;
    delete m_activeToolBar;
    delete m_toolPad;

    m_permToolBar = 0;
    m_activeToolBar = 0;
    m_toolPad = 0;
  }


@@ -126,38 +97,4 @@ namespace Isis {
  QSize ControlPointEditView::sizeHint() const {
    return QSize(800, 600);
  }


  /**
   * Returns a list of actions for the permanent tool bar.
   *
   * @return (QList<QAction *>) The actions
   */
  QList<QAction *> ControlPointEditView::permToolBarActions() {
    return m_permToolBar->actions();
  }


  /**
   * Returns a list of actions for the active tool bar.
   *
   * @return (QList<QAction *>) The actions
   */
  QList<QAction *> ControlPointEditView::activeToolBarActions() {
    QList<QAction *> actions;
    actions.append(m_activeToolBarAction);
    return actions;
  }


  /**
   * Returns a list of actions for the tool pad.
   *
   * @return (QList<QAction *>) The actions
   */
  QList<QAction *> ControlPointEditView::toolPadActions() {
    return m_toolPad->actions();
  }


}
+4 −14
Original line number Diff line number Diff line
@@ -49,6 +49,10 @@ namespace Isis {
   *                           and set its layout to QVBoxLayout. We used to set
   *                           the whole CnetEditorView widget's layout, now we only
   *                           set the central widget's layout.
   *   @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 toolbars and methods that returned menu and toolbar actions.
   */

class ControlPointEditView : public AbstractProjectItemView {
@@ -59,10 +63,6 @@ class ControlPointEditView : public AbstractProjectItemView {
    ControlPointEditView(Directory *directory, QWidget *parent = 0);
    ~ControlPointEditView();

    virtual QList<QAction *> permToolBarActions();
    virtual QList<QAction *> activeToolBarActions();
    virtual QList<QAction *> toolPadActions();

    ControlPointEditWidget *controlPointEditWidget();

//  setEditPoint(ControlPoint *editPoint);
@@ -70,19 +70,9 @@ class ControlPointEditView : public AbstractProjectItemView {

    QSize sizeHint() const;

  public slots:

  private slots:

  private:
    QPointer<ControlPointEditWidget> m_controlPointEditWidget;
    QMap<Control *, ProjectItem *> m_controlItemMap;  //!<Maps control net to project item

    QToolBar *m_permToolBar; //!< The permanent tool bar
    QToolBar *m_activeToolBar; //!< The active tool bar
    ToolPad *m_toolPad; //!< The tool pad

    QWidgetAction *m_activeToolBarAction; //!< Stores the active tool bar
  };
}