Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refs #10443
- Loading branch information
Showing
7 changed files
with
321 additions
and
23 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
32 changes: 32 additions & 0 deletions
32
Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/IndirectSassena.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,32 @@ | ||
#ifndef MANTIDQTCUSTOMINTERFACES_INDIRECTSASSENA_H_ | ||
#define MANTIDQTCUSTOMINTERFACES_INDIRECTSASSENA_H_ | ||
|
||
#include "ui_IndirectSassena.h" | ||
#include "MantidQtCustomInterfaces/IndirectSimulationTab.h" | ||
|
||
namespace MantidQt | ||
{ | ||
namespace CustomInterfaces | ||
{ | ||
class DLLExport IndirectSassena : public IndirectSimulationTab | ||
{ | ||
Q_OBJECT | ||
|
||
public: | ||
IndirectSassena(QWidget * parent = 0); | ||
|
||
QString help() { return "IndirectSassena"; }; | ||
bool validate(); | ||
void run(); | ||
/// Load default settings into the interface | ||
void loadSettings(const QSettings& settings); | ||
|
||
private: | ||
// The ui form | ||
Ui::IndirectSassena m_uiForm; | ||
|
||
}; | ||
} // namespace CustomInterfaces | ||
} // namespace MantidQt | ||
|
||
#endif //MANTIDQTCUSTOMINTERFACES_INDIRECTSASSENA_H_ |
209 changes: 209 additions & 0 deletions
209
Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/IndirectSassena.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,209 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ui version="4.0"> | ||
<class>IndirectSassena</class> | ||
<widget class="QWidget" name="IndirectSassena"> | ||
<property name="geometry"> | ||
<rect> | ||
<x>0</x> | ||
<y>0</y> | ||
<width>444</width> | ||
<height>251</height> | ||
</rect> | ||
</property> | ||
<property name="windowTitle"> | ||
<string>Form</string> | ||
</property> | ||
<layout class="QVBoxLayout" name="verticalLayout"> | ||
<item> | ||
<widget class="QGroupBox" name="gbInputFile"> | ||
<property name="title"> | ||
<string>Input File</string> | ||
</property> | ||
<layout class="QGridLayout" name="gridLayout"> | ||
<property name="margin"> | ||
<number>6</number> | ||
</property> | ||
<item row="0" column="1"> | ||
<widget class="MantidQt::MantidWidgets::MWRunFiles" name="mwInputFile" native="true"> | ||
<property name="sizePolicy"> | ||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed"> | ||
<horstretch>0</horstretch> | ||
<verstretch>0</verstretch> | ||
</sizepolicy> | ||
</property> | ||
<property name="label" stdset="0"> | ||
<string/> | ||
</property> | ||
<property name="fileExtensions" stdset="0"> | ||
<stringlist> | ||
<string>.h5</string> | ||
<string>.hd5</string> | ||
</stringlist> | ||
</property> | ||
</widget> | ||
</item> | ||
<item row="0" column="0"> | ||
<widget class="QLabel" name="lblSample"> | ||
<property name="text"> | ||
<string>Sample File:</string> | ||
</property> | ||
</widget> | ||
</item> | ||
</layout> | ||
</widget> | ||
</item> | ||
<item> | ||
<widget class="QGroupBox" name="gbOptions"> | ||
<property name="title"> | ||
<string>GroupBox</string> | ||
</property> | ||
<layout class="QGridLayout" name="gridLayout_2"> | ||
<item row="0" column="0"> | ||
<widget class="QLabel" name="lblTimeUnit"> | ||
<property name="text"> | ||
<string>Time Unit:</string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item row="0" column="1"> | ||
<widget class="QDoubleSpinBox" name="sbTimeUnit"> | ||
<property name="maximum"> | ||
<double>1000.000000000000000</double> | ||
</property> | ||
<property name="value"> | ||
<double>1.000000000000000</double> | ||
</property> | ||
</widget> | ||
</item> | ||
<item row="1" column="0" colspan="2"> | ||
<widget class="QCheckBox" name="cbSortQ"> | ||
<property name="text"> | ||
<string>Sort by Q Vectors</string> | ||
</property> | ||
</widget> | ||
</item> | ||
</layout> | ||
</widget> | ||
</item> | ||
<item> | ||
<spacer name="verticalSpacer"> | ||
<property name="orientation"> | ||
<enum>Qt::Vertical</enum> | ||
</property> | ||
<property name="sizeHint" stdset="0"> | ||
<size> | ||
<width>20</width> | ||
<height>40</height> | ||
</size> | ||
</property> | ||
</spacer> | ||
</item> | ||
<item> | ||
<widget class="QGroupBox" name="gbOutput"> | ||
<property name="sizePolicy"> | ||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed"> | ||
<horstretch>0</horstretch> | ||
<verstretch>0</verstretch> | ||
</sizepolicy> | ||
</property> | ||
<property name="title"> | ||
<string>Output Options</string> | ||
</property> | ||
<layout class="QHBoxLayout" name="horizontalLayout"> | ||
<item> | ||
<widget class="QCheckBox" name="chkVerbose"> | ||
<property name="enabled"> | ||
<bool>true</bool> | ||
</property> | ||
<property name="text"> | ||
<string>Verbose</string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item> | ||
<spacer name="spOutput1"> | ||
<property name="orientation"> | ||
<enum>Qt::Horizontal</enum> | ||
</property> | ||
<property name="sizeHint" stdset="0"> | ||
<size> | ||
<width>40</width> | ||
<height>20</height> | ||
</size> | ||
</property> | ||
</spacer> | ||
</item> | ||
<item> | ||
<widget class="QLabel" name="lblPlot"> | ||
<property name="text"> | ||
<string>Plot Result: </string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item> | ||
<widget class="QComboBox" name="cbPlot"> | ||
<item> | ||
<property name="text"> | ||
<string>None</string> | ||
</property> | ||
</item> | ||
<item> | ||
<property name="text"> | ||
<string>Spectrum</string> | ||
</property> | ||
</item> | ||
<item> | ||
<property name="text"> | ||
<string>Contour</string> | ||
</property> | ||
</item> | ||
<item> | ||
<property name="text"> | ||
<string>Both</string> | ||
</property> | ||
</item> | ||
</widget> | ||
</item> | ||
<item> | ||
<spacer name="spOutput2"> | ||
<property name="orientation"> | ||
<enum>Qt::Horizontal</enum> | ||
</property> | ||
<property name="sizeHint" stdset="0"> | ||
<size> | ||
<width>40</width> | ||
<height>20</height> | ||
</size> | ||
</property> | ||
</spacer> | ||
</item> | ||
<item> | ||
<widget class="QCheckBox" name="chkSave"> | ||
<property name="text"> | ||
<string>Save Result</string> | ||
</property> | ||
</widget> | ||
</item> | ||
</layout> | ||
</widget> | ||
</item> | ||
</layout> | ||
</widget> | ||
<customwidgets> | ||
<customwidget> | ||
<class>MantidQt::MantidWidgets::MWRunFiles</class> | ||
<extends>QWidget</extends> | ||
<header>MantidQtMantidWidgets/MWRunFiles.h</header> | ||
</customwidget> | ||
</customwidgets> | ||
<tabstops> | ||
<tabstop>mwInputFile</tabstop> | ||
<tabstop>sbTimeUnit</tabstop> | ||
<tabstop>cbSortQ</tabstop> | ||
<tabstop>chkVerbose</tabstop> | ||
<tabstop>cbPlot</tabstop> | ||
<tabstop>chkSave</tabstop> | ||
</tabstops> | ||
<resources/> | ||
<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
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
47 changes: 47 additions & 0 deletions
47
Code/Mantid/MantidQt/CustomInterfaces/src/IndirectSassena.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,47 @@ | ||
#include "MantidQtCustomInterfaces/IndirectSassena.h" | ||
|
||
#include <QFileInfo> | ||
#include <QString> | ||
|
||
namespace MantidQt | ||
{ | ||
namespace CustomInterfaces | ||
{ | ||
IndirectSassena::IndirectSassena(QWidget * parent) : | ||
IndirectSimulationTab(parent) | ||
{ | ||
m_uiForm.setupUi(parent); | ||
} | ||
|
||
/** | ||
* Validate the form to check the program can be run. | ||
* | ||
* @return :: Whether the form was valid | ||
*/ | ||
bool IndirectSassena::validate() | ||
{ | ||
//TODO | ||
|
||
return true; | ||
} | ||
|
||
/** | ||
* TODO | ||
*/ | ||
void IndirectSassena::run() | ||
{ | ||
} | ||
|
||
/** | ||
* Set the data selectors to use the default save directory | ||
* when browsing for input files. | ||
* | ||
* @param settings :: The settings to loading into the interface | ||
*/ | ||
void IndirectSassena::loadSettings(const QSettings& settings) | ||
{ | ||
m_uiForm.mwInputFile->readSettings(settings.group()); | ||
} | ||
|
||
} // namespace CustomInterfaces | ||
} // namespace MantidQt |
Oops, something went wrong.