Unverified Commit 2fc7559d authored by Tracie Sucharski's avatar Tracie Sucharski Committed by GitHub
Browse files

Merge pull request #194 from SgStapleton/ipceDocksFoot

Updated to handle Footprint2DView for new QMainWindow scheme
parents fdd76104 52224c6f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -751,7 +751,7 @@ namespace Isis {
    connect(result, SIGNAL(destroyed(QObject *)),
            this, SLOT(cleanupFootprint2DViewWidgets(QObject *)));

    emit newWidgetAvailable(result);
    emit newDockAvailable(result);

    //  Connections between mouse button events from footprint2DView and control point editing
    connect(result, SIGNAL(modifyControlPoint(ControlPoint *)),
+5 −0
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@
 *   http://www.usgs.gov/privacy.html.
 */

#include <QMainWindow>
#include <QMultiMap>
#include <QObject>
#include <QPointer>
@@ -237,6 +238,9 @@ namespace Isis {
   *   @history 2018-05-14 Tracie Sucharski - Serialize Footprint2DView rather than
   *                           MosaicSceneWidget. This will allow all parts of Footprint2DView to be
   *                           saved/restored including the ImageFileListWidget. Fixes #5422.
   *   @history 2018-05-30 Summer Stapleton - updated the emit in addFootprint2DView from 
   *                           newWidgetAvailable to newDockAvailable to handle new signal from 
   *                           IpceMainWindow. References #5433.
   *   @history 2018-05-30 Tracie Sucharski - Changed for re-factored docked views. Added signal to
   *                           let IpceMainWindow know there is a new view available for docking.
   *                           This needs further work to cleanup and change the mdi interface.
@@ -358,6 +362,7 @@ namespace Isis {
    signals:
      void directoryCleaned();
      void newWarning();
      void newDockAvailable(QMainWindow *newWidget);
      void newWidgetAvailable(QWidget *newWidget);
      void newDockAvailable(QMainWindow *newWidget);

+12 −22
Original line number Diff line number Diff line
@@ -61,7 +61,7 @@ namespace Isis {
  /**
   * Constructor.
   *
   * @param parent Pointer to parent QWidget
   * @param parent (QMainWindow *) Pointer to parent QMainWindow
   */
  Footprint2DView::Footprint2DView(Directory *directory, QWidget *parent) :
                      AbstractProjectItemView(parent) {
@@ -100,10 +100,7 @@ namespace Isis {
    //  the footprints.
    connect(this, SIGNAL(redrawMeasures()), m_sceneWidget->getScene(), SLOT(update()));
    
    QBoxLayout *layout = new QBoxLayout(QBoxLayout::TopToBottom);
    QHBoxLayout *viewlayout = new QHBoxLayout();

    layout->addWidget(statusBar);
    setStatusBar(statusBar);

    m_fileListWidget = new ImageFileListWidget(directory);

@@ -119,27 +116,20 @@ namespace Isis {

    imageFileListdock->setWidget(m_fileListWidget);
    
    m_window = new QMainWindow();
    m_window->addDockWidget(Qt::LeftDockWidgetArea, imageFileListdock, Qt::Vertical);
    m_window->setCentralWidget(m_sceneWidget);
    viewlayout->addWidget(m_window);
    layout->addLayout(viewlayout);
    addDockWidget(Qt::LeftDockWidgetArea, imageFileListdock, Qt::Vertical);
    setCentralWidget(m_sceneWidget);

    setLayout(layout);

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

    m_activeToolBar = new QToolBar("Active Tool", 0);
    m_activeToolBar = addToolBar("Active Tool");
    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_sceneWidget->addToPermanent(m_permToolBar);
@@ -151,10 +141,10 @@ namespace Isis {

    setAcceptDrops(true);

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


+4 −0
Original line number Diff line number Diff line
@@ -72,6 +72,10 @@ namespace Isis {
   *   @history 2018-05-14 Tracie Sucharski - Serialize Footprint2DView rather than
   *                           MosaicSceneWidget. This will allow all parts of Footprint2DView to be
   *                           saved/restored including the ImageFileListWidget. Fixes #5422.
   *   @history 2018-05-30 Summer Stapleton - updated the view to remove QMainWindow constructor, 
   *                           include a central widget and to remove layout capacity. This change 
   *                           was made to adjust to parent class now inheriting from QMainWindow 
   *                           instead of QWidget. References #5433.
   */
  class Footprint2DView : public AbstractProjectItemView {