Mantid
|
#include <MantidHelpWindow.h>
Public Slots | |
void | shutdown () override |
Perform any clean up on main window shutdown. More... | |
void | warning (const QString &msg) |
Public Slots inherited from MantidQt::API::MantidHelpInterface | |
virtual void | shutdown () |
Perform any clean up on main window shutdown. More... | |
Public Member Functions | |
MantidHelpWindow (const Qt::WindowFlags &flags=Qt::WindowFlags()) | |
Default constructor shows the DEFAULT_URL. More... | |
void | showAlgorithm (const QString &name, const int version=-1) override |
Convenience method for HelpWindowImpl::showAlgorithm(const string &, const
int). More... | |
void | showAlgorithm (const std::string &name=std::string(), const int version=-1) override |
Show the help page for a particular algorithm. More... | |
void | showConcept (const QString &name) override |
Show the help page for a particular concept. More... | |
void | showConcept (const std::string &name) override |
Show the help page for a particular concept. More... | |
void | showCustomInterface (const QString &name, const QString &area=QString(), const QString §ion=QString()) override |
Show the help page for a given custom interface. More... | |
void | showCustomInterface (const std::string &name=std::string(), const std::string &area=std::string(), const std::string §ion=std::string()) override |
Show the help page for a given custom interface. More... | |
void | showFitFunction (const QString &name) override |
Show the help page for a particular fit function. More... | |
void | showFitFunction (const std::string &name=std::string()) override |
Show the help page for a particular fit function. More... | |
void | showPage (const QString &url) override |
void | showPage (const QUrl &url) override |
void | showPage (const std::string &url=std::string()) override |
Have the help window show a specific url. More... | |
void | showWikiPage (const QString &page) override |
Convenience method for HelpWindowImpl::showWikiPage(const string &). More... | |
void | showWikiPage (const std::string &page=std::string()) override |
Public Member Functions inherited from MantidQt::API::MantidHelpInterface | |
MantidHelpInterface () | |
Default constructor. More... | |
virtual void | showAlgorithm (const QString &name, const int version=-1) |
virtual void | showAlgorithm (const std::string &name=std::string(), const int version=-1) |
virtual void | showConcept (const QString &name) |
virtual void | showConcept (const std::string &name) |
virtual void | showCustomInterface (const QString &name, const QString &area=QString(), const QString §ion=QString()) |
virtual void | showCustomInterface (const std::string &name, const std::string &area=std::string(), const std::string §ion=std::string()) |
virtual void | showFitFunction (const QString &name) |
virtual void | showFitFunction (const std::string &name=std::string()) |
virtual void | showPage (const QString &url) |
virtual void | showPage (const QUrl &url) |
virtual void | showPage (const std::string &url=std::string()) |
virtual void | showWikiPage (const QString &page) |
virtual void | showWikiPage (const std::string &page=std::string()) |
~MantidHelpInterface () override | |
Default destructor. More... | |
Static Public Member Functions | |
static bool | helpWindowExists () |
Private Member Functions | |
void | determineFileLocs () |
Determine the location of the collection and cache files. More... | |
void | findCollectionFile (std::string &binDir) |
Determine the location of the collection file, "mantid.qhc". More... | |
void | openWebpage (const QUrl &url) |
void | showHelp (const QString &url) |
Private Attributes | |
std::string | m_cacheFile |
The full path of the cache file. More... | |
std::string | m_collectionFile |
The full path of the collection file. More... | |
bool | m_firstRun |
Whether this is the very first startup of the helpwindow. More... | |
Static Private Attributes | |
static QPointer< pqHelpWindow > | g_helpWindow |
The window that renders the help information. More... | |
Definition at line 24 of file MantidHelpWindow.h.
MantidQt::MantidWidgets::MantidHelpWindow::MantidHelpWindow | ( | const Qt::WindowFlags & | flags = Qt::WindowFlags() | ) |
Default constructor shows the DEFAULT_URL.
Definition at line 65 of file MantidHelpWindow.cpp.
References Mantid::Kernel::Logger::debug(), determineFileLocs(), g_helpWindow, Mantid::API::g_log, helpWindowExists(), m_cacheFile, m_collectionFile, warning(), and Mantid::Kernel::Logger::warning().
|
private |
Determine the location of the collection and cache files.
Definition at line 427 of file MantidHelpWindow.cpp.
References MantidQt::MantidWidgets::COLLECTION_FILE(), Mantid::Kernel::Logger::debug(), findCollectionFile(), Mantid::API::g_log, Mantid::Kernel::SingletonHolder< T >::Instance(), m_cacheFile, and m_collectionFile.
Referenced by MantidHelpWindow().
|
private |
Determine the location of the collection file, "mantid.qhc".
This checks in multiple locations and can throw an exception. For more information see http://doc.qt.digia.com/qq/qq28-qthelp.html#htmlfilesandhelpprojects
binDir | The location of the mantid executable. |
Definition at line 356 of file MantidHelpWindow.cpp.
References MantidQt::MantidWidgets::COLLECTION_FILE(), Mantid::Kernel::Logger::debug(), Mantid::API::g_log, Mantid::Kernel::Logger::information(), and m_collectionFile.
Referenced by determineFileLocs().
|
inlinestatic |
Definition at line 28 of file MantidHelpWindow.h.
Referenced by MantidHelpWindow(), showAlgorithm(), showConcept(), showCustomInterface(), showFitFunction(), and showPage().
|
private |
Definition at line 125 of file MantidHelpWindow.cpp.
References Mantid::Kernel::Logger::debug(), Mantid::API::g_log, and MantidQt::API::MantidDesktopServices::openUrl().
Referenced by showAlgorithm(), showPage(), and showWikiPage().
|
overridevirtual |
Convenience method for HelpWindowImpl::showAlgorithm(const string &, const int).
name | The name of the algorithm to show. If this is empty show the algorithm index. |
version | The version of the algorithm to jump do. The default value (-1) will show the top of the page. |
Reimplemented from MantidQt::API::MantidHelpInterface.
Definition at line 226 of file MantidHelpWindow.cpp.
References showAlgorithm().
|
overridevirtual |
Show the help page for a particular algorithm.
The page is picked using matching naming conventions.
name | The name of the algorithm to show. If this is empty show the algorithm index. |
version | The version of the algorithm to jump do. The default value (-1) will show the top of the page. |
Reimplemented from MantidQt::API::MantidHelpInterface.
Definition at line 180 of file MantidHelpWindow.cpp.
References MantidQt::MantidWidgets::BASE_URL(), helpWindowExists(), Mantid::Kernel::SingletonHolder< T >::Instance(), openWebpage(), showHelp(), and showWikiPage().
Referenced by showAlgorithm().
|
overridevirtual |
Show the help page for a particular concept.
name | The name of the concept to show. If this is empty show the concept index. |
Reimplemented from MantidQt::API::MantidHelpInterface.
Definition at line 260 of file MantidHelpWindow.cpp.
References showConcept().
|
overridevirtual |
Show the help page for a particular concept.
name | The name of the concept to show. If this is empty show the concept index. |
Reimplemented from MantidQt::API::MantidHelpInterface.
Definition at line 236 of file MantidHelpWindow.cpp.
References MantidQt::MantidWidgets::BASE_URL(), helpWindowExists(), showHelp(), and showWikiPage().
Referenced by showConcept().
|
overridevirtual |
Show the help page for a given custom interface.
name | The name of the interface to show |
area | :: the folder in the custom interface documentation directory |
section | :: the section of the interface to show |
Reimplemented from MantidQt::API::MantidHelpInterface.
Definition at line 305 of file MantidHelpWindow.cpp.
References showCustomInterface().
|
overridevirtual |
Show the help page for a given custom interface.
name | The name of the interface to show |
area | :: the folder in the custom interface documentation directory |
section | :: the section of the interface to show |
Reimplemented from MantidQt::API::MantidHelpInterface.
Definition at line 316 of file MantidHelpWindow.cpp.
References MantidQt::MantidWidgets::BASE_URL(), helpWindowExists(), and showHelp().
Referenced by showCustomInterface().
|
overridevirtual |
Show the help page for a particular fit function.
The page is picked using matching naming conventions.
name | The name of the fit function to show. If it is empty show the fit function index. |
Reimplemented from MantidQt::API::MantidHelpInterface.
Definition at line 296 of file MantidHelpWindow.cpp.
References showFitFunction().
|
overridevirtual |
Show the help page for a particular fit function.
The page is picked using matching naming conventions.
name | The name of the fit function to show. If it is empty show the fit function index. |
Reimplemented from MantidQt::API::MantidHelpInterface.
Definition at line 269 of file MantidHelpWindow.cpp.
References MantidQt::MantidWidgets::BASE_URL(), g_helpWindow, helpWindowExists(), showHelp(), and showWikiPage().
Referenced by showFitFunction().
|
private |
Definition at line 115 of file MantidHelpWindow.cpp.
References Mantid::Kernel::Logger::debug(), g_helpWindow, and Mantid::API::g_log.
Referenced by showAlgorithm(), showConcept(), showCustomInterface(), showFitFunction(), and showPage().
|
overridevirtual |
Reimplemented from MantidQt::API::MantidHelpInterface.
Definition at line 130 of file MantidHelpWindow.cpp.
References showPage().
|
overridevirtual |
Reimplemented from MantidQt::API::MantidHelpInterface.
Definition at line 132 of file MantidHelpWindow.cpp.
References MantidQt::MantidWidgets::DEFAULT_URL(), helpWindowExists(), openWebpage(), showHelp(), and MantidQt::MantidWidgets::WIKI_DEFAULT_URL().
|
overridevirtual |
Have the help window show a specific url.
If the url doesn't exist this just pops up the default view for the help.
url | The url to open. This should start with BASE_URL. If it is empty show the default page. |
Reimplemented from MantidQt::API::MantidHelpInterface.
Definition at line 154 of file MantidHelpWindow.cpp.
References showPage().
Referenced by showPage().
|
overridevirtual |
Convenience method for HelpWindowImpl::showWikiPage(const string &).
page | The name of the wiki page to show. If this is empty show the wiki homepage. |
Reimplemented from MantidQt::API::MantidHelpInterface.
Definition at line 169 of file MantidHelpWindow.cpp.
References showWikiPage().
|
overridevirtual |
Reimplemented from MantidQt::API::MantidHelpInterface.
Definition at line 156 of file MantidHelpWindow.cpp.
References openWebpage(), MantidQt::MantidWidgets::WIKI_BASE_URL(), and MantidQt::MantidWidgets::WIKI_DEFAULT_URL().
Referenced by showAlgorithm(), showConcept(), showFitFunction(), and showWikiPage().
|
overrideslot |
Perform any clean up on main window shutdown.
Can be called by the host process to indicate that it will close soon.
This closes the help window & releases the QProcess
Definition at line 340 of file MantidHelpWindow.cpp.
References g_helpWindow.
|
slot |
Definition at line 463 of file MantidHelpWindow.cpp.
References Mantid::API::g_log, and Mantid::Kernel::Logger::warning().
Referenced by MantidHelpWindow().
|
staticprivate |
The window that renders the help information.
Definition at line 58 of file MantidHelpWindow.h.
Referenced by MantidHelpWindow(), showFitFunction(), showHelp(), and shutdown().
|
private |
The full path of the cache file.
If it is not determined this is an empty string.
Definition at line 56 of file MantidHelpWindow.h.
Referenced by determineFileLocs(), and MantidHelpWindow().
|
private |
The full path of the collection file.
Definition at line 53 of file MantidHelpWindow.h.
Referenced by determineFileLocs(), findCollectionFile(), and MantidHelpWindow().
|
private |
Whether this is the very first startup of the helpwindow.
Definition at line 61 of file MantidHelpWindow.h.