Skip to content
Snippets Groups Projects
Commit 1c3099a9 authored by Matthias Möller's avatar Matthias Möller
Browse files

right entry in treewidget will be selected if helplink is activated

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@13945 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 19d6f903
No related branches found
No related tags found
No related merge requests found
......@@ -132,7 +132,6 @@ HelpWidget::HelpWidget(QWidget* parent, const QString& _homeSite)
connect(helpEngine_->contentWidget(), SIGNAL(linkActivated(const QUrl&)),
this, SLOT(linkActivated(const QUrl&)));
// Search button
connect(searchButton_, SIGNAL(clicked()), this, SLOT(showSearchWidget()));
......@@ -197,13 +196,23 @@ HelpWidget::HelpWidget(QWidget* parent, const QString& _homeSite)
textWindow_->open(QUrl(homeSite_));
}
void HelpWidget::activateLink(const QUrl& _url)
{
//open and show the url
linkActivated(_url);
//set tree to the right entry
//this is _slow_, so do not use it in function "linkActivated". in "linkActivated" the entry is already selected by the user
helpEngine_->contentWidget()->hide();
QModelIndex modelIndex = helpEngine_->contentWidget()->indexOf(_url);
helpEngine_->contentWidget()->setCurrentIndex( modelIndex );
helpEngine_->contentWidget()->show();
}
void HelpWidget::linkActivated(const QUrl& _url) {
textWindow_->open(_url);
tabWidget_->setCurrentIndex(homeIndex_);
//todo: change content in Tree of help-browser
//helpEngine_->contentWidget() shows the tree
//cannot find any function which changes the content
}
void HelpWidget::startSearch() {
......
......@@ -88,8 +88,12 @@ private slots:
void showSearchWidget();
//the entry was already selected by user
void linkActivated(const QUrl& _url);
//activate the url and jump to the entry
void activateLink(const QUrl& _url);
void showFoundSite(const QUrl& _url);
void showResults(int _hits);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment