From d6ef0ab66a6fee7c2af0baa6d41ba3bb7e8b7ab7 Mon Sep 17 00:00:00 2001 From: Keith Brown Date: Fri, 18 Oct 2013 14:08:02 +0100 Subject: [PATCH] Altered LoadAscii Cumstom dialog The LoadAscii Dialog now changes depending on the version being invoked. Version 2 has the new comment indicator feild Refs #7732 --- .../inc/MantidQtCustomDialogs/LoadAsciiDialog.h | 1 + .../MantidQt/CustomDialogs/src/LoadAsciiDialog.cpp | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/Code/Mantid/MantidQt/CustomDialogs/inc/MantidQtCustomDialogs/LoadAsciiDialog.h b/Code/Mantid/MantidQt/CustomDialogs/inc/MantidQtCustomDialogs/LoadAsciiDialog.h index d3fe0c5ff351..328401a5f8fd 100644 --- a/Code/Mantid/MantidQt/CustomDialogs/inc/MantidQtCustomDialogs/LoadAsciiDialog.h +++ b/Code/Mantid/MantidQt/CustomDialogs/inc/MantidQtCustomDialogs/LoadAsciiDialog.h @@ -70,6 +70,7 @@ protected slots: /* GUI components */ QLineEdit *m_lineFilename; QLineEdit *m_lineOutputWorkspace; + QLineEdit *m_lineCommentIndicator; QComboBox *m_separatorBox; }; diff --git a/Code/Mantid/MantidQt/CustomDialogs/src/LoadAsciiDialog.cpp b/Code/Mantid/MantidQt/CustomDialogs/src/LoadAsciiDialog.cpp index 55cb4a6ae0a9..64a0445276ca 100644 --- a/Code/Mantid/MantidQt/CustomDialogs/src/LoadAsciiDialog.cpp +++ b/Code/Mantid/MantidQt/CustomDialogs/src/LoadAsciiDialog.cpp @@ -55,10 +55,20 @@ void LoadAsciiDialog::initLayout() paramsLayout->addWidget(m_separatorBox,2,1); tie(m_separatorBox,"Separator",paramsLayout); + if (getAlgorithm()->version() == 2) + { + label = new QLabel(tr("CommentIndicator")); + m_lineCommentIndicator = new QLineEdit; + label->setBuddy(m_lineCommentIndicator); + paramsLayout->addWidget(label,3,0); + paramsLayout->addWidget(m_lineCommentIndicator,3,1); + tie(m_lineCommentIndicator, "CommentIndicator", paramsLayout); + } + QComboBox *unitBox = new QComboBox; fillAndSetComboBox("Unit",unitBox ); - paramsLayout->addWidget(new QLabel("Unit"),3,0); - paramsLayout->addWidget(unitBox ,3,1); + paramsLayout->addWidget(new QLabel("Unit"),4,0); + paramsLayout->addWidget(unitBox ,4,1); tie(unitBox ,"Unit",paramsLayout); QVBoxLayout *mainLayout = new QVBoxLayout;