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

Merge pull request #259 from SgStapleton/ipceDocksWindowChange

Ipce docks window change
parents 339391c1 f9889ee9
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -149,6 +149,20 @@ namespace Isis {
  }


  void AbstractProjectItemView::moveEvent(QMoveEvent *event) {
    QMainWindow::moveEvent(event);
    
    emit windowChangeEvent(false);
  }


  void AbstractProjectItemView::resizeEvent(QResizeEvent *event) {
    QMainWindow::resizeEvent(event);
    
    emit windowChangeEvent(false);
  }

  
  /**
   * Returns a list of actions appropriate for a context menu.
   *
+9 −0
Original line number Diff line number Diff line
@@ -68,6 +68,9 @@ namespace Isis {
   *   @history 2018-05-30 Tracie Sucharski - Added the WindowFlag to set this as a Widget.
   *   @history 2018-06-15 Kaitlyn Lee - Removed methods returing toolbar and menu actions because each
   *                            individual has its own toolbar. These methods are not needed anymore.
   *   @History 2018-06-18 Summer Stapleton - Overloaded moveEvent and resizeEvent and added a
   *                           windowChangeEvent signal to allow project to recognize a new save
   *                           state. Fixes #5114
   */
  class AbstractProjectItemView : public QMainWindow {

@@ -83,6 +86,9 @@ namespace Isis {
      virtual void dragMoveEvent(QDragMoveEvent *event);
      virtual void dropEvent(QDropEvent *event);

      virtual void moveEvent(QMoveEvent *event);
      virtual void resizeEvent(QResizeEvent *event);

      virtual QList<QAction *> contextMenuActions();

      virtual ProjectItem *currentItem();
@@ -91,6 +97,9 @@ namespace Isis {
      virtual ProjectItemModel *internalModel();
      virtual void setInternalModel(ProjectItemModel *model);
      
    signals:
      void windowChangeEvent(bool event);

    public slots:
      virtual void addItem(ProjectItem *item);
      virtual void addItems(QList<ProjectItem *> items);
+35 −2
Original line number Diff line number Diff line
@@ -599,6 +599,9 @@ namespace Isis {
    connect( result, SIGNAL( destroyed(QObject *) ),
             this, SLOT( cleanupBundleObservationViews(QObject *) ) );
             
    connect(result, SIGNAL(windowChangeEvent(bool)),
             m_project, SLOT(setClean(bool)));

    m_bundleObservationViews.append(result);

    QString str = fileItem->fileName();
@@ -660,6 +663,9 @@ namespace Isis {
    connect(result, SIGNAL( destroyed(QObject *) ),
            this, SLOT( cleanupCnetEditorViewWidgets(QObject *) ) );
            
    connect(result, SIGNAL(windowChangeEvent(bool)),
            m_project, SLOT(setClean(bool)));

    //  Connections for control point editing between views
    connect(result->cnetEditorWidget(), SIGNAL(editControlPoint(ControlPoint *, QString)),
            this, SLOT(modifyControlPoint(ControlPoint *, QString)));
@@ -698,6 +704,9 @@ namespace Isis {
    connect( result, SIGNAL( destroyed(QObject *) ),
             this, SLOT( cleanupCubeDnViewWidgets(QObject *) ) );
   
    connect(result, SIGNAL(windowChangeEvent(bool)),
             m_project, SLOT(setClean(bool)));

    result->setWindowTitle("Cube DN View");
    result->setWindowTitle( tr("Cube DN View %1").arg(m_cubeDnViewWidgets.count() ) );

@@ -740,6 +749,9 @@ namespace Isis {
    connect(result, SIGNAL(destroyed(QObject *)),
            this, SLOT(cleanupFootprint2DViewWidgets(QObject *)));
            
    connect(result, SIGNAL(windowChangeEvent(bool)),
            m_project, SLOT(setClean(bool)));
                    
    emit newWidgetAvailable(result);

    //  Connections between mouse button events from footprint2DView and control point editing
@@ -826,6 +838,9 @@ namespace Isis {
              this, SLOT(makeBackupActiveControl()));
      connect (project(), SIGNAL(activeControlSet(bool)),
              result->controlPointEditWidget(), SLOT(setControlFromActive()));
               
      connect(result, SIGNAL(windowChangeEvent(bool)),
              m_project, SLOT(setClean(bool)));
    }

    return controlPointEditView();
@@ -859,6 +874,9 @@ namespace Isis {
    connect( result, SIGNAL( destroyed(QObject *) ),
             this, SLOT( cleanupMatrixViewWidgets(QObject *) ) );
             
    connect(result, SIGNAL(windowChangeEvent(bool)),
             m_project, SLOT(setClean(bool)));

    m_matrixViewWidgets.append(result);

    result->setWindowTitle( tr("Matrix View %1").arg( m_matrixViewWidgets.count() ) );
@@ -880,6 +898,9 @@ namespace Isis {
    connect( result, SIGNAL( destroyed(QObject *) ),
             this, SLOT( cleanupTargetInfoWidgets(QObject *) ) );
             
    connect(result, SIGNAL(windowChangeEvent(bool)),
             m_project, SLOT(setClean(bool)));

    m_targetInfoWidgets.append(result);

    result->setWindowTitle( tr("%1").arg(target->displayProperties()->displayName() ) );
@@ -901,6 +922,9 @@ namespace Isis {
    connect( result, SIGNAL( destroyed(QObject *) ),
             this, SLOT( cleanupTemplateEditorWidgets(QObject *) ) );
             
    connect(result, SIGNAL(windowChangeEvent(bool)),
             m_project, SLOT(setClean(bool)));

    m_templateEditorWidgets.append(result);

    result->setWindowTitle( tr("%1").arg( FileName(currentTemplate->fileName()).name() ) );
@@ -922,6 +946,9 @@ namespace Isis {
    connect( result, SIGNAL( destroyed(QObject *) ),
             this, SLOT( cleanupSensorInfoWidgets(QObject *) ) );

    connect(result, SIGNAL(windowChangeEvent(bool)),
             m_project, SLOT(setClean(bool)));

    m_sensorInfoWidgets.append(result);

    result->setWindowTitle( tr("%1").arg(camera->displayProperties()->displayName() ) );
@@ -944,6 +971,9 @@ namespace Isis {
    connect( result, SIGNAL( destroyed(QObject *) ),
             this, SLOT( cleanupFileListWidgets(QObject *) ) );
             
    connect(result, SIGNAL(windowChangeEvent(bool)),
             m_project, SLOT(setClean(bool)));

    m_fileListWidgets.append(result);

    result->setWindowTitle( tr("File List %1").arg( m_fileListWidgets.count() ) );
@@ -966,6 +996,9 @@ namespace Isis {
    connect(m_projectItemModel, SIGNAL(projectNameEdited(QString)),
            this, SLOT(initiateRenameProjectWorkOrder(QString)));
            
    connect(result, SIGNAL(windowChangeEvent(bool)),
            m_project, SLOT(setClean(bool)));

    return result;
  }

+3 −0
Original line number Diff line number Diff line
@@ -243,6 +243,9 @@ namespace Isis {
   *                           CubeDnView and Footprint2DView, instead of enabling the tool directly.
   *                           Removed  saveActiveControl() since users can save the control
   *                           network with the project save button.
   *   @history 2018-06-18 Summer Stapleton - Added connection to each view on creation to 
   *                           catch a windowChangeEvent on moveEvent or resizeEvent of these views
   *                           to allow for saving of the project at these times. Fixes #5114.
   */
  class Directory : public QObject {
    Q_OBJECT