Mantid
Loading...
Searching...
No Matches
MantidHelpWindow.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
4// NScD Oak Ridge National Laboratory, European Spallation Source,
5// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6// SPDX - License - Identifier: GPL - 3.0 +
7#pragma once
8
9#include "DllOption.h"
11#include <QPointer>
12#include <QWidget>
13#include <string>
14
15// forward declaration
16class QHelpEngine;
17class QString;
18class QWidget;
19class pqHelpWindow;
20
21namespace MantidQt {
22namespace MantidWidgets {
23
25 Q_OBJECT
26
27public:
28 static bool helpWindowExists() { return !g_helpWindow.isNull(); }
29
30 MantidHelpWindow(const Qt::WindowFlags &flags = Qt::WindowFlags());
31
32 void showPage(const std::string &url = std::string()) override;
33 void showPage(const QString &url) override;
34 void showPage(const QUrl &url) override;
35 void showWikiPage(const std::string &page = std::string()) override;
36 void showWikiPage(const QString &page) override;
37 void showAlgorithm(const std::string &name = std::string(), const int version = -1) override;
38 void showAlgorithm(const QString &name, const int version = -1) override;
39 void showConcept(const std::string &name) override;
40 void showConcept(const QString &name) override;
41 void showFitFunction(const std::string &name = std::string()) override;
42 void showFitFunction(const QString &name) override;
43 void showCustomInterface(const std::string &name = std::string(), const std::string &area = std::string(),
44 const std::string &section = std::string()) override;
45 void showCustomInterface(const QString &name, const QString &area = QString(),
46 const QString &section = QString()) override;
47
48private:
49 void showHelp(const QString &url);
50 void openWebpage(const QUrl &url);
51
53 std::string m_collectionFile;
56 std::string m_cacheFile;
58 static QPointer<pqHelpWindow> g_helpWindow;
59
62
63 void findCollectionFile(std::string &binDir);
64 void determineFileLocs();
65
66public slots:
68 void shutdown() override;
69 void warning(const QString &msg);
70};
71
72} // namespace MantidWidgets
73} // namespace MantidQt
#define EXPORT_OPT_MANTIDQT_COMMON
Definition: DllOption.h:15
bool m_firstRun
Whether this is the very first startup of the helpwindow.
std::string m_collectionFile
The full path of the collection file.
static QPointer< pqHelpWindow > g_helpWindow
The window that renders the help information.
std::string m_cacheFile
The full path of the cache file.
pqHelpWindow provides an assistant-like window for showing help provided by a QHelpEngine.
Definition: pqHelpWindow.h:73
The AlgorithmProgressDialogPresenter keeps track of the running algorithms and displays a progress ba...