-
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.
Merge remote-tracking branch 'origin/feature/5421_IDA_bayes_interface'
- Loading branch information
Showing
21 changed files
with
2,937 additions
and
75 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
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
101 changes: 101 additions & 0 deletions
101
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,101 @@ | ||
#ifndef MANTIDQTCUSTOMINTERFACES_INDIRECTBAYES_H_ | ||
#define MANTIDQTCUSTOMINTERFACES_INDIRECTBAYES_H_ | ||
|
||
//---------------------- | ||
// Includes | ||
//---------------------- | ||
#include "ui_IndirectBayes.h" | ||
#include "MantidQtAPI/UserSubWindow.h" | ||
#include "MantidQtCustomInterfaces/IndirectBayesTab.h" | ||
|
||
#include <Poco/NObserver.h> | ||
#include "MantidKernel/ConfigService.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 DLLExport IndirectBayes : public MantidQt::API::UserSubWindow | ||
{ | ||
Q_OBJECT | ||
|
||
public: //public constants and enums | ||
|
||
/// Enumeration for the index of each tab | ||
enum TabChoice | ||
{ | ||
RES_NORM, | ||
QUASI, | ||
STRETCH, | ||
JUMP_FIT | ||
}; | ||
|
||
public: // public constructor, destructor and functions | ||
/// Default Constructor | ||
IndirectBayes(QWidget *parent = 0); | ||
///Destructor | ||
~IndirectBayes(); | ||
/// Interface name | ||
static std::string name() { return "Indirect Bayes"; } | ||
// This interface's categories. | ||
static QString categoryInfo() { return "Indirect"; } | ||
virtual void initLayout(); | ||
|
||
private slots: | ||
// Run the appropriate action depending based on the selected tab | ||
|
||
/// Slot for clicking on the run button | ||
void runClicked(); | ||
/// Slot for clicking on the hlep button | ||
void helpClicked(); | ||
/// Slot for clicking on the manage directories button | ||
void manageUserDirectories(); | ||
/// Slot showing a message box to the user | ||
void showMessageBox(const QString& message); | ||
|
||
private: | ||
/// Called upon a close event. | ||
virtual void closeEvent(QCloseEvent*); | ||
/// handle POCO event | ||
void handleDirectoryChange(Mantid::Kernel::ConfigValChangeNotification_ptr pNf); | ||
/// Load default interface settings for each tab | ||
void loadSettings(); | ||
|
||
/// Map of tabs indexed by position on the window | ||
std::map<unsigned int, IndirectBayesTab*> m_bayesTabs; | ||
/// Change Observer for ConfigService (monitors user directories) | ||
Poco::NObserver<IndirectBayes, Mantid::Kernel::ConfigValChangeNotification> m_changeObserver; | ||
///Main interface window | ||
Ui::IndirectBayes m_uiForm; | ||
}; | ||
} | ||
} | ||
|
||
#endif |
114 changes: 114 additions & 0 deletions
114
Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/IndirectBayes.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,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>899</width> | ||
<height>686</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> |
Oops, something went wrong.