27#include <QSignalMapper>
90 if (!
m_uiForm.runs->getText().isEmpty())
107 if (!selectedPath.isEmpty()) {
112 QLineEdit *lineEdit =
dynamic_cast<QLineEdit *
>(
m_tied_properties[filePropName]);
115 throw std::runtime_error(
"Widget of the file property was not found");
117 lineEdit->setText(selectedPath.trimmed());
126 QString nexusFileName =
m_uiForm.runs->getFirstFilename();
127 QFileInfo file(nexusFileName);
128 if (!file.exists()) {
137 alg->setPropertyValue(
"Filename", nexusFileName.toStdString());
138 alg->setPropertyValue(
"OutputWorkspace",
"PlotAsymmetryByLogValueDialog_tmp");
139 alg->setPropertyValue(
"SpectrumList",
142 if (alg->isExecuted()) {
143 std::string wsName = alg->getPropertyValue(
"OutputWorkspace");
151 if (gws->getNumberOfEntries() < 2)
153 mws = std::dynamic_pointer_cast<Mantid::API::MatrixWorkspace>(
156 const std::vector<Mantid::Kernel::Property *> &props = mws->run().getLogData();
159 for (
auto const &name : gws->getNames()) {
166 for (
auto prop : props) {
167 m_uiForm.logBox->addItem(QString::fromStdString(prop->name()));
170 QString displayed(
"");
175 if (!displayed.isEmpty()) {
183 }
catch (std::exception &) {
194 m_uiForm.dtcFileContainer->setVisible(deadTimeTypeIndex == 2);
#define DECLARE_DIALOG(classname)
std::map< DeltaEMode::Type, std::string > index
This class should be the basis for all customised algorithm dialogs.
QHash< QString, QWidget * > m_tied_properties
A list pointers to the widget for each property.
bool isForScript() const
Get the usage boolean value.
void fillAndSetComboBox(const QString &propName, QComboBox *optionsBox) const
Fill a combo box for the named algorithm's allowed values.
QString openFileDialog(const QString &propName)
Open a file dialog to select a file.
QLayout * createDefaultButtonLayout(const QString &helpText=QString("?"), const QString &loadText=QString("Run"), const QString &cancelText=QString("Close"), const QString &keepOpenText=QString("Keep Open"))
Create a row layout of buttons with specified text.
QWidget * tie(QWidget *widget, const QString &property, QLayout *parent_layout=nullptr, bool readHistory=true)
Tie a widget to a property.
This class gives specialised dialog for the LoadRaw algorithm.
PlotAsymmetryByLogValueDialog(QWidget *parent=nullptr)
Constructor.
QSignalMapper * browseButtonMapper
Maps Browse buttons to file properties.
Ui::PlotAsymmetryByLogValueDialog m_uiForm
void openFileDialog(const QString &filePropName)
Opens a file dialog.
~PlotAsymmetryByLogValueDialog() override
Destructor.
void showHideDeadTimeFileWidget(int deadTimeTypeIndex)
Show or hide Dead Time file widget depending on which Dead Time type is selected.
void initLayout() override
Create the layout.
void fillLogBox()
Fill m_uiForm.logBox with names of the log values read from one of the input files.
static T & Instance()
Return a reference to the Singleton instance, creating it if it does not already exist Creation is do...
std::shared_ptr< IAlgorithm > IAlgorithm_sptr
shared pointer to Mantid::API::IAlgorithm
std::shared_ptr< WorkspaceGroup > WorkspaceGroup_sptr
shared pointer to Mantid::API::WorkspaceGroup
std::shared_ptr< Workspace > Workspace_sptr
shared pointer to Mantid::API::Workspace
std::shared_ptr< MatrixWorkspace > MatrixWorkspace_sptr
shared pointer to the matrix workspace base class