From 3266a6ef4cd2ccaa768d8c5afc4ebf84aa626dfd Mon Sep 17 00:00:00 2001 From: Tvangeste Date: Sat, 25 Jun 2011 09:34:28 +0200 Subject: [PATCH] Added "New Tab" menu, plus corrected copyright headers. --- maintabwidget.cc | 3 +++ maintabwidget.hh | 2 +- mainwindow.cc | 5 +++++ mainwindow.hh | 2 ++ mainwindow.ui | 17 +++++++++++++++++ 5 files changed, 28 insertions(+), 1 deletion(-) diff --git a/maintabwidget.cc b/maintabwidget.cc index eb10090d..94df81b3 100644 --- a/maintabwidget.cc +++ b/maintabwidget.cc @@ -1,3 +1,6 @@ +/* This file is (c) 2011 Tvangeste + * Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */ + #include "maintabwidget.hh" MainTabWidget::MainTabWidget( QWidget * parent) : QTabWidget( parent ) { diff --git a/maintabwidget.hh b/maintabwidget.hh index 48e4698c..f1c151db 100644 --- a/maintabwidget.hh +++ b/maintabwidget.hh @@ -1,4 +1,4 @@ -/* This file is (c) 2008-2011 Konstantin Isakov +/* This file is (c) 2011 Tvangeste * Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */ #ifndef MAINTABWIDGET_HH diff --git a/mainwindow.cc b/mainwindow.cc index 90961a0c..9ff28437 100644 --- a/mainwindow.cc +++ b/mainwindow.cc @@ -2044,6 +2044,11 @@ void MainWindow::on_clearHistory_activated() history.save(); } +void MainWindow::on_newTab_activated() +{ + addNewTab(); +} + void MainWindow::setAutostart(bool autostart) { #ifdef Q_OS_WIN32 diff --git a/mainwindow.hh b/mainwindow.hh index fa686587..3cc40bf3 100644 --- a/mainwindow.hh +++ b/mainwindow.hh @@ -285,6 +285,8 @@ private slots: void menuHistoryTriggered( QAction * ); void on_clearHistory_activated(); + void on_newTab_activated(); + void on_actionCloseToTray_activated(); void on_pageSetup_activated(); diff --git a/mainwindow.ui b/mainwindow.ui index de7b27dc..e5a5ee09 100644 --- a/mainwindow.ui +++ b/mainwindow.ui @@ -65,6 +65,8 @@ &File + + @@ -400,6 +402,21 @@ &Clear + + + + :/icons/addtab.png:/icons/addtab.png + + + New Tab + + + Ctrl+T + + + Qt::WidgetShortcut + +