Commit dbe3cf6a authored by Summer Stapleton's avatar Summer Stapleton
Browse files

Updated for Footprint2DView to handle new QMainWindow scheme

parent b29d1433
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@
#include <QApplication>
#include <QDockWidget>
#include <QGridLayout>
#include <QMainWindow>
#include <QMenu>
#include <QMenuBar>
#include <QMessageBox>
@@ -698,7 +699,7 @@ namespace Isis {
    result->setWindowTitle("Cube DN View");
    result->setWindowTitle( tr("Cube DN View %1").arg(m_cubeDnViewWidgets.count() ) );

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

    //  Connections between mouse button events from view and control point editing
    connect(result, SIGNAL(modifyControlPoint(ControlPoint *, QString)),
@@ -750,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>
@@ -236,6 +237,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.
   */
  class Directory : public QObject {
    Q_OBJECT
@@ -354,6 +358,7 @@ namespace Isis {
    signals:
      void directoryCleaned();
      void newWarning();
      void newDockAvailable(QMainWindow *newWidget);
      void newWidgetAvailable(QWidget *newWidget);

      void viewClosed(QWidget *widget);
+20 −17
Original line number Diff line number Diff line
@@ -61,7 +61,7 @@ namespace Isis {
  /**
   * Constructor.
   *
   * @param parent Pointer to parent QWidget
   * @param parent (QMianWindow *) Pointer to parent QWidget
   */
  Footprint2DView::Footprint2DView(Directory *directory, QWidget *parent) :
                      AbstractProjectItemView(parent) {
@@ -100,10 +100,10 @@ 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);
    // QBoxLayout *layout = new QBoxLayout(QBoxLayout::TopToBottom);
    // QHBoxLayout *viewlayout = new QHBoxLayout();
    // 
    // layout->addWidget(statusBar);

    m_fileListWidget = new ImageFileListWidget(directory);

@@ -119,20 +119,23 @@ 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);

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

    setLayout(layout);
    // 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);
@@ -151,10 +154,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 {