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

Added event handlers, signal and connection to change project clean state for...

Added event handlers, signal and connection to change project clean state for saving upon move/resize events of views
parent 3097479c
Loading
Loading
Loading
Loading
+17 −1
Original line number Diff line number Diff line
@@ -149,6 +149,22 @@ namespace Isis {
  }


  void AbstractProjectItemView::moveEvent(QMoveEvent *event) {
    QMainWindow::moveEvent(event);
    std::cout << "Move event" << std::endl; 
    
    emit windowChangeEvent(false);
  }


  void AbstractProjectItemView::resizeEvent(QResizeEvent *event) {
    QMainWindow::resizeEvent(event);
    std::cout << "Resize event" << std::endl; 
    
    emit windowChangeEvent(false);
  }


  /**
   * Returns a list of actions appropriate for the permanent tool bar.
   *
+6 −0
Original line number Diff line number Diff line
@@ -81,6 +81,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 *> permToolBarActions();
      virtual QList<QAction *> activeToolBarActions();
      virtual QList<QAction *> toolPadActions();
@@ -100,6 +103,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);
+3 −0
Original line number Diff line number Diff line
@@ -751,6 +751,9 @@ namespace Isis {
    connect(result, SIGNAL(destroyed(QObject *)),
            this, SLOT(cleanupFootprint2DViewWidgets(QObject *)));

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

    emit newDockAvailable(result);

    //  Connections between mouse button events from footprint2DView and control point editing