Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
mantidproject
mantid
Commits
d4280884
Commit
d4280884
authored
Dec 10, 2019
by
Anthony Lim
Browse files
refs #26904 moved basic custom instrument view to instrumentView
parent
78056c58
Changes
12
Hide whitespace changes
Inline
Side-by-side
qt/scientific_interfaces/Direct/ALFView.cpp
View file @
d4280884
...
...
@@ -9,8 +9,8 @@
#include
"PlotFitAnalysisPaneModel.h"
#include
"PlotFitAnalysisPaneView.h"
#include
"BaseInstrumentModel.h"
#include
"BaseInstrumentView.h"
#include
"
MantidQtWidgets/InstrumentView/
BaseInstrumentModel.h"
#include
"
MantidQtWidgets/InstrumentView/
BaseInstrumentView.h"
// will need these later
#include
"MantidQtWidgets/Common/FunctionBrowser.h"
#include
"MantidQtWidgets/InstrumentView/InstrumentWidget.h"
...
...
qt/scientific_interfaces/Direct/ALFView_model.h
View file @
d4280884
...
...
@@ -7,7 +7,7 @@
#ifndef MANTIDQT_CUSTOMINTERFACES_ALFVIEWMODEL_H_
#define MANTIDQT_CUSTOMINTERFACES_ALFVIEWMODEL_H_
#include
"BaseInstrumentModel.h"
#include
"
MantidQtWidgets/InstrumentView/
BaseInstrumentModel.h"
#include
"MantidAPI/CompositeFunction.h"
#include
"MantidAPI/FunctionFactory.h"
...
...
@@ -17,7 +17,7 @@
namespace
MantidQt
{
namespace
CustomInterfaces
{
class
ALFView_model
:
public
BaseInstrumentModel
{
class
ALFView_model
:
public
MantidWidgets
::
BaseInstrumentModel
{
public:
ALFView_model
();
...
...
qt/scientific_interfaces/Direct/ALFView_presenter.h
View file @
d4280884
...
...
@@ -7,7 +7,7 @@
#ifndef MANTIDQT_CUSTOMINTERFACES_ALFVIEWPRESENTER_H_
#define MANTIDQT_CUSTOMINTERFACES_ALFVIEWPRESENTER_H_
#include
"BaseInstrumentPresenter.h"
#include
"
MantidQtWidgets/InstrumentView/
BaseInstrumentPresenter.h"
#include
"PlotFitAnalysisPanePresenter.h"
#include
"ALFView_model.h"
...
...
@@ -21,7 +21,7 @@
namespace
MantidQt
{
namespace
CustomInterfaces
{
class
MANTIDQT_DIRECT_DLL
ALFView_presenter
:
public
BaseInstrumentPresenter
{
class
MANTIDQT_DIRECT_DLL
ALFView_presenter
:
public
MantidWidgets
::
BaseInstrumentPresenter
{
Q_OBJECT
public:
...
...
qt/scientific_interfaces/Direct/ALFView_view.h
View file @
d4280884
...
...
@@ -7,7 +7,7 @@
#ifndef MANTIDQT_CUSTOMINTERFACES_ALFVIEW_VIEW_H_
#define MANTIDQT_CUSTOMINTERFACES_ALFVIEW_VIEW_H_
#include
"BaseInstrumentView.h"
#include
"
MantidQtWidgets/InstrumentView/
BaseInstrumentView.h"
#include
"DllConfig.h"
#include
"MantidQtWidgets/Common/MWRunFiles.h"
#include
"MantidQtWidgets/Common/ObserverPattern.h"
...
...
@@ -22,7 +22,7 @@
namespace
MantidQt
{
namespace
CustomInterfaces
{
class
ALFView_view
:
public
BaseInstrumentView
{
class
ALFView_view
:
public
MantidWidgets
::
BaseInstrumentView
{
Q_OBJECT
public:
...
...
qt/scientific_interfaces/Direct/CMakeLists.txt
View file @
d4280884
...
...
@@ -3,9 +3,9 @@ set(SRC_FILES
ALFView_view.cpp
ALFView_presenter.cpp
ALFView_model.cpp
BaseInstrumentModel.cpp
BaseInstrumentView.cpp
BaseInstrumentPresenter.cpp
#
BaseInstrumentModel.cpp
#
BaseInstrumentView.cpp
#
BaseInstrumentPresenter.cpp
PlotFitAnalysisPaneView.cpp
PlotFitAnalysisPanePresenter.cpp
PlotFitAnalysisPaneModel.cpp
)
...
...
@@ -14,9 +14,8 @@ set(MOC_FILES
ALFView.h
ALFView_view.h
ALFView_presenter.h
BaseInstrumentView.h
BaseInstrumentView.h
BaseInstrumentPresenter.h
#BaseInstrumentView.h
#BaseInstrumentPresenter.h
PlotFitAnalysisPaneView.h
PlotFitAnalysisPanePresenter.h
)
...
...
qt/widgets/instrumentview/CMakeLists.txt
View file @
d4280884
...
...
@@ -6,6 +6,9 @@ set(
SRC_FILES
src/BankRenderingHelpers.cpp
src/BankTextureBuilder.cpp
src/BaseInstrumentModel.cpp
src/BaseInstrumentView.cpp
src/BaseInstrumentPresenter.cpp
src/BinDialog.cpp
src/CollapsiblePanel.cpp
src/DetXMLFile.cpp
...
...
@@ -52,6 +55,8 @@ set(QT5_SRC_FILES src/MiniPlotMpl.cpp)
set
(
MOC_FILES
inc/MantidQtWidgets/InstrumentView/BinDialog.h
inc/MantidQtWidgets/InstrumentView/BaseInstrumentPresenter.h
inc/MantidQtWidgets/InstrumentView/BaseInstrumentView.h
inc/MantidQtWidgets/InstrumentView/CollapsiblePanel.h
inc/MantidQtWidgets/InstrumentView/InstrumentActor.h
inc/MantidQtWidgets/InstrumentView/InstrumentTreeModel.h
...
...
@@ -81,6 +86,9 @@ set(
INC_FILES
inc/MantidQtWidgets/InstrumentView/BankRenderingHelpers.h
inc/MantidQtWidgets/InstrumentView/BankTextureBuilder.h
inc/MantidQtWidgets/InstrumentView/BaseInstrumentModel.h
inc/MantidQtWidgets/InstrumentView/BaseInstrumentPresenter.h
inc/MantidQtWidgets/InstrumentView/BaseInstrumentView.h
inc/MantidQtWidgets/InstrumentView/BinDialog.h
inc/MantidQtWidgets/InstrumentView/CollapsiblePanel.h
inc/MantidQtWidgets/InstrumentView/ColorMap.h
...
...
qt/
scientific_interfaces/Direct
/BaseInstrumentModel.h
→
qt/
widgets/instrumentview/inc/MantidQtWidgets/InstrumentView
/BaseInstrumentModel.h
View file @
d4280884
...
...
@@ -4,15 +4,16 @@
// NScD Oak Ridge National Laboratory, European Spallation Source
// & Institut Laue - Langevin
// SPDX - License - Identifier: GPL - 3.0 +
#ifndef MANTIDQT_
CUSTOMINTERFACES
_BASEINSTRUMENTMODEL_H_
#define MANTIDQT_
CUSTOMINTERFACES
_BASEINSTRUMENTMODEL_H_
#ifndef MANTIDQT_
INSTRUMENTVIEW
_BASEINSTRUMENTMODEL_H_
#define MANTIDQT_
INSTRUMENTVIEW
_BASEINSTRUMENTMODEL_H_
#include
<map>
#include
<string>
#include
"DllOption.h"
namespace
MantidQt
{
namespace
CustomInterface
s
{
namespace
MantidWidget
s
{
class
BaseInstrumentModel
{
class
EXPORT_OPT_MANTIDQT_INSTRUMENTVIEW
BaseInstrumentModel
{
public:
BaseInstrumentModel
();
...
...
@@ -35,7 +36,7 @@ protected:
std
::
string
m_wsName
;
};
}
// namespace
CustomInterface
s
}
// namespace
MantidWidget
s
}
// namespace MantidQt
#endif
/* MANTIDQT_
CUSTOMINTERFACES
_BASEINSTRUMENTMODEL_H_ */
#endif
/* MANTIDQT_
INSTRUMENTVIEW
_BASEINSTRUMENTMODEL_H_ */
qt/
scientific_interfaces/Direct
/BaseInstrumentPresenter.h
→
qt/
widgets/instrumentview/inc/MantidQtWidgets/InstrumentView
/BaseInstrumentPresenter.h
View file @
d4280884
...
...
@@ -6,22 +6,21 @@
// SPDX - License - Identifier: GPL - 3.0 +
#ifndef MANTIDQT_CUSTOMINTERFACES_BASEINSTRUMENTPRESENTER_H_
#define MANTIDQT_CUSTOMINTERFACES_BASEINSTRUMENTPRESENTER_H_
#include
"DllOption.h"
#include
"BaseInstrumentModel.h"
#include
"BaseInstrumentView.h"
#include
"PlotFitAnalysisPaneView.h"
#include
"MantidQtWidgets/InstrumentView/BaseInstrumentModel.h"
#include
"MantidQtWidgets/InstrumentView/BaseInstrumentView.h"
#include
"ALFView_view.h"
#include
"DllConfig.h"
#include
"MantidQtWidgets/Common/ObserverPattern.h"
#include
"MantidQtWidgets/Common/UserSubWindow.h"
#include
<string>
namespace
MantidQt
{
namespace
CustomInterface
s
{
namespace
MantidWidget
s
{
class
BaseInstrumentPresenter
:
public
QObject
{
class
EXPORT_OPT_MANTIDQT_INSTRUMENTVIEW
BaseInstrumentPresenter
:
public
QObject
{
Q_OBJECT
public:
...
...
@@ -60,7 +59,7 @@ private:
VoidObserver
*
m_loadRunObserver
;
QWidget
*
m_analysisPaneView
;
};
}
// namespace
CustomInterface
s
}
// namespace
MantidWidget
s
}
// namespace MantidQt
#endif
/* MANTIDQT_CUSTOMINTERFACES_BASEINSTRUMENTPRESENTER_H_ */
qt/
scientific_interfaces/Direct
/BaseInstrumentView.h
→
qt/
widgets/instrumentview/inc/MantidQtWidgets/InstrumentView
/BaseInstrumentView.h
View file @
d4280884
...
...
@@ -7,12 +7,11 @@
#ifndef MANTIDQT_CUSTOMINTERFACES_BASEINSTRUMENTVIEW_H_
#define MANTIDQT_CUSTOMINTERFACES_BASEINSTRUMENTVIEW_H_
#include
"Dll
Config
.h"
#include
"Dll
Option
.h"
#include
"MantidQtWidgets/Common/FunctionBrowser.h"
#include
"MantidQtWidgets/Common/MWRunFiles.h"
#include
"MantidQtWidgets/Common/ObserverPattern.h"
#include
"MantidQtWidgets/InstrumentView/InstrumentWidget.h"
#include
"MantidQtWidgets/Plotting/PreviewPlot.h"
#include
<QObject>
#include
<QPushButton>
...
...
@@ -21,9 +20,9 @@
#include
<string>
namespace
MantidQt
{
namespace
CustomInterface
s
{
namespace
MantidWidget
s
{
class
BaseInstrumentView
:
public
QSplitter
{
class
EXPORT_OPT_MANTIDQT_INSTRUMENTVIEW
BaseInstrumentView
:
public
QSplitter
{
Q_OBJECT
public:
...
...
@@ -66,7 +65,7 @@ private:
MantidWidgets
::
InstrumentWidget
*
m_instrumentWidget
;
QPushButton
*
m_help
;
};
}
// namespace
CustomInterface
s
}
// namespace
MantidWidget
s
}
// namespace MantidQt
#endif
/* MANTIDQT_CUSTOMINTERFACES_BASEINSTRUMENTVIEW_H_ */
qt/
scientific_interfaces/Direct
/BaseInstrumentModel.cpp
→
qt/
widgets/instrumentview/src
/BaseInstrumentModel.cpp
View file @
d4280884
...
...
@@ -5,7 +5,7 @@
// & Institut Laue - Langevin
// SPDX - License - Identifier: GPL - 3.0 +
#include
"BaseInstrumentModel.h"
#include
"
MantidQtWidgets/InstrumentView/
BaseInstrumentModel.h"
#include
"MantidAPI/Algorithm.h"
#include
"MantidAPI/AlgorithmManager.h"
#include
"MantidAPI/AnalysisDataService.h"
...
...
@@ -22,7 +22,7 @@ const int ERRORCODE = -999;
using
namespace
Mantid
::
API
;
namespace
MantidQt
{
namespace
CustomInterface
s
{
namespace
MantidWidget
s
{
BaseInstrumentModel
::
BaseInstrumentModel
()
:
m_currentRun
(
0
),
m_tmpName
(
"tmp"
),
m_instrumentName
(
"MUSR"
),
...
...
@@ -82,5 +82,5 @@ bool BaseInstrumentModel::isErrorCode(const int run) {
return
(
run
==
ERRORCODE
);
}
}
// namespace
CustomInterface
s
}
// namespace
MantidWidget
s
}
// namespace MantidQt
qt/
scientific_interfaces/Direct
/BaseInstrumentPresenter.cpp
→
qt/
widgets/instrumentview/src
/BaseInstrumentPresenter.cpp
View file @
d4280884
...
...
@@ -4,18 +4,19 @@
// NScD Oak Ridge National Laboratory, European Spallation Source
// & Institut Laue - Langevin
// SPDX - License - Identifier: GPL - 3.0 +
#include
"BaseInstrumentPresenter.h"
#include
"BaseInstrumentView.h"
#include
"MantidQtWidgets/InstrumentView/BaseInstrumentPresenter.h"
#include
"MantidQtWidgets/InstrumentView/BaseInstrumentView.h"
#include
"MantidQtWidgets/InstrumentView/BaseInstrumentModel.h"
#include
"MantidAPI/FileFinder.h"
#include
<functional>
#include
<tuple>
namespace
MantidQt
{
namespace
CustomInterface
s
{
namespace
MantidWidget
s
{
BaseInstrumentPresenter
::
BaseInstrumentPresenter
(
BaseInstrumentView
*
view
,
BaseInstrumentModel
*
model
,
MantidWidgets
::
BaseInstrumentModel
*
model
,
QWidget
*
analysisPaneView
)
:
m_view
(
view
),
m_model
(
model
),
m_currentRun
(
0
),
m_currentFile
(
""
),
m_loadRunObserver
(
nullptr
),
m_analysisPaneView
(
analysisPaneView
)
{
...
...
@@ -110,5 +111,5 @@ BaseInstrumentPresenter::setupInstrument() {
return
std
::
make_pair
(
setUpContextConditions
,
customInstrumentOptions
);
}
}
// namespace
CustomInterface
s
}
// namespace
MantdWidget
s
}
// namespace MantidQt
qt/
scientific_interfaces/Direct
/BaseInstrumentView.cpp
→
qt/
widgets/instrumentview/src
/BaseInstrumentView.cpp
View file @
d4280884
...
...
@@ -4,7 +4,7 @@
// NScD Oak Ridge National Laboratory, European Spallation Source
// & Institut Laue - Langevin
// SPDX - License - Identifier: GPL - 3.0 +
#include
"BaseInstrumentView.h"
#include
"
MantidQtWidgets/InstrumentView/
BaseInstrumentView.h"
#include
"MantidQtWidgets/Common/HelpWindow.h"
#include
"MantidQtWidgets/InstrumentView/InstrumentWidgetPickTab.h"
...
...
@@ -15,7 +15,7 @@
#include
<QVBoxLayout>
namespace
MantidQt
{
namespace
CustomInterface
s
{
namespace
MantidWidget
s
{
BaseInstrumentView
::
BaseInstrumentView
(
const
std
::
string
&
instrument
,
QWidget
*
parent
)
...
...
@@ -27,13 +27,13 @@ BaseInstrumentView::BaseInstrumentView(const std::string &instrument,
this
->
addWidget
(
loadWidget
);
}
void
MantidQt
::
CustomInterfaces
::
BaseInstrumentView
::
setUpInstrument
(
void
BaseInstrumentView
::
setUpInstrument
(
const
std
::
string
&
fileName
,
std
::
vector
<
std
::
function
<
bool
(
std
::
map
<
std
::
string
,
bool
>
)
>>
&
instrument
)
{
(
void
)
instrument
;
auto
instrumentWidget
=
new
MantidWidgets
::
InstrumentWidget
(
QString
::
fromStdString
(
fileName
));
new
InstrumentWidget
(
QString
::
fromStdString
(
fileName
));
instrumentWidget
->
hideHelp
();
setInstrumentWidget
(
instrumentWidget
);
}
...
...
@@ -119,5 +119,5 @@ void BaseInstrumentView::warningBox(const QString &message) {
QMessageBox
::
warning
(
this
,
m_instrument
+
" view"
,
message
);
}
}
// namespace
CustomInterface
s
}
// namespace
MantidWidget
s
}
// namespace MantidQt
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment