Skip to content
Snippets Groups Projects
Commit 915d5dcd authored by Federico Montesino Pouzols's avatar Federico Montesino Pouzols
Browse files

update presenter for last view updates, re #12610

parent a97f9abb
No related branches found
No related tags found
No related merge requests found
......@@ -105,6 +105,7 @@ set ( INC_FILES
inc/MantidQtCustomInterfaces/DllConfig.h
inc/MantidQtCustomInterfaces/EnggDiffraction/IEnggDiffractionPresenter.h
inc/MantidQtCustomInterfaces/EnggDiffraction/IEnggDiffractionView.h
inc/MantidQtCustomInterfaces/EnggDiffraction/EnggDiffCalibSettings.h
inc/MantidQtCustomInterfaces/EnggDiffraction/EnggDiffractionPresenter.h
inc/MantidQtCustomInterfaces/EnggDiffraction/EnggDiffractionViewQtGUI.h
inc/MantidQtCustomInterfaces/Homer.h
......
......@@ -38,7 +38,7 @@ 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 MANTIDQT_CUSTOMINTERFACES_DLL EnggDiffractionPresenter
class EnggDiffractionPresenter
: public IEnggDiffractionPresenter {
public:
......@@ -58,6 +58,7 @@ protected:
void processLoadExistingCalib();
void processCalcCalib();
void processLogMsg();
void processInstChange();
void processShutDown();
private:
......
......@@ -42,6 +42,7 @@ public:
LoadExistingCalib, ///< Load a calibration already availble on disk
CalcCalib, ///< Calculate a (new) calibration
LogMsg, ///< need to send a message to the Mantid log system
InstrumentChange, ///< Instrument selection updated
ShutDown ///< closing the interface
};
......
......@@ -11,6 +11,10 @@ using namespace MantidQt::CustomInterfaces;
namespace MantidQt {
namespace CustomInterfaces {
namespace {
Mantid::Kernel::Logger g_log("EngineeringDiffractionGUI");
}
EnggDiffractionPresenter::EnggDiffractionPresenter(IEnggDiffractionView *view)
: m_view(view) /*, m_model(new EnggDiffractionModel()), */ {
if (!m_view) {
......@@ -52,6 +56,9 @@ void EnggDiffractionPresenter::notify(
processLogMsg();
break;
case IEnggDiffractionPresenter::InstrumentChange:
processInstChange();
case IEnggDiffractionPresenter::ShutDown:
processShutDown();
break;
......@@ -61,7 +68,7 @@ void EnggDiffractionPresenter::notify(
void EnggDiffractionPresenter::processStart() {
std::vector<std::string> msgs = m_view->logMsgs();
for (size_t i = 0; i < msgs.size(); i++) {
//m_model->logMsg(msgs[i]);
g_log.information() << msgs[i] << std::endl;
}
}
......@@ -71,6 +78,10 @@ void EnggDiffractionPresenter::processCalcCalib() {}
void EnggDiffractionPresenter::processLogMsg() {}
void EnggDiffractionPresenter::processInstChange() {
g_log.error() << "Changing instrument is not supported!" << std::endl;
}
void EnggDiffractionPresenter::processShutDown() {
m_view->saveSettings();
cleanup();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment