-
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.
Refs #5421 Adding skeleton code for Indirect Bayes.
- Loading branch information
Samuel Jackson
committed
Sep 11, 2013
1 parent
c74b177
commit b96976c
Showing
7 changed files
with
220 additions
and
3 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
69 changes: 69 additions & 0 deletions
69
Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/IndirectBayes.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,69 @@ | ||
#ifndef MANTIDQTCUSTOMINTERFACES_INDIRECTBAYES_H_ | ||
#define MANTIDQTCUSTOMINTERFACES_INDIRECTBAYES_H_ | ||
|
||
//---------------------- | ||
// Includes | ||
//---------------------- | ||
#include "MantidQtAPI/UserSubWindow.h" | ||
#include "MantidQtCustomInterfaces/IndirectBayesTab.h" | ||
|
||
namespace MantidQt | ||
{ | ||
namespace CustomInterfaces | ||
{ | ||
/** | ||
This class defines the Indirect Bayes interface. It handles the creation of the interface window and | ||
handles the interaction between the child tabs on the window. | ||
@author Samuel Jackson, STFC | ||
Copyright © 2010 ISIS Rutherford Appleton Laboratory & NScD Oak Ridge National Laboratory | ||
This file is part of Mantid. | ||
Mantid is free software; you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation; either version 3 of the License, or | ||
(at your option) any later version. | ||
Mantid is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
You should have received a copy of the GNU General Public License | ||
along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
File change history is stored at: <https://github.com/mantidproject/mantid> | ||
Code Documentation is available at: <http://doxygen.mantidproject.org> | ||
*/ | ||
|
||
class IndiectBayes : public MantidQt::API::UserSubWindow | ||
{ | ||
Q_OBJECT | ||
|
||
public: //public constants and enums | ||
enum TabChoice | ||
{ | ||
RES_NORM, | ||
QUASI, | ||
STRETCH, | ||
JUMP_FIT | ||
}; | ||
|
||
public: // public constructor, destructor and functions | ||
/// Default Constructor | ||
IndiectBayes(QWidget *parent = 0); | ||
///Destructor | ||
~IndiectBayes(); | ||
/// Interface name | ||
static std::string name() { return "Indirect Bayes"; } | ||
|
||
private: | ||
std::map<unsigned int, IndirectBayesTab*> m_bayesTabs; | ||
}; | ||
|
||
} | ||
} | ||
|
||
#endif //MANTIDQTCUSTOMINTERFACES_INDIRECTBAYES_H_ |
53 changes: 53 additions & 0 deletions
53
Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/IndirectBayesTab.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,53 @@ | ||
#ifndef MANTID_CUSTOMINTERFACES_INDIRECTBAYESTAB_H_ | ||
#define MANTID_CUSTOMINTERFACES_INDIRECTBAYESTAB_H_ | ||
|
||
#include "MantidKernel/System.h" | ||
#include <QWidget> | ||
|
||
namespace MantidQt | ||
{ | ||
namespace CustomInterfaces | ||
{ | ||
/** | ||
This class defines a abstract base class for the different tabs of the Indirect Bayes interface. | ||
Any joint functionality shared between each of the tabs should be implemented here as well as defining | ||
shared member functions. | ||
@author Samuel Jackson, STFC | ||
Copyright © 2013 ISIS Rutherford Appleton Laboratory & NScD Oak Ridge National Laboratory | ||
This file is part of Mantid. | ||
Mantid is free software; you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation; either version 3 of the License, or | ||
(at your option) any later version. | ||
Mantid is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
You should have received a copy of the GNU General Public License | ||
along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
File change history is stored at: <https://github.com/mantidproject/mantid> | ||
Code Documentation is available at: <http://doxygen.mantidproject.org> | ||
*/ | ||
class DLLExport IndirectBayesTab : public QWidget | ||
{ | ||
Q_OBJECT | ||
|
||
public: | ||
IndirectBayesTab(QWidget * parent = 0); | ||
~IndirectBayesTab(); | ||
|
||
virtual void validate() = 0; | ||
virtual void run() = 0; | ||
|
||
}; | ||
} // namespace CustomInterfaces | ||
} // namespace Mantid | ||
|
||
#endif MANTID_CUSTOMINTERFACES_INDIRECTBAYESTAB_H_ |
24 changes: 24 additions & 0 deletions
24
Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/ResNorm.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,24 @@ | ||
#ifndef MANTIDQTCUSTOMINTERFACESIDA_RESNORM_H_ | ||
#define MANTIDQTCUSTOMINTERFACESIDA_RESNORM_H_ | ||
|
||
#include "MantidQtCustomInterfaces/IndirectBayesTab.h" | ||
|
||
namespace MantidQt | ||
{ | ||
namespace CustomInterfaces | ||
{ | ||
class ResNorm : public IndirectBayesTab | ||
{ | ||
Q_OBJECT | ||
|
||
public: | ||
ResNorm(QWidget * parent = 0); | ||
|
||
private: | ||
virtual void validate(); | ||
virtual void run(); | ||
}; | ||
} // namespace CustomInterfaces | ||
} // namespace MantidQt | ||
|
||
#endif MANTIDQTCUSTOMINTERFACESIDA_RESNORM_H_ |
19 changes: 19 additions & 0 deletions
19
Code/Mantid/MantidQt/CustomInterfaces/src/IndirectBayes.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,19 @@ | ||
#include "MantidQtCustomInterfaces/IndirectBayes.h" | ||
#include "MantidQtCustomInterfaces/ResNorm.h" | ||
|
||
//Add this class to the list of specialised dialogs in this namespace | ||
namespace MantidQt | ||
{ | ||
namespace CustomInterfaces | ||
{ | ||
DECLARE_SUBWINDOW(IndirectBayes); | ||
} | ||
} | ||
|
||
using namespace MantidQt::CustomInterfaces; | ||
|
||
IndirectBayes::IndirectBayes(QWidget *parent) | ||
{ | ||
//insert each tab into the interface on creation | ||
m_bayesTabs.insert(std::make_pair(RES_NORM, new ResNorm(this))); | ||
} |
23 changes: 23 additions & 0 deletions
23
Code/Mantid/MantidQt/CustomInterfaces/src/IndirectBayesTab.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,23 @@ | ||
#include "MantidQtCustomInterfaces/IndirectBayesTab.h" | ||
|
||
namespace MantidQt | ||
{ | ||
namespace CustomInterfaces | ||
{ | ||
|
||
//---------------------------------------------------------------------------------------------- | ||
/** Constructor | ||
*/ | ||
IndirectBayesTab::IndirectBayesTab(Ui::ConvertToEnergy& uiForm, QWidget * parent) : QWidget(parent), | ||
m_uiForm(uiForm) | ||
{ | ||
} | ||
|
||
//---------------------------------------------------------------------------------------------- | ||
/** Destructor | ||
*/ | ||
IndirectBayesTab::~IndirectBayesTab(QWidget* parent) | ||
{ | ||
} | ||
|
||
} // namespace MantidQt |
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,20 @@ | ||
#include "MantidQtCustomInterfaces/ResNorm.h" | ||
#include "MantidQtCustomInterfaces/IndirectBayesTab.h" | ||
|
||
namespace MantidQt | ||
{ | ||
namespace CustomInterfaces | ||
{ | ||
ResNorm::ResNorm(QWidget * parent) : IndirectBayesTab(parent) | ||
{} | ||
|
||
virtual void validate() | ||
{ | ||
|
||
} | ||
virtual void run() | ||
{ | ||
|
||
} | ||
} // namespace CustomInterfaces | ||
} // namespace MantidQt |