mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	Switch to new UserManual implementation
This enables search within user manual by pressing Ctrl-F. Esc key closes search panel. Signed-off-by: Sergey Starosek <sergey.starosek@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
		
							parent
							
								
									8b00f8ffe6
								
							
						
					
					
						commit
						8ded16fd1b
					
				
					 2 changed files with 3 additions and 19 deletions
				
			
		| 
						 | 
				
			
			@ -484,27 +484,11 @@ void MainWindow::on_actionAboutSubsurface_triggered()
 | 
			
		|||
void MainWindow::on_actionUserManual_triggered()
 | 
			
		||||
{
 | 
			
		||||
	if(!helpView){
 | 
			
		||||
		helpView = new QWebView();
 | 
			
		||||
		helpView->page()->setLinkDelegationPolicy(QWebPage::DelegateExternalLinks);
 | 
			
		||||
		connect(helpView, SIGNAL(linkClicked(QUrl)), this, SLOT(linkClickedSlot(QUrl)));
 | 
			
		||||
	}
 | 
			
		||||
	QString searchPath = getSubsurfaceDataPath("Documentation");
 | 
			
		||||
	if (searchPath != "") {
 | 
			
		||||
		QUrl url(searchPath.append("/user-manual.html"));
 | 
			
		||||
		helpView->setWindowTitle(tr("User Manual"));
 | 
			
		||||
		helpView->setWindowIcon(QIcon(":/subsurface-icon"));
 | 
			
		||||
		helpView->setUrl(url);
 | 
			
		||||
	} else {
 | 
			
		||||
		helpView->setHtml(tr("Cannot find the Subsurface manual"));
 | 
			
		||||
		helpView = new UserManual();
 | 
			
		||||
	}
 | 
			
		||||
	helpView->show();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void MainWindow::linkClickedSlot(QUrl url)
 | 
			
		||||
{
 | 
			
		||||
	QDesktopServices::openUrl(url);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
QString MainWindow::filter()
 | 
			
		||||
{
 | 
			
		||||
	QString f;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue