Loading isis/src/qisis/objs/AbstractProjectItemView/AbstractProjectItemView.cpp +14 −0 Original line number Diff line number Diff line Loading @@ -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. * Loading isis/src/qisis/objs/AbstractProjectItemView/AbstractProjectItemView.h +9 −0 Original line number Diff line number Diff line Loading @@ -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 { Loading @@ -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(); Loading @@ -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); Loading isis/src/qisis/objs/Directory/Directory.cpp +35 −2 Original line number Diff line number Diff line Loading @@ -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(); Loading Loading @@ -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))); Loading Loading @@ -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() ) ); Loading Loading @@ -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 Loading Loading @@ -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(); Loading Loading @@ -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() ) ); Loading @@ -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() ) ); Loading @@ -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() ) ); Loading @@ -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() ) ); Loading @@ -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() ) ); Loading @@ -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; } Loading isis/src/qisis/objs/Directory/Directory.h +3 −0 Original line number Diff line number Diff line Loading @@ -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 Loading Loading
isis/src/qisis/objs/AbstractProjectItemView/AbstractProjectItemView.cpp +14 −0 Original line number Diff line number Diff line Loading @@ -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. * Loading
isis/src/qisis/objs/AbstractProjectItemView/AbstractProjectItemView.h +9 −0 Original line number Diff line number Diff line Loading @@ -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 { Loading @@ -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(); Loading @@ -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); Loading
isis/src/qisis/objs/Directory/Directory.cpp +35 −2 Original line number Diff line number Diff line Loading @@ -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(); Loading Loading @@ -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))); Loading Loading @@ -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() ) ); Loading Loading @@ -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 Loading Loading @@ -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(); Loading Loading @@ -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() ) ); Loading @@ -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() ) ); Loading @@ -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() ) ); Loading @@ -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() ) ); Loading @@ -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() ) ); Loading @@ -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; } Loading
isis/src/qisis/objs/Directory/Directory.h +3 −0 Original line number Diff line number Diff line Loading @@ -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 Loading