Mantid
Loading...
Searching...
No Matches
Public Slots | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
MantidQt::MantidWidgets::MantidHelpWindow Class Reference

#include <MantidHelpWindow.h>

Inheritance diagram for MantidQt::MantidWidgets::MantidHelpWindow:
MantidQt::API::MantidHelpInterface

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 &section=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 &section=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 &section=QString())
 
virtual void showCustomInterface (const std::string &name, const std::string &area=std::string(), const std::string &section=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< pqHelpWindowg_helpWindow
 The window that renders the help information. More...
 

Detailed Description

Definition at line 24 of file MantidHelpWindow.h.

Constructor & Destructor Documentation

◆ MantidHelpWindow()

MantidQt::MantidWidgets::MantidHelpWindow::MantidHelpWindow ( const Qt::WindowFlags &  flags = Qt::WindowFlags())

Member Function Documentation

◆ determineFileLocs()

void MantidQt::MantidWidgets::MantidHelpWindow::determineFileLocs ( )
private

◆ findCollectionFile()

void MantidQt::MantidWidgets::MantidHelpWindow::findCollectionFile ( std::string &  binDir)
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

Parameters
binDirThe 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().

◆ helpWindowExists()

static bool MantidQt::MantidWidgets::MantidHelpWindow::helpWindowExists ( )
inlinestatic

◆ openWebpage()

void MantidQt::MantidWidgets::MantidHelpWindow::openWebpage ( const QUrl &  url)
private

◆ showAlgorithm() [1/2]

void MantidQt::MantidWidgets::MantidHelpWindow::showAlgorithm ( const QString &  name,
const int  version = -1 
)
overridevirtual

Convenience method for HelpWindowImpl::showAlgorithm(const string &, const int).

Parameters
nameThe name of the algorithm to show. If this is empty show the algorithm index.
versionThe 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().

◆ showAlgorithm() [2/2]

void MantidQt::MantidWidgets::MantidHelpWindow::showAlgorithm ( const std::string &  name = std::string(),
const int  version = -1 
)
overridevirtual

Show the help page for a particular algorithm.

The page is picked using matching naming conventions.

Parameters
nameThe name of the algorithm to show. If this is empty show the algorithm index.
versionThe 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().

◆ showConcept() [1/2]

void MantidQt::MantidWidgets::MantidHelpWindow::showConcept ( const QString &  name)
overridevirtual

Show the help page for a particular concept.

Parameters
nameThe 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().

◆ showConcept() [2/2]

void MantidQt::MantidWidgets::MantidHelpWindow::showConcept ( const std::string &  name)
overridevirtual

Show the help page for a particular concept.

Parameters
nameThe 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().

◆ showCustomInterface() [1/2]

void MantidQt::MantidWidgets::MantidHelpWindow::showCustomInterface ( const QString &  name,
const QString &  area = QString(),
const QString &  section = QString() 
)
overridevirtual

Show the help page for a given custom interface.

Parameters
nameThe 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().

◆ showCustomInterface() [2/2]

void MantidQt::MantidWidgets::MantidHelpWindow::showCustomInterface ( const std::string &  name = std::string(),
const std::string &  area = std::string(),
const std::string &  section = std::string() 
)
overridevirtual

Show the help page for a given custom interface.

Parameters
nameThe 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().

◆ showFitFunction() [1/2]

void MantidQt::MantidWidgets::MantidHelpWindow::showFitFunction ( const QString &  name)
overridevirtual

Show the help page for a particular fit function.

The page is picked using matching naming conventions.

Parameters
nameThe 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().

◆ showFitFunction() [2/2]

void MantidQt::MantidWidgets::MantidHelpWindow::showFitFunction ( const std::string &  name = std::string())
overridevirtual

Show the help page for a particular fit function.

The page is picked using matching naming conventions.

Parameters
nameThe 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().

◆ showHelp()

void MantidQt::MantidWidgets::MantidHelpWindow::showHelp ( const QString &  url)
private

◆ showPage() [1/3]

void MantidQt::MantidWidgets::MantidHelpWindow::showPage ( const QString &  url)
overridevirtual

Reimplemented from MantidQt::API::MantidHelpInterface.

Definition at line 130 of file MantidHelpWindow.cpp.

References showPage().

◆ showPage() [2/3]

void MantidQt::MantidWidgets::MantidHelpWindow::showPage ( const QUrl &  url)
overridevirtual

◆ showPage() [3/3]

void MantidQt::MantidWidgets::MantidHelpWindow::showPage ( const std::string &  url = std::string())
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.

Parameters
urlThe 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().

◆ showWikiPage() [1/2]

void MantidQt::MantidWidgets::MantidHelpWindow::showWikiPage ( const QString &  page)
overridevirtual

Convenience method for HelpWindowImpl::showWikiPage(const string &).

Parameters
pageThe 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().

◆ showWikiPage() [2/2]

void MantidQt::MantidWidgets::MantidHelpWindow::showWikiPage ( const std::string &  page = std::string())
overridevirtual

◆ shutdown

void MantidQt::MantidWidgets::MantidHelpWindow::shutdown ( )
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.

◆ warning

void MantidQt::MantidWidgets::MantidHelpWindow::warning ( const QString &  msg)
slot

Definition at line 463 of file MantidHelpWindow.cpp.

References Mantid::API::g_log, and Mantid::Kernel::Logger::warning().

Referenced by MantidHelpWindow().

Member Data Documentation

◆ g_helpWindow

QPointer< pqHelpWindow > MantidQt::MantidWidgets::MantidHelpWindow::g_helpWindow
staticprivate

The window that renders the help information.

Definition at line 58 of file MantidHelpWindow.h.

Referenced by MantidHelpWindow(), showFitFunction(), showHelp(), and shutdown().

◆ m_cacheFile

std::string MantidQt::MantidWidgets::MantidHelpWindow::m_cacheFile
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().

◆ m_collectionFile

std::string MantidQt::MantidWidgets::MantidHelpWindow::m_collectionFile
private

The full path of the collection file.

Definition at line 53 of file MantidHelpWindow.h.

Referenced by determineFileLocs(), findCollectionFile(), and MantidHelpWindow().

◆ m_firstRun

bool MantidQt::MantidWidgets::MantidHelpWindow::m_firstRun
private

Whether this is the very first startup of the helpwindow.

Definition at line 61 of file MantidHelpWindow.h.


The documentation for this class was generated from the following files: