Skip to content

Commit

Permalink
reorder items
Browse files Browse the repository at this point in the history
  • Loading branch information
dan-giddins committed Jan 30, 2021
1 parent ca717d8 commit 15b445d
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/gui/SubWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,18 @@ SubWindow::SubWindow( QWidget *parent, Qt::WindowFlags windowFlags ) :
// get the default systemMenu
m_systemMenu = systemMenu();

// create 'close all' action
m_closeAllAction = new QAction();
m_closeAllAction->setText("Close all");
m_closeAllAction->setShortcut(QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_W));
// connect action to signal
connect(m_closeAllAction, SIGNAL(triggered()), SignalSender::getInstance(), SLOT(closeAll()));
connect(SignalSender::getInstance(), SIGNAL(closeAllSignal()), this, SLOT(close()));
// add action to subwindow to capture keypress
addAction(m_closeAllAction);
// add action to systemMenu
m_systemMenu->addAction(m_closeAllAction);

// create 'close all but this' action
m_closeAllButThisAction = new QAction();
m_closeAllButThisAction->setText("Close all but this");
Expand All @@ -125,18 +137,6 @@ SubWindow::SubWindow( QWidget *parent, Qt::WindowFlags windowFlags ) :
// add action to systemMenu
m_systemMenu->addAction(m_closeAllButThisAction);

// create 'close all' action
m_closeAllAction = new QAction();
m_closeAllAction->setText("Close all");
m_closeAllAction->setShortcut(QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_W));
// connect action to signal
connect(m_closeAllAction, SIGNAL(triggered()), SignalSender::getInstance(), SLOT(closeAll()));
connect(SignalSender::getInstance(), SIGNAL(closeAllSignal()), this, SLOT(close()));
// add action to subwindow to capture keypress
addAction(m_closeAllAction);
// add action to systemMenu
m_systemMenu->addAction(m_closeAllAction);

// update systemMenu
setSystemMenu(m_systemMenu);
}
Expand Down

0 comments on commit 15b445d

Please sign in to comment.