Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
mantidproject
mantid
Commits
c7539143
Commit
c7539143
authored
Mar 01, 2021
by
Peterson, Peter
Browse files
Add area to list of arguments
parent
29d1cda2
Changes
12
Hide whitespace changes
Inline
Side-by-side
qt/python/mantidqt/_common.sip
View file @
c7539143
...
...
@@ -328,7 +328,7 @@ public:
void showAlgorithmHelp(const QString &name, const int version=-1);
void showConceptHelp(const QString &name);
void showFitFunctionHelp(const QString &name=QString());
void showCustomInterfaceHelp(const QString &name);
void showCustomInterfaceHelp(const QString &name
, const QString &area=QString(), const QString §ion=QString()
);
void showWebPage(const QString &url);
void closeHelpWindow();
};
...
...
qt/scientific_interfaces/Muon/MuonAnalysis.cpp
View file @
c7539143
...
...
@@ -394,7 +394,8 @@ void MuonAnalysis::muonAnalysisHelpClicked() {
*/
void
MuonAnalysis
::
muonAnalysisHelpGroupingClicked
()
{
MantidQt
::
API
::
HelpWindow
::
showCustomInterface
(
nullptr
,
QString
(
"Muon Analysis"
),
QString
(
"grouping-options"
));
nullptr
,
QString
(
"Muon Analysis"
),
QString
(
""
),
QString
(
"grouping-options"
));
}
/**
...
...
qt/scientific_interfaces/Muon/MuonAnalysisOptionTab.cpp
View file @
c7539143
...
...
@@ -151,7 +151,7 @@ void MuonAnalysisOptionTab::initLayout() {
*/
void
MuonAnalysisOptionTab
::
muonAnalysisHelpSettingsClicked
()
{
MantidQt
::
API
::
HelpWindow
::
showCustomInterface
(
nullptr
,
QString
(
"Muon Analysis"
),
QString
(
"settings"
));
nullptr
,
QString
(
"Muon Analysis"
),
QString
(
""
),
QString
(
"settings"
));
}
/*
...
...
@@ -159,7 +159,7 @@ void MuonAnalysisOptionTab::muonAnalysisHelpSettingsClicked() {
*/
void
MuonAnalysisOptionTab
::
rebinHelpClicked
()
{
MantidQt
::
API
::
HelpWindow
::
showCustomInterface
(
nullptr
,
QString
(
"Muon Analysis"
),
QString
(
"data-binning"
));
nullptr
,
QString
(
"Muon Analysis"
),
QString
(
""
),
QString
(
"data-binning"
));
}
/**
...
...
qt/scientific_interfaces/Muon/MuonAnalysisResultTableTab.cpp
View file @
c7539143
...
...
@@ -102,7 +102,7 @@ MuonAnalysisResultTableTab::MuonAnalysisResultTableTab(Ui::MuonAnalysis &uiForm)
*/
void
MuonAnalysisResultTableTab
::
helpResultsClicked
()
{
MantidQt
::
API
::
HelpWindow
::
showCustomInterface
(
nullptr
,
QString
(
"Muon Analysis"
),
QString
(
"results-table"
));
nullptr
,
QString
(
"Muon Analysis"
),
QString
(
""
),
QString
(
"results-table"
));
}
/**
...
...
qt/widgets/common/inc/MantidQtWidgets/Common/HelpWindow.h
View file @
c7539143
...
...
@@ -33,10 +33,12 @@ public:
static
void
showFitFunction
(
QWidget
*
parent
,
const
std
::
string
&
name
=
std
::
string
());
static
void
showCustomInterface
(
QWidget
*
parent
,
const
QString
&
name
,
const
QString
&
area
=
QString
(),
const
QString
&
section
=
QString
());
static
void
showCustomInterface
(
QWidget
*
parent
,
const
std
::
string
&
name
=
std
::
string
(),
const
std
::
string
&
area
=
std
::
string
(),
const
std
::
string
&
section
=
std
::
string
());
};
}
// namespace API
}
// namespace MantidQt
\ No newline at end of file
}
// namespace MantidQt
qt/widgets/common/inc/MantidQtWidgets/Common/InterfaceManager.h
View file @
c7539143
...
...
@@ -101,7 +101,9 @@ public:
void
showFitFunctionHelp
(
const
QString
&
name
=
QString
());
/// @param name of interface to show help for
void
showCustomInterfaceHelp
(
const
QString
&
name
);
void
showCustomInterfaceHelp
(
const
QString
&
name
,
const
QString
&
area
=
QString
(),
const
QString
&
section
=
QString
());
/// @param url of web page to open in browser
void
showWebPage
(
const
QString
&
url
);
...
...
qt/widgets/common/inc/MantidQtWidgets/Common/MantidHelpInterface.h
View file @
c7539143
...
...
@@ -40,8 +40,10 @@ public:
virtual
void
showFitFunction
(
const
std
::
string
&
name
=
std
::
string
());
virtual
void
showFitFunction
(
const
QString
&
name
);
virtual
void
showCustomInterface
(
const
std
::
string
&
name
,
const
std
::
string
&
area
=
std
::
string
(),
const
std
::
string
&
section
=
std
::
string
());
virtual
void
showCustomInterface
(
const
QString
&
name
,
const
QString
&
area
=
QString
(),
const
QString
&
section
=
QString
());
public
slots
:
...
...
qt/widgets/common/inc/MantidQtWidgets/Common/MantidHelpWindow.h
View file @
c7539143
...
...
@@ -44,8 +44,9 @@ public:
void
showFitFunction
(
const
std
::
string
&
name
=
std
::
string
())
override
;
void
showFitFunction
(
const
QString
&
name
)
override
;
void
showCustomInterface
(
const
std
::
string
&
name
=
std
::
string
(),
const
std
::
string
&
area
=
std
::
string
(),
const
std
::
string
&
section
=
std
::
string
())
override
;
void
showCustomInterface
(
const
QString
&
name
,
void
showCustomInterface
(
const
QString
&
name
,
const
QString
&
area
=
QString
(),
const
QString
&
section
=
QString
())
override
;
private:
...
...
@@ -73,4 +74,4 @@ public slots:
};
}
// namespace MantidWidgets
}
// namespace MantidQt
\ No newline at end of file
}
// namespace MantidQt
qt/widgets/common/src/HelpWindow.cpp
View file @
c7539143
...
...
@@ -117,12 +117,15 @@ void HelpWindow::showFitFunction(QWidget *parent, const std::string &name) {
}
void
HelpWindow
::
showCustomInterface
(
QWidget
*
parent
,
const
std
::
string
&
name
,
const
std
::
string
&
area
,
const
std
::
string
&
section
)
{
showCustomInterface
(
parent
,
QString
::
fromStdString
(
name
),
QString
::
fromStdString
(
area
),
QString
::
fromStdString
(
section
));
}
void
HelpWindow
::
showCustomInterface
(
QWidget
*
parent
,
const
QString
&
name
,
const
QString
&
area
,
const
QString
&
section
)
{
InterfaceManager
interfaceManager
;
MantidHelpInterface
*
gui
=
interfaceManager
.
createHelpWindow
();
...
...
@@ -132,6 +135,9 @@ void HelpWindow::showCustomInterface(QWidget *parent, const QString &name,
}
else
{
// Open online help
QString
baseUrl
=
"https://docs.mantidproject.org/interfaces/"
;
if
(
!
area
.
toStdString
().
empty
())
{
baseUrl
+=
area
+
"/"
;
}
QString
url
=
baseUrl
+
name
+
".html"
;
MantidDesktopServices
::
openUrl
(
QUrl
(
url
));
g_log
.
debug
(
"Opening online help page:
\n
"
+
url
.
toStdString
());
...
...
qt/widgets/common/src/InterfaceManager.cpp
View file @
c7539143
...
...
@@ -283,9 +283,11 @@ void InterfaceManager::showFitFunctionHelp(const QString &name) {
window
->
showFitFunction
(
name
);
}
void
InterfaceManager
::
showCustomInterfaceHelp
(
const
QString
&
name
)
{
void
InterfaceManager
::
showCustomInterfaceHelp
(
const
QString
&
name
,
const
QString
&
area
,
const
QString
&
section
)
{
auto
window
=
createHelpWindow
();
window
->
showCustomInterface
(
name
);
window
->
showCustomInterface
(
name
,
area
,
section
);
}
void
InterfaceManager
::
showWebPage
(
const
QString
&
url
)
{
...
...
qt/widgets/common/src/MantidHelpInterface.cpp
View file @
c7539143
...
...
@@ -56,14 +56,18 @@ void MantidHelpInterface::showFitFunction(const QString &name) {
}
void
MantidHelpInterface
::
showCustomInterface
(
const
std
::
string
&
name
,
const
std
::
string
&
area
,
const
std
::
string
&
section
)
{
UNUSED_ARG
(
name
);
UNUSED_ARG
(
area
);
UNUSED_ARG
(
section
);
}
void
MantidHelpInterface
::
showCustomInterface
(
const
QString
&
name
,
const
QString
&
area
,
const
QString
&
section
)
{
UNUSED_ARG
(
name
);
UNUSED_ARG
(
area
);
UNUSED_ARG
(
section
);
}
...
...
qt/widgets/common/src/MantidHelpWindow.cpp
View file @
c7539143
...
...
@@ -325,8 +325,10 @@ void MantidHelpWindow::showFitFunction(const QString &name) {
* @param section :: the section of the interface to show
*/
void
MantidHelpWindow
::
showCustomInterface
(
const
QString
&
name
,
const
QString
&
area
,
const
QString
&
section
)
{
this
->
showCustomInterface
(
name
.
toStdString
(),
section
.
toStdString
());
this
->
showCustomInterface
(
name
.
toStdString
(),
area
.
toStdString
(),
section
.
toStdString
());
}
/**
...
...
@@ -336,10 +338,14 @@ void MantidHelpWindow::showCustomInterface(const QString &name,
* @param section :: the section of the interface to show
*/
void
MantidHelpWindow
::
showCustomInterface
(
const
std
::
string
&
name
,
const
std
::
string
&
area
,
const
std
::
string
&
section
)
{
if
(
bool
(
g_helpWindow
))
{
QString
url
(
BASE_URL
);
url
+=
"interfaces/"
;
if
(
!
area
.
empty
())
{
url
+=
QString
::
fromStdString
(
area
)
+
"/"
;
}
if
(
name
.
empty
())
{
url
+=
"index.html"
;
}
else
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment