BornAgain  1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
ImportDataView Class Reference

Description

The ImportDataView class is a main view for importing experimental data.

Definition at line 28 of file ImportDataView.h.

Inheritance diagram for ImportDataView:
[legend]
Collaboration diagram for ImportDataView:
[legend]

Public Slots

void onSelectionChanged (RealDataItem *item)
 

Public Member Functions

 ImportDataView (QWidget *parent, ProjectDocument *document)
 

Private Member Functions

void updateFunctionalityNarrowing ()
 Show/hide UI elements according to settings in current project. More...
 

Private Attributes

ProjectDocumentm_document
 
RealDataSelectorWidgetm_selectorWidget
 
ItemStackPresenter< RealDataPresenter > * m_stackedWidget
 

Constructor & Destructor Documentation

◆ ImportDataView()

ImportDataView::ImportDataView ( QWidget *  parent,
ProjectDocument document 
)

Definition at line 30 of file ImportDataView.cpp.

31  : QWidget(parent)
32  , m_selectorWidget(new RealDataSelectorWidget(this, document))
34  , m_document(document)
35 {
36  auto* mainLayout = new QVBoxLayout;
37  mainLayout->setMargin(0);
38  mainLayout->setSpacing(0);
39  mainLayout->setContentsMargins(0, 0, 0, 0);
40 
41  m_stackedWidget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
42  m_selectorWidget->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Expanding);
43  m_stackedWidget->setSizeHint(QSize(1024, 1024));
44 
45  auto* splitter = new QSplitter;
46  splitter->addWidget(m_selectorWidget);
47  splitter->addWidget(m_stackedWidget);
48  splitter->setCollapsible(0, false);
49  splitter->setCollapsible(1, false);
50 
51  splitter->setSizes(QList<int>() << GUI::Constants::ITEM_SELECTOR_WIDGET_WIDTH
53 
54  mainLayout->addWidget(splitter);
55 
56  setLayout(mainLayout);
57 
59 
62 
63  connect(m_document, &ProjectDocument::modified, this,
65 
67 
70 }
void updateFunctionalityNarrowing()
Show/hide UI elements according to settings in current project.
RealDataSelectorWidget * m_selectorWidget
ItemStackPresenter< RealDataPresenter > * m_stackedWidget
void onSelectionChanged(RealDataItem *item)
ProjectDocument * m_document
void setModel(SessionModel *model)
void setSizeHint(const QSize &size_hint)
RealDataModel * realDataModel() const
void modified()
Emitted for any modifications in the document.
The RealDataSelectorWidget represents left panel of ImportDataView. Contains a tree to select data se...
void selectionChanged(RealDataItem *)
const unsigned int ITEM_SELECTOR_WIDGET_WIDTH

References RealDataSelectorWidget::currentItem(), GUI::Constants::ITEM_SELECTOR_WIDGET_WIDTH, m_document, m_selectorWidget, m_stackedWidget, ProjectDocument::modified(), onSelectionChanged(), ProjectDocument::realDataModel(), RealDataSelectorWidget::selectionChanged(), ItemStackWidget::setModel(), ItemStackWidget::setSizeHint(), and updateFunctionalityNarrowing().

Here is the call graph for this function:

Member Function Documentation

◆ onSelectionChanged

void ImportDataView::onSelectionChanged ( RealDataItem item)
slot

Definition at line 72 of file ImportDataView.cpp.

73 {
74  m_stackedWidget->setItem(item);
75 }
void setItem(U *item, bool *isNew=nullptr)
Shows the widget for given item (and hides previous one). If no widget yet exists,...

References m_stackedWidget, and ItemStackPresenter< T >::setItem().

Referenced by ImportDataView().

Here is the call graph for this function:

◆ updateFunctionalityNarrowing()

void ImportDataView::updateFunctionalityNarrowing ( )
private

Show/hide UI elements according to settings in current project.

Definition at line 77 of file ImportDataView.cpp.

References ProjectDocument::DepthProbe, ProjectDocument::functionalities(), ProjectDocument::Gisas, m_document, RealDataSelectorWidget::m_import1dDataAction, RealDataSelectorWidget::m_import2dDataAction, m_selectorWidget, ProjectDocument::Offspec, and ProjectDocument::Specular.

Referenced by ImportDataView().

Here is the call graph for this function:

Member Data Documentation

◆ m_document

ProjectDocument* ImportDataView::m_document
private

Definition at line 43 of file ImportDataView.h.

Referenced by ImportDataView(), and updateFunctionalityNarrowing().

◆ m_selectorWidget

RealDataSelectorWidget* ImportDataView::m_selectorWidget
private

Definition at line 41 of file ImportDataView.h.

Referenced by ImportDataView(), and updateFunctionalityNarrowing().

◆ m_stackedWidget

ItemStackPresenter<RealDataPresenter>* ImportDataView::m_stackedWidget
private

Definition at line 42 of file ImportDataView.h.

Referenced by ImportDataView(), and onSelectionChanged().


The documentation for this class was generated from the following files: