mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2026-07-26 12:04:15 -04:00
Add local HTML help file to help menu.
So that a manual can be viewed without an Internet connection a second manual action has been added to the WSJT_X help menu. This shells out to the default web browser with a local file target. The build has been enhanced to install and package the current version of the HTML user manual as downloaded from the project web site at build time The package file locations have been adjusted to be compatible with the QStandardPaths class so that its locate() method can be used to portably access resources like this local help file git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@4359 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
+16
-2
@@ -988,9 +988,23 @@ void MainWindow::msgBox(QString t) //msgBox
|
||||
msgBox0.exec();
|
||||
}
|
||||
|
||||
void MainWindow::on_actionOnline_Users_Guide_triggered() //Display manual
|
||||
void MainWindow::on_actionOnline_User_Guide_triggered() //Display manual
|
||||
{
|
||||
QDesktopServices::openUrl (QUrl (PROJECT_MANUAL, QUrl::TolerantMode));
|
||||
QDesktopServices::openUrl (QUrl (PROJECT_MANUAL_DIRECTORY_URL PROJECT_MANUAL));
|
||||
}
|
||||
|
||||
//Display local copy of manual
|
||||
void MainWindow::on_actionLocal_User_Guide_triggered()
|
||||
{
|
||||
#if !defined (Q_OS_WIN) || QT_VERSION >= 0x050300
|
||||
QDir path {QStandardPaths::locate (QStandardPaths::DataLocation, WSJT_DOC_DESTINATION, QStandardPaths::LocateDirectory)};
|
||||
#else
|
||||
QDir path {QCoreApplication::applicationDirPath ()};
|
||||
path.cd (WSJT_DOC_DESTINATION);
|
||||
#endif
|
||||
|
||||
auto file = path.absoluteFilePath (PROJECT_MANUAL);
|
||||
QDesktopServices::openUrl (QUrl {"file:///" + file});
|
||||
}
|
||||
|
||||
void MainWindow::on_actionWide_Waterfall_triggered() //Display Waterfalls
|
||||
|
||||
Reference in New Issue
Block a user