Skip to content

Commit

Permalink
Created Indirect Bayes window and ResNorm tab.
Browse files Browse the repository at this point in the history
This commit also lays most of the ground work for the rest of the tabs.

Refs #5421
  • Loading branch information
Samuel Jackson committed Sep 11, 2013
1 parent b96976c commit e966be9
Show file tree
Hide file tree
Showing 9 changed files with 364 additions and 30 deletions.
2 changes: 2 additions & 0 deletions Code/Mantid/MantidQt/CustomInterfaces/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,11 @@ set ( MOC_FILES inc/MantidQtCustomInterfaces/Background.h
set ( UI_FILES inc/MantidQtCustomInterfaces/ConvertToEnergy.ui
inc/MantidQtCustomInterfaces/CreateMDWorkspace.ui
inc/MantidQtCustomInterfaces/CreateMDWorkspaceAlgDialog.ui
inc/MantidQtCustomInterfaces/IndirectBayes.ui
inc/MantidQtCustomInterfaces/IndirectDataAnalysis.ui
inc/MantidQtCustomInterfaces/IndirectDiffractionReduction.ui
inc/MantidQtCustomInterfaces/MuonAnalysis.ui
inc/MantidQtCustomInterfaces/ResNorm.ui
inc/MantidQtCustomInterfaces/SANSPlotSpecial.ui
inc/MantidQtCustomInterfaces/SANSRunWindow.ui
inc/MantidQtCustomInterfaces/MantidEV.ui
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
//----------------------
// Includes
//----------------------
#include "ui_IndirectBayes.h"
#include "MantidQtAPI/UserSubWindow.h"
#include "MantidQtCustomInterfaces/IndirectBayesTab.h"

Expand Down Expand Up @@ -38,7 +39,7 @@ namespace MantidQt
Code Documentation is available at: <http://doxygen.mantidproject.org>
*/

class IndiectBayes : public MantidQt::API::UserSubWindow
class DLLExport IndirectBayes : public MantidQt::API::UserSubWindow
{
Q_OBJECT

Expand All @@ -53,17 +54,20 @@ namespace MantidQt

public: // public constructor, destructor and functions
/// Default Constructor
IndiectBayes(QWidget *parent = 0);
IndirectBayes(QWidget *parent = 0);
///Destructor
~IndiectBayes();
~IndirectBayes();
/// Interface name
static std::string name() { return "Indirect Bayes"; }
virtual void initLayout();

private:
std::map<unsigned int, IndirectBayesTab*> m_bayesTabs;
};

///Main interface window
Ui::IndirectBayes m_uiForm;
};
}
}

#endif //MANTIDQTCUSTOMINTERFACES_INDIRECTBAYES_H_
#endif
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>IndirectBayes</class>
<widget class="QWidget" name="IndirectBayes">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>726</width>
<height>548</height>
</rect>
</property>
<property name="windowTitle">
<string>Indirect Bayes</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QTabWidget" name="indirectBayesTabs">
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="resNorm">
<attribute name="title">
<string>ResNorm</string>
</attribute>
</widget>
<widget class="QWidget" name="Quasi">
<attribute name="title">
<string>Quasi</string>
</attribute>
</widget>
<widget class="QWidget" name="Stretch">
<attribute name="title">
<string>Stretch</string>
</attribute>
</widget>
<widget class="QWidget" name="JumpFit">
<attribute name="title">
<string>JumpFit</string>
</attribute>
</widget>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="layout_bottom">
<item>
<widget class="QPushButton" name="pbHelp">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
<property name="text">
<string>?</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_14">
<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="QPushButton" name="pbRun">
<property name="text">
<string>Run</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_11">
<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="QPushButton" name="pbManageDirs">
<property name="text">
<string>Manage Directories</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,16 @@
#define MANTID_CUSTOMINTERFACES_INDIRECTBAYESTAB_H_

#include "MantidKernel/System.h"

#include <QMap>
#include <QtDoublePropertyManager>
#include <QtTreePropertyBrowser>
#include <QWidget>

#include <qwt_plot.h>
#include <qwt_plot_curve.h>


namespace MantidQt
{
namespace CustomInterfaces
Expand Down Expand Up @@ -35,6 +43,10 @@ namespace MantidQt
File change history is stored at: <https://github.com/mantidproject/mantid>
Code Documentation is available at: <http://doxygen.mantidproject.org>
*/

/// precision of double properties in bayes tabs
static const unsigned int NUM_DECIMALS = 6;

class DLLExport IndirectBayesTab : public QWidget
{
Q_OBJECT
Expand All @@ -43,11 +55,12 @@ namespace MantidQt
IndirectBayesTab(QWidget * parent = 0);
~IndirectBayesTab();

virtual void help() = 0;
virtual void validate() = 0;
virtual void run() = 0;

};
} // namespace CustomInterfaces
} // namespace Mantid

#endif MANTID_CUSTOMINTERFACES_INDIRECTBAYESTAB_H_
#endif
Original file line number Diff line number Diff line change
@@ -1,24 +1,38 @@
#ifndef MANTIDQTCUSTOMINTERFACESIDA_RESNORM_H_
#define MANTIDQTCUSTOMINTERFACESIDA_RESNORM_H_
#ifndef MANTIDQTCUSTOMINTERFACES_RESNORM_H_
#define MANTIDQTCUSTOMINTERFACES_RESNORM_H_

#include "ui_ResNorm.h"
#include "MantidQtCustomInterfaces/IndirectBayesTab.h"

namespace MantidQt
{
namespace CustomInterfaces
{
class ResNorm : public IndirectBayesTab
class DLLExport ResNorm : public IndirectBayesTab
{
Q_OBJECT

public:
ResNorm(QWidget * parent = 0);

private:
virtual void help();
virtual void validate();
virtual void run();

/// Plot of the input
QwtPlot* m_plot;
/// Tree of the properties
QtTreePropertyBrowser* m_propTree;
/// Internal list of the properties
QMap<QString, QtProperty*> m_properties;
/// Double manager to create properties
QtDoublePropertyManager* m_dblManager;
//The ui form
Ui::ResNorm m_uiForm;

};
} // namespace CustomInterfaces
} // namespace MantidQt

#endif MANTIDQTCUSTOMINTERFACESIDA_RESNORM_H_
#endif

0 comments on commit e966be9

Please sign in to comment.