BornAgain
1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Assistant class which save all projections of IndensityDataItem into ASCII file.
Definition at line 29 of file SaveProjectionsAssistant.h.
Classes | |
struct | Projection |
struct | ProjectionsData |
Public Member Functions | |
SaveProjectionsAssistant () | |
~SaveProjectionsAssistant () | |
void | saveProjections (QWidget *parent, IntensityDataItem *intensityItem) |
Calls file open dialog and writes projection data as ASCII. More... | |
Private Member Functions | |
QString | projectionFileHeader (ProjectionsData &projectionsData) |
Returns projections header. For projections along x it will be "# x y=6.0194 y=33.5922 y=61.9417". More... | |
QVector< SessionItem * > | projectionItems (const QString &projectionsType, IntensityDataItem *intensityItem) |
Returns vector of ProjectionItems sorted according to axis value. More... | |
ProjectionsData | projectionsData (const QString &projectionsType, IntensityDataItem *intensityItem) |
Returns projections data for all projections of given type (horizontal, vertical). More... | |
QString | projectionsToString (const QString &projectionsType, IntensityDataItem *intensityItem) |
Generates multi-line string with projections data of given type (horizontal, vertical). More... | |
Private Attributes | |
std::unique_ptr< Datafield > | m_field |
|
default |
|
default |
|
private |
Returns projections header. For projections along x it will be "# x y=6.0194 y=33.5922 y=61.9417".
Definition at line 179 of file SaveProjectionsAssistant.cpp.
References SaveProjectionsAssistant::ProjectionsData::is_horizontal, SaveProjectionsAssistant::ProjectionsData::projections, and projectionsData().
Referenced by projectionsToString().
|
private |
Returns vector of ProjectionItems sorted according to axis value.
Definition at line 167 of file SaveProjectionsAssistant.cpp.
References SessionItem::childrenOfType(), HorizontalLineItem::M_TYPE, and IntensityDataItem::projectionContainerItem().
Referenced by projectionsData().
|
private |
Returns projections data for all projections of given type (horizontal, vertical).
Definition at line 130 of file SaveProjectionsAssistant.cpp.
References SaveProjectionsAssistant::Projection::axis_value, SaveProjectionsAssistant::ProjectionsData::bin_centers, SaveProjectionsAssistant::Projection::bin_values, SaveProjectionsAssistant::ProjectionsData::is_horizontal, m_field, VerticalLineItem::M_TYPE, HorizontalLineItem::M_TYPE, projectionItems(), and SaveProjectionsAssistant::ProjectionsData::projections.
Referenced by projectionFileHeader(), and projectionsToString().
|
private |
Generates multi-line string with projections data of given type (horizontal, vertical).
Definition at line 103 of file SaveProjectionsAssistant.cpp.
References projectionFileHeader(), and projectionsData().
Referenced by saveProjections().
void SaveProjectionsAssistant::saveProjections | ( | QWidget * | parent, |
IntensityDataItem * | intensityItem | ||
) |
Calls file open dialog and writes projection data as ASCII.
Definition at line 68 of file SaveProjectionsAssistant.cpp.
References appSettings, Error, DataItem::getDatafield(), gSessionData, m_field, VerticalLineItem::M_TYPE, HorizontalLineItem::M_TYPE, SessionData::projectDocument, projectionsToString(), and ApplicationSettings::useNativeFileDialog().
Referenced by ProjectionsEditorActions::onSaveAction().
|
private |
Definition at line 50 of file SaveProjectionsAssistant.h.
Referenced by projectionsData(), and saveProjections().