diff options
author | Nikhil Marathe <nsm.nikhil@gmail.com> | 2010-05-24 16:48:49 +0530 |
---|---|---|
committer | Nikhil Marathe <nsm.nikhil@gmail.com> | 2010-05-24 16:48:49 +0530 |
commit | 9dc07f24c01c152d23c22cefab50db43fe517e95 (patch) | |
tree | 1e34e1f6724306f34279694435478b450bfa6781 /src/mainview.cpp | |
parent | rekonq 0.4.71 (diff) | |
download | rekonq-9dc07f24c01c152d23c22cefab50db43fe517e95.tar.xz |
Added actions to switch to Tab #n
BUG: 235107
Diffstat (limited to 'src/mainview.cpp')
-rw-r--r-- | src/mainview.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mainview.cpp b/src/mainview.cpp index 1c36adcf..01f0e1a4 100644 --- a/src/mainview.cpp +++ b/src/mainview.cpp @@ -657,6 +657,17 @@ void MainView::openClosedTab() } } +void MainView::switchToTab() +{ + // uses the sender to determine the tab index + QAction *sender = static_cast<QAction*>(QObject::sender()); + int index = sender->data().toInt(); + index -= 1; // to compensate for off by 1 presented to the user + if( index < 0 || index >= count() ) + return; + setCurrentIndex( index ); +} + QLabel *MainView::animatedLoading(int index, bool addMovie) { if (index == -1) |