session_selector_.setCornerWidget(static_tab_widget_, Qt::TopLeftCorner);
session_selector_.setTabsClosable(true);
+ close_application_shortcut_ = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_Q), this, SLOT(close()));
+ close_application_shortcut_->setAutoRepeat(false);
+
+ close_current_tab_shortcut_ = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_W), this, SLOT(on_close_current_tab()));
+
connect(new_session_button_, SIGNAL(clicked(bool)),
this, SLOT(on_new_session_clicked()));
connect(run_stop_button_, SIGNAL(clicked(bool)),
dlg.exec();
}
+void MainWindow::on_close_current_tab()
+{
+ int tab = session_selector_.currentIndex();
+
+ on_tab_close_requested(tab);
+}
+
} // namespace pv
void on_actionAbout_triggered();
+ void on_close_current_tab();
+
private:
DeviceManager &device_manager_;
QIcon icon_grey_;
QShortcut *run_stop_shortcut_;
+ QShortcut *close_application_shortcut_;
+ QShortcut *close_current_tab_shortcut_;
};
} // namespace pv