Unverified Commit ac3994b0 authored by Kristin's avatar Kristin Committed by GitHub
Browse files

Merge branch 'ipceDocks' into ipceDocksTemplates

parents 653d5964 c48b8344
Loading
Loading
Loading
Loading
+26 −0
Original line number Diff line number Diff line
@@ -353,6 +353,10 @@ namespace Isis {
    connect( tabViewsAction, SIGNAL(triggered()), this, SLOT(tabViews()) );
    m_viewMenuActions.append(tabViewsAction);

    QAction *tileViewsAction = new QAction("Tile Views", this);
    connect( tileViewsAction, SIGNAL(triggered()), this, SLOT(tileViews()) );
    m_viewMenuActions.append(tileViewsAction);

    QAction *undoAction = m_directory->undoAction();
    undoAction->setShortcut(Qt::Key_Z | Qt::CTRL);

@@ -816,6 +820,28 @@ namespace Isis {
  }


  /**
   * Tile all open attached/detached views
   */
  void IpceMainWindow::tileViews() {
    // splitDockWidget() takes two widgets and tiles them, so an easy way to do
    // this is to grab the first view and tile the rest with the first.
    QDockWidget *firstView = m_viewDocks.first();

    foreach (QDockWidget *currentView, m_viewDocks) {
      // We have to reattach a view before it can be tiled. If it is attached,
      // this will have no affect. We have to call addDockWidget() to untab any views.
      currentView->setFloating(false);
      addDockWidget(Qt::LeftDockWidgetArea, currentView, Qt::Horizontal);

      if (currentView == firstView) {
        continue;
      }
      splitDockWidget(firstView, currentView, Qt::Horizontal);
    }
  }


/**
 * Raises the warningWidget to the front of the tabs. Connected to warning signal from directory.
 */
+4 −1
Original line number Diff line number Diff line
@@ -162,6 +162,8 @@ namespace Isis {
   *   @history 2018-07-07 Summer Stapleton - Added check in the closeEvent() for changes to any 
   *                           TemplateEditorWidget currently open to create a pop-up warning/
   *                           option to save.
   *   @history 2018-07-05 Kaitlyn Lee - Added tilViews() and the menu option to tile all docked/undocked
   *                           and tabbed/untabbed views.
   */
  class IpceMainWindow : public QMainWindow {
      Q_OBJECT
@@ -189,6 +191,7 @@ namespace Isis {
      void enterWhatsThisMode();

      void tabViews();
      void tileViews();

      void raiseWarningTab();
      void cleanupViewDockList(QObject *obj);