Mantid
Loading...
Searching...
No Matches
qt
widgets
common
src
ImageInfoModelMD.cpp
Go to the documentation of this file.
1
// Mantid Repository : https://github.com/mantidproject/mantid
2
//
3
// Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI,
4
// NScD Oak Ridge National Laboratory, European Spallation Source,
5
// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6
// SPDX - License - Identifier: GPL - 3.0 +
7
8
#include "
MantidQtWidgets/Common/ImageInfoModelMD.h
"
9
#include <climits>
10
11
namespace
MantidQt::MantidWidgets
{
12
14
ImageInfoModel::ImageInfo
ImageInfoModelMD::info
(
const
double
x
,
const
double
y
,
const
double
signal,
15
const
QMap<QString, QString> &extraValues)
const
{
16
ImageInfo
info
({
"x"
,
"y"
,
"Signal"
});
17
for
(
auto
const
&extraName : extraValues.keys())
18
info
.
m_names
.push_back(extraName);
19
20
auto
valueOrMissing = [](
double
value
) {
return
value
==
UnsetValue
?
MissingValue
:
defaultFormat
(
value
); };
21
info
.
setValue
(0, valueOrMissing(
x
));
22
info
.
setValue
(1, valueOrMissing(
y
));
23
info
.
setValue
(2, valueOrMissing(signal));
24
for
(
auto
const
&extraValue : extraValues.values())
25
info
.
m_values
.push_back(extraValue);
26
27
return
info
;
28
}
29
30
}
// namespace MantidQt::MantidWidgets
value
double value
The value of the point.
Definition
FitMW.cpp:51
ImageInfoModelMD.h
MantidQt::MantidWidgets::ImageInfoModelMD::info
ImageInfoModel::ImageInfo info(const double x, const double y, const double signal, const QMap< QString, QString > &extraValues) const override
Creates a list with information about the coordinates in the workspace.
Definition
ImageInfoModelMD.cpp:14
MantidQt::MantidWidgets::ImageInfoModel::ImageInfo
Definition
ImageInfoModel.h:24
MantidQt::MantidWidgets::ImageInfoModel::ImageInfo::setValue
void setValue(int index, const QString &value) noexcept
Definition
ImageInfoModel.h:33
MantidQt::MantidWidgets::ImageInfoModel::ImageInfo::m_values
StringItems m_values
Definition
ImageInfoModel.h:35
MantidQt::MantidWidgets::ImageInfoModel::ImageInfo::m_names
StringItems m_names
Definition
ImageInfoModel.h:34
MantidQt::MantidWidgets::ImageInfoModel::UnsetValue
static constexpr auto UnsetValue
Value to indicate that a MissingValue should be shown.
Definition
ImageInfoModel.h:43
MantidQt::MantidWidgets::ImageInfoModel::MissingValue
static const QString MissingValue
MissingValue identifier.
Definition
ImageInfoModel.h:45
MantidQt::MantidWidgets::ImageInfoModel::defaultFormat
static const QString defaultFormat(const double x)
Definition
ImageInfoModel.h:47
MantidQt::MantidWidgets
Definition
AddWorkspaceDialog.h:19
Mantid::Geometry::y
I a m y
Definition
SpaceGroupFactory.cpp:674
Mantid::Geometry::x
I a m x
Definition
SpaceGroupFactory.cpp:674
Generated by
1.9.8