aboutsummaryrefslogtreecommitdiffstats
path: root/src/shared/help/indexwindow.cpp
diff options
context:
space:
mode:
authorkh1 <[email protected]>2010-03-30 17:44:28 +0200
committerkh1 <[email protected]>2010-03-30 17:51:46 +0200
commitedcefd69ad49f10ffe6c75c8f01de41a44868df1 (patch)
tree976f37bbe686fb28299747280bd588324b9bb4f1 /src/shared/help/indexwindow.cpp
parenta8801d15c56eaef7d3ac65d4616dbf8f26966972 (diff)
Implement tabless help mode, behaves now like edit mode.
Diffstat (limited to 'src/shared/help/indexwindow.cpp')
-rw-r--r--src/shared/help/indexwindow.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/shared/help/indexwindow.cpp b/src/shared/help/indexwindow.cpp
index dcb99e22ed5..0b9bf0935f0 100644
--- a/src/shared/help/indexwindow.cpp
+++ b/src/shared/help/indexwindow.cpp
@@ -28,8 +28,10 @@
**************************************************************************/
#include "centralwidget.h"
+
#include "helpmanager.h"
#include "indexwindow.h"
+#include "openpagesmanager.h"
#include "topicchooser.h"
#include <QtGui/QLayout>
@@ -43,6 +45,8 @@
#include <QtHelp/QHelpEngine>
#include <QtHelp/QHelpIndexWidget>
+using namespace Help::Internal;
+
IndexWindow::IndexWindow()
: m_searchLineEdit(0)
, m_indexWidget(0)
@@ -108,9 +112,6 @@ bool IndexWindow::eventFilter(QObject *obj, QEvent *e)
if (idx.isValid())
m_indexWidget->setCurrentIndex(idx);
break;
- case Qt::Key_Escape:
- emit escapePressed();
- break;
default: ; // stop complaining
}
} else if (obj == m_searchLineEdit
@@ -124,7 +125,7 @@ bool IndexWindow::eventFilter(QObject *obj, QEvent *e)
if (idx.isValid()) {
QMenu menu;
QAction *curTab = menu.addAction(tr("Open Link"));
- QAction *newTab = menu.addAction(tr("Open Link in New Tab"));
+ QAction *newTab = menu.addAction(tr("Open Link as New Page"));
menu.move(m_indexWidget->mapToGlobal(ctxtEvent->pos()));
QAction *action = menu.exec();
@@ -194,6 +195,6 @@ void IndexWindow::open(QHelpIndexWidget* indexWidget, const QModelIndex &index)
if (url.path().endsWith(QLatin1String(".pdf"), Qt::CaseInsensitive))
Help::Internal::CentralWidget::instance()->setSource(url);
else
- Help::Internal::CentralWidget::instance()->setSourceInNewTab(url);
+ OpenPagesManager::instance().createPage(url);
}
}