Skip to content

Commit

Permalink
Refs #10563 Add "help" action to Reflectometry UI
Browse files Browse the repository at this point in the history
  • Loading branch information
Harry Jeffery committed Nov 17, 2014
1 parent 8a137c9 commit d431928
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
Expand Up @@ -117,6 +117,7 @@ namespace MantidQt
void on_actionTransfer_triggered();
void on_actionImportTable_triggered();
void on_actionExportTable_triggered();
void on_actionHelp_triggered();

void setModel(QString name);
void tableUpdated(const QModelIndex& topLeft, const QModelIndex& bottomRight);
Expand Down
Expand Up @@ -249,6 +249,7 @@
<addaction name="actionCutSelected"/>
<addaction name="actionPasteSelected"/>
<addaction name="actionClearSelected"/>
<addaction name="actionHelp"/>
</widget>
</item>
<item>
Expand Down Expand Up @@ -648,6 +649,24 @@
<string>Exports a table workspace to a .TBL file that can be used by the ISIS Reflectometry UI in older versions of Mantid.</string>
</property>
</action>
<action name="actionHelp">
<property name="icon">
<iconset resource="../../../../MantidPlot/icons/icons.qrc">
<normaloff>:/help.png</normaloff>:/help.png</iconset>
</property>
<property name="text">
<string>Help</string>
</property>
<property name="toolTip">
<string>Opens the documentation.</string>
</property>
<property name="whatsThis">
<string>Opens the interface's documentation in the Qt Help Browser.</string>
</property>
<property name="shortcut">
<string>F1</string>
</property>
</action>
</widget>
<tabstops>
<tabstop>comboSearchInstrument</tabstop>
Expand Down
9 changes: 9 additions & 0 deletions Code/Mantid/MantidQt/CustomInterfaces/src/QtReflMainView.cpp
Expand Up @@ -3,6 +3,7 @@
#include "MantidQtCustomInterfaces/ReflMainViewPresenter.h"
#include "MantidQtMantidWidgets/HintingLineEditFactory.h"
#include "MantidAPI/ITableWorkspace.h"
#include "MantidQtAPI/HelpWindow.h"
#include "MantidKernel/ConfigService.h"
#include <qinputdialog.h>
#include <qmessagebox.h>
Expand Down Expand Up @@ -257,6 +258,14 @@ namespace MantidQt
m_presenter->notify(IReflPresenter::ImportTableFlag);
}

/**
This slot opens the documentation when the "help" button has been pressed
*/
void QtReflMainView::on_actionHelp_triggered()
{
MantidQt::API::HelpWindow::showPage(this, QString("qthelp://org.mantidproject/doc/interfaces/ISIS_Reflectometry.html"));
}

/**
This slot notifies the presenter that the table has been updated/changed by the user
*/
Expand Down

0 comments on commit d431928

Please sign in to comment.