-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Custom dialog enables users to enter parameters for ConvertToMDEvents once.
- Loading branch information
1 parent
c54fb8d
commit 9708cb2
Showing
7 changed files
with
307 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
...antid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/CreateMDWorkspaceAlgDialog.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#ifndef MANTIDQTCUSTOMINTERFACES_CREATEMDWORKSPACE_ALG_DIALOG_H_ | ||
#define MANTIDQTCUSTOMINTERFACES_CREATEMDWORKSPACE_ALG_DIALOG_H_ | ||
|
||
#include <QDialog> | ||
#include "ui_CreateMDWorkspaceAlgDialog.h" | ||
|
||
/// Code-behind for CreateMDWorkspaceAlgDialog. | ||
class CreateMDWorkspaceAlgDialog : public QDialog | ||
{ | ||
Q_OBJECT | ||
|
||
public: | ||
|
||
CreateMDWorkspaceAlgDialog(); | ||
virtual ~CreateMDWorkspaceAlgDialog(); | ||
|
||
QString getQDimension() const; | ||
QString getAnalysisMode() const; | ||
QString getOtherDimensions() const; | ||
QString getMaxExtents() const; | ||
QString getMinExtents() const; | ||
bool getPreprocessedEvents() const; | ||
|
||
|
||
|
||
private: | ||
|
||
Ui::CreateMDWorkspaceAlgDialog m_uiForm; | ||
|
||
}; | ||
|
||
|
||
#endif |
172 changes: 172 additions & 0 deletions
172
...ntid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/CreateMDWorkspaceAlgDialog.ui
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,172 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ui version="4.0"> | ||
<class>CreateMDWorkspaceAlgDialog</class> | ||
<widget class="QDialog" name="CreateMDWorkspaceAlgDialog"> | ||
<property name="geometry"> | ||
<rect> | ||
<x>0</x> | ||
<y>0</y> | ||
<width>456</width> | ||
<height>205</height> | ||
</rect> | ||
</property> | ||
<property name="windowTitle"> | ||
<string>Dialog</string> | ||
</property> | ||
<layout class="QFormLayout" name="formLayout_2"> | ||
<property name="fieldGrowthPolicy"> | ||
<enum>QFormLayout::AllNonFixedFieldsGrow</enum> | ||
</property> | ||
<item row="1" column="0"> | ||
<widget class="QLabel" name="label"> | ||
<property name="toolTip"> | ||
<string>You can to transfer source workspace dimensions into target worskpace directly (NoQ) or transform into mod(Q) (1 dimension) or QxQyQz (3 dimensions) in Q space</string> | ||
</property> | ||
<property name="text"> | ||
<string>Q Dimensions</string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item row="1" column="1"> | ||
<widget class="QComboBox" name="combo_q_dimensions"/> | ||
</item> | ||
<item row="2" column="0"> | ||
<widget class="QLabel" name="label_2"> | ||
<property name="toolTip"> | ||
<string>You can analyze neutron energy transfer in direct, indirect or elastic mode. The analysis mode has to correspond to experimenal set up.</string> | ||
</property> | ||
<property name="text"> | ||
<string>dE Analysis Mode</string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item row="2" column="1"> | ||
<widget class="QComboBox" name="combo_analysis_mode"/> | ||
</item> | ||
<item row="3" column="0"> | ||
<widget class="QLabel" name="label_5"> | ||
<property name="toolTip"> | ||
<string>List(comma separated) of additional to Q (orthogonal) dimensions in the target workspace.</string> | ||
</property> | ||
<property name="text"> | ||
<string>Other Dimensions</string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item row="3" column="1"> | ||
<widget class="QLineEdit" name="txt_other_dimensions"/> | ||
</item> | ||
<item row="4" column="1"> | ||
<widget class="QCheckBox" name="ck_use_preprocessed_detectors"> | ||
<property name="text"> | ||
<string>Use Pre-processed detectors</string> | ||
</property> | ||
<property name="checked"> | ||
<bool>true</bool> | ||
</property> | ||
</widget> | ||
</item> | ||
<item row="5" column="0"> | ||
<widget class="QLabel" name="label_3"> | ||
<property name="toolTip"> | ||
<string>An array of size: | ||
|
||
a) 1+N_OtherDimensions if the first dimension (QDimensions property) is equal to |Q| or | ||
|
||
b) 3+N_OtherDimensions if the first (3) dimensions (QDimensions property) equal QxQyQz or | ||
|
||
c) (1 or 2)+N_OtherDimesnions if QDimesnins property is empty. | ||
|
||
In case c) the target workspace dimensions are defined by the units of the input workspace axis | ||
|
||
|
||
This array contains minimal values for all dimensions. | ||
|
||
Momentum values expected to be in [A^-1] and energy transfer (if any) expressed in [meV] | ||
|
||
All other values are in uints they are in their log files | ||
|
||
Values lower than the specified one will be ignored | ||
|
||
If a minimal target workspace range is higher than the one specified here, the target workspace range will be used instead | ||
</string> | ||
</property> | ||
<property name="text"> | ||
<string>Min Values</string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item row="5" column="1"> | ||
<widget class="QLineEdit" name="txt_min_values"> | ||
<property name="toolTip"> | ||
<string>An array of the same size and the same units as MinValues array | ||
Values higher then the specified by this array will be ignored | ||
If a maximal target workspace range is lower, then one of specified here, the target workspace range will be used instead.</string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item row="6" column="0"> | ||
<widget class="QLabel" name="label_4"> | ||
<property name="text"> | ||
<string>Max Values</string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item row="6" column="1"> | ||
<widget class="QLineEdit" name="txt_max_values"/> | ||
</item> | ||
<item row="7" column="1"> | ||
<widget class="QDialogButtonBox" name="buttonBox"> | ||
<property name="orientation"> | ||
<enum>Qt::Horizontal</enum> | ||
</property> | ||
<property name="standardButtons"> | ||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> | ||
</property> | ||
</widget> | ||
</item> | ||
<item row="0" column="1"> | ||
<widget class="QLabel" name="label_6"> | ||
<property name="text"> | ||
<string>Settings made here will be applied to every converted workspace.</string> | ||
</property> | ||
</widget> | ||
</item> | ||
</layout> | ||
</widget> | ||
<resources/> | ||
<connections> | ||
<connection> | ||
<sender>buttonBox</sender> | ||
<signal>accepted()</signal> | ||
<receiver>CreateMDWorkspaceAlgDialog</receiver> | ||
<slot>accept()</slot> | ||
<hints> | ||
<hint type="sourcelabel"> | ||
<x>248</x> | ||
<y>254</y> | ||
</hint> | ||
<hint type="destinationlabel"> | ||
<x>157</x> | ||
<y>274</y> | ||
</hint> | ||
</hints> | ||
</connection> | ||
<connection> | ||
<sender>buttonBox</sender> | ||
<signal>rejected()</signal> | ||
<receiver>CreateMDWorkspaceAlgDialog</receiver> | ||
<slot>reject()</slot> | ||
<hints> | ||
<hint type="sourcelabel"> | ||
<x>316</x> | ||
<y>260</y> | ||
</hint> | ||
<hint type="destinationlabel"> | ||
<x>286</x> | ||
<y>274</y> | ||
</hint> | ||
</hints> | ||
</connection> | ||
</connections> | ||
</ui> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
Code/Mantid/MantidQt/CustomInterfaces/src/CreateMDWorkspaceAlgDialog.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
#include "MantidQtCustomInterfaces/CreateMDWorkspaceAlgDialog.h" | ||
#include <QComboBox> | ||
#include <QLineEdit> | ||
#include <QCheckBox> | ||
|
||
CreateMDWorkspaceAlgDialog::CreateMDWorkspaceAlgDialog() | ||
{ | ||
m_uiForm.setupUi(this); | ||
|
||
connect(m_uiForm.buttonBox, SIGNAL(accepted()), this, SLOT(accept())); | ||
connect(m_uiForm.buttonBox, SIGNAL(rejected()), this, SLOT(reject())); | ||
|
||
m_uiForm.combo_q_dimensions->addItem("|Q|"); | ||
m_uiForm.combo_q_dimensions->addItem("QxQyQz"); | ||
|
||
m_uiForm.combo_analysis_mode->addItem("Direct"); | ||
m_uiForm.combo_analysis_mode->addItem("Indirect"); | ||
m_uiForm.combo_analysis_mode->addItem("InElastic"); | ||
|
||
this->setWindowTitle("Set MDWorkspace Creation Parameters"); | ||
} | ||
|
||
QString CreateMDWorkspaceAlgDialog::getQDimension() const | ||
{ | ||
return m_uiForm.combo_q_dimensions->currentText(); | ||
} | ||
|
||
QString CreateMDWorkspaceAlgDialog::getAnalysisMode() const | ||
{ | ||
return m_uiForm.combo_analysis_mode->currentText(); | ||
} | ||
|
||
QString CreateMDWorkspaceAlgDialog::getOtherDimensions() const | ||
{ | ||
return m_uiForm.txt_other_dimensions->text(); | ||
} | ||
|
||
QString CreateMDWorkspaceAlgDialog::getMaxExtents() const | ||
{ | ||
return m_uiForm.txt_max_values->text(); | ||
} | ||
|
||
QString CreateMDWorkspaceAlgDialog::getMinExtents() const | ||
{ | ||
return m_uiForm.txt_min_values->text(); | ||
} | ||
|
||
bool CreateMDWorkspaceAlgDialog::getPreprocessedEvents() const | ||
{ | ||
return m_uiForm.ck_use_preprocessed_detectors->isChecked(); | ||
} | ||
|
||
CreateMDWorkspaceAlgDialog::~CreateMDWorkspaceAlgDialog() | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters