summaryrefslogtreecommitdiff
path: root/src/tabwidget.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2008-11-28 02:05:42 +0100
committerAndrea Diamantini <adjam7@gmail.com>2008-11-28 02:05:42 +0100
commit5b5bbe370303f6d146c125b0cb0b0c465cc1b3ff (patch)
tree9012c77d8161592829f967dad6368f335c0ac17b /src/tabwidget.cpp
parentNew step forwad in the street from QAction to KAction.. (diff)
downloadrekonq-5b5bbe370303f6d146c125b0cb0b0c465cc1b3ff.tar.xz
Final (hopefully) adjustments in tabwidget (Q/K)action management..
Diffstat (limited to 'src/tabwidget.cpp')
-rw-r--r--src/tabwidget.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/tabwidget.cpp b/src/tabwidget.cpp
index e54dbee5..ef3dc4ea 100644
--- a/src/tabwidget.cpp
+++ b/src/tabwidget.cpp
@@ -215,12 +215,12 @@ TabWidget::TabWidget(QWidget *parent)
// Actions
m_newTabAction = new KAction(KIcon("tab-new"), i18n("New &Tab"), this);
-// m_newTabAction->setShortcuts(QKeySequence::AddTab); FIXME
+ m_newTabAction->setShortcuts(KShortcut(Qt::CTRL+Qt::SHIFT+Qt::Key_N, Qt::CTRL+Qt::Key_T));
m_newTabAction->setIconVisibleInMenu(false);
connect(m_newTabAction, SIGNAL(triggered()), this, SLOT(newTab()));
m_closeTabAction = new KAction(KIcon("tab-close"), i18n("&Close Tab"), this);
-// m_closeTabAction->setShortcuts(QKeySequence::Close); FIXME
+ m_closeTabAction->setShortcut(Qt::CTRL+Qt::Key_W);
m_closeTabAction->setIconVisibleInMenu(false);
connect(m_closeTabAction, SIGNAL(triggered()), this, SLOT(closeTab()));
@@ -242,7 +242,7 @@ TabWidget::TabWidget(QWidget *parent)
m_previousTabAction->setShortcuts(shortcuts);
connect(m_previousTabAction, SIGNAL(triggered()), this, SLOT(previousTab()));
- m_recentlyClosedTabsMenu = new QMenu(this);
+ m_recentlyClosedTabsMenu = new KMenu(this);
connect(m_recentlyClosedTabsMenu, SIGNAL(aboutToShow()), this, SLOT(aboutToShowRecentTabsMenu()));
connect(m_recentlyClosedTabsMenu, SIGNAL(triggered(QAction *)), this, SLOT(aboutToShowRecentTriggeredAction(QAction *)));
m_recentlyClosedTabsAction = new KAction(i18n("Recently Closed Tabs"), this);
@@ -657,7 +657,7 @@ void TabWidget::aboutToShowRecentTabsMenu()
}
}
-void TabWidget::aboutToShowRecentTriggeredAction(KAction *action)
+void TabWidget::aboutToShowRecentTriggeredAction(QAction *action)
{
QUrl url = action->data().toUrl();
loadUrlInCurrentTab(url);
@@ -665,9 +665,10 @@ void TabWidget::aboutToShowRecentTriggeredAction(KAction *action)
void TabWidget::mouseDoubleClickEvent(QMouseEvent *event)
{
- if (!childAt(event->pos())
- // Remove the line below when QTabWidget does not have a one pixel frame
- && event->pos().y() < (tabBar()->y() + tabBar()->height())) {
+ if ( !childAt(event->pos())
+ // Remove the line below when QTabWidget does not have a one pixel frame
+ && event->pos().y() < (tabBar()->y() + tabBar()->height()))
+ {
newTab();
return;
}