BornAgain
1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
|
The RealDataSelectorWidget represents left panel of ImportDataView. Contains a tree to select data set (m_itemTree & m_itemTreeModel) and properties of currently selected data (RealDataPropertiesWidget).
Definition at line 38 of file RealDataSelectorWidget.h.
Signals | |
void | selectionChanged (RealDataItem *) |
Public Member Functions | |
RealDataSelectorWidget (QWidget *parent, ProjectDocument *document) | |
RealDataItem * | currentItem () |
QSize | minimumSizeHint () const override |
void | setCurrentItem (RealDataItem *item) |
QSize | sizeHint () const override |
Public Attributes | |
QAction * | m_import1dDataAction |
QAction * | m_import2dDataAction |
QAction * | m_removeDataAction |
QAction * | m_renameDataAction |
Private Member Functions | |
QModelIndex | currentIndex () |
QList< QAction * > | getOverlayActions (const QModelIndex &index, bool asHover) |
void | importData1D () |
void | importData2D () |
void | onContextMenuRequest (const QPoint &point) |
void | onSelectionChanged () |
void | removeCurrentItem () |
void | renameCurrentItem () |
void | updateActionEnabling () |
void | updateActionEnabling (const RealDataItem *item) const |
void | updateFunctionalities () |
Private Attributes | |
ProjectDocument * | m_document |
QTreeView * | m_itemTree |
RealDataTreeModel * | m_itemTreeModel |
RealDataPropertiesWidget * | m_propertiesWidget |
RealDataSelectorWidget::RealDataSelectorWidget | ( | QWidget * | parent, |
ProjectDocument * | document | ||
) |
Definition at line 40 of file RealDataSelectorWidget.cpp.
References currentItem(), getOverlayActions(), importData1D(), importData2D(), ItemViewOverlayButtons::install(), m_document, m_import1dDataAction, m_import2dDataAction, m_itemTree, m_itemTreeModel, m_propertiesWidget, m_removeDataAction, m_renameDataAction, ProjectDocument::modified(), onContextMenuRequest(), onSelectionChanged(), removeCurrentItem(), renameCurrentItem(), selectionChanged(), setCurrentItem(), RealDataTreeModel::topMostItem(), updateActionEnabling(), and updateFunctionalities().
|
private |
Definition at line 157 of file RealDataSelectorWidget.cpp.
References m_itemTree.
Referenced by currentItem(), and renameCurrentItem().
RealDataItem * RealDataSelectorWidget::currentItem | ( | ) |
Definition at line 144 of file RealDataSelectorWidget.cpp.
References currentIndex(), RealDataTreeModel::itemForIndex(), and m_itemTreeModel.
Referenced by ImportDataView::ImportDataView(), RealDataSelectorWidget(), onSelectionChanged(), removeCurrentItem(), and updateActionEnabling().
|
private |
Definition at line 162 of file RealDataSelectorWidget.cpp.
References RealDataTreeModel::indexOfHeadline(), RealDataTreeModel::isHeadline(), RealDataTreeModel::itemForIndex(), m_import1dDataAction, m_import2dDataAction, m_itemTreeModel, and RealDataTreeModel::removeItem().
Referenced by RealDataSelectorWidget().
|
private |
Definition at line 217 of file RealDataSelectorWidget.cpp.
References appSettings, GUI::Util::Path::baseName(), GUI::View::ImportDataUtils::Import1dData(), RealDataTreeModel::insertSpecularDataItem(), DataLoaders1D::instance(), ProjectManager::instance(), m_itemTreeModel, ProjectManager::recentlyUsedImportFilter1D(), RealDataTreeModel::removeItem(), setCurrentItem(), RealDataItem::setDataName(), ProjectManager::setImportDirFromFilePath(), RealDataItem::setNativeFileName(), ProjectManager::setRecentlyUsedImportFilter1D(), ApplicationSettings::useNativeFileDialog(), ProjectManager::userImportDir(), and GUI::View::Helpers::warning().
Referenced by RealDataSelectorWidget().
|
private |
Definition at line 266 of file RealDataSelectorWidget.cpp.
References appSettings, GUI::Util::Path::baseName(), Error, GUI::View::ImportDataUtils::Import2dData(), RealDataTreeModel::insertIntensityDataItem(), ProjectManager::instance(), m_itemTreeModel, ProjectManager::recentlyUsedImportFilter2D(), RealDataTreeModel::removeItem(), setCurrentItem(), RealDataItem::setDatafield(), RealDataItem::setDataName(), ProjectManager::setImportDirFromFilePath(), ProjectManager::setRecentlyUsedImportFilter2D(), ApplicationSettings::useNativeFileDialog(), ProjectManager::userImportDir(), and GUI::View::Helpers::warning().
Referenced by RealDataSelectorWidget().
|
override |
Definition at line 139 of file RealDataSelectorWidget.cpp.
|
private |
Definition at line 198 of file RealDataSelectorWidget.cpp.
References RealDataTreeModel::itemForIndex(), m_import1dDataAction, m_import2dDataAction, m_itemTree, m_itemTreeModel, m_removeDataAction, m_renameDataAction, and updateActionEnabling().
Referenced by RealDataSelectorWidget().
|
private |
Definition at line 191 of file RealDataSelectorWidget.cpp.
References currentItem(), m_propertiesWidget, selectionChanged(), RealDataPropertiesWidget::setItem(), and updateActionEnabling().
Referenced by RealDataSelectorWidget().
|
private |
Definition at line 334 of file RealDataSelectorWidget.cpp.
References currentItem(), m_itemTreeModel, and RealDataTreeModel::removeItem().
Referenced by RealDataSelectorWidget().
|
private |
Definition at line 323 of file RealDataSelectorWidget.cpp.
References currentIndex(), and m_itemTree.
Referenced by RealDataSelectorWidget().
|
signal |
Referenced by ImportDataView::ImportDataView(), RealDataSelectorWidget(), and onSelectionChanged().
void RealDataSelectorWidget::setCurrentItem | ( | RealDataItem * | item | ) |
Definition at line 149 of file RealDataSelectorWidget.cpp.
References RealDataTreeModel::indexForItem(), m_itemTree, and m_itemTreeModel.
Referenced by RealDataSelectorWidget(), importData1D(), and importData2D().
|
override |
Definition at line 134 of file RealDataSelectorWidget.cpp.
|
private |
Definition at line 339 of file RealDataSelectorWidget.cpp.
References currentItem().
Referenced by RealDataSelectorWidget(), onContextMenuRequest(), and onSelectionChanged().
|
private |
Definition at line 344 of file RealDataSelectorWidget.cpp.
References m_import1dDataAction, m_import2dDataAction, m_removeDataAction, and m_renameDataAction.
|
private |
Definition at line 353 of file RealDataSelectorWidget.cpp.
References ProjectDocument::DepthProbe, ProjectDocument::functionalities(), ProjectDocument::Gisas, m_document, m_itemTreeModel, ProjectDocument::Offspec, RealDataTreeModel::setVisibleRanks(), and ProjectDocument::Specular.
Referenced by RealDataSelectorWidget().
|
private |
Definition at line 72 of file RealDataSelectorWidget.h.
Referenced by RealDataSelectorWidget(), and updateFunctionalities().
QAction* RealDataSelectorWidget::m_import1dDataAction |
Definition at line 75 of file RealDataSelectorWidget.h.
Referenced by RealDataSelectorWidget(), getOverlayActions(), onContextMenuRequest(), updateActionEnabling(), and ImportDataView::updateFunctionalityNarrowing().
QAction* RealDataSelectorWidget::m_import2dDataAction |
Definition at line 76 of file RealDataSelectorWidget.h.
Referenced by RealDataSelectorWidget(), getOverlayActions(), onContextMenuRequest(), updateActionEnabling(), and ImportDataView::updateFunctionalityNarrowing().
|
private |
Definition at line 68 of file RealDataSelectorWidget.h.
Referenced by RealDataSelectorWidget(), currentIndex(), onContextMenuRequest(), renameCurrentItem(), and setCurrentItem().
|
private |
Definition at line 69 of file RealDataSelectorWidget.h.
Referenced by RealDataSelectorWidget(), currentItem(), getOverlayActions(), importData1D(), importData2D(), onContextMenuRequest(), removeCurrentItem(), setCurrentItem(), and updateFunctionalities().
|
private |
Definition at line 70 of file RealDataSelectorWidget.h.
Referenced by RealDataSelectorWidget(), and onSelectionChanged().
QAction* RealDataSelectorWidget::m_removeDataAction |
Definition at line 78 of file RealDataSelectorWidget.h.
Referenced by RealDataSelectorWidget(), onContextMenuRequest(), and updateActionEnabling().
QAction* RealDataSelectorWidget::m_renameDataAction |
Definition at line 77 of file RealDataSelectorWidget.h.
Referenced by RealDataSelectorWidget(), onContextMenuRequest(), and updateActionEnabling().