BornAgain
1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Main widget for real time parameter tuning. Contains a tree for parameter tuning and the model to provide drag-and-drop in FitActivityPanel.
Definition at line 34 of file ParameterTuningWidget.h.
Public Slots | |
void | makeSelected (ParameterItem *item) |
void | onCurrentLinkChanged (ParameterItem *item) |
void | onLockZValueChanged (bool value) |
void | onSliderValueChanged (double value) |
void | restoreModelsOfCurrentJobItem () |
Signals | |
void | itemContextMenuRequest (const QPoint &point) |
Public Member Functions | |
ParameterTuningWidget (QWidget *parent=nullptr) | |
virtual QList< QAction * > | actionList () |
SessionItem * | currentItem () |
const SessionItem * | currentItem () const |
QVector< ParameterItem * > | getSelectedParameters () |
Returns list of ParameterItem's currently selected in parameter tree. More... | |
QItemSelectionModel * | selectionModel () |
virtual void | setItem (SessionItem *item) |
Protected Member Functions | |
void | contextMenuEvent (QContextMenuEvent *) override |
void | hideEvent (QHideEvent *) override |
void | showEvent (QShowEvent *) override |
void | subscribeToItem () override |
virtual void | unsubscribeFromItem () |
Private Slots | |
void | onCustomContextMenuRequested (const QPoint &point) |
void | updateParameterModel () |
Private Member Functions | |
void | closeActiveEditors () |
JobItem * | jobItem () |
void | setTuningDelegateEnabled (bool enabled) |
Sets delegate to enabled/disabled state. In 'disabled' state the delegate is in ReadOnlyMode, if it was containing already some editing widget, it will be forced to close. More... | |
void | updateDragAndDropSettings () |
Disable drag-and-drop abilities, if job is in fit running state. More... | |
void | updateJobStatus () |
Private Attributes | |
CautionSign * | m_cautionSign |
ParameterTuningDelegate * | m_delegate |
SessionItemController * | m_itemController |
JobModel * | m_jobModel |
ParameterTuningModel * | m_parameterTuningModel |
SliderSettingsWidget * | m_sliderSettingsWidget |
QTreeView * | m_treeView |
|
explicit |
Definition at line 30 of file ParameterTuningWidget.cpp.
References ParameterTuningDelegate::currentLinkChanged(), SliderSettingsWidget::lockzChanged(), m_delegate, m_sliderSettingsWidget, m_treeView, onCurrentLinkChanged(), onCustomContextMenuRequested(), onLockZValueChanged(), onSliderValueChanged(), restoreModelsOfCurrentJobItem(), and SliderSettingsWidget::sliderRangeFactorChanged().
|
virtualinherited |
Reimplemented in IntensityDataProjectionsWidget, SpecularDataWidget, SpecularDataCanvas, FitComparisonWidget1D, FitComparisonWidget, IntensityDataWidget, IntensityDataCanvas, SpecularDataImportWidget, RealDataPresenter, and RealDataMaskWidget.
Definition at line 36 of file SessionItemWidget.cpp.
Referenced by ItemComboWidget::setPresentation().
|
private |
Definition at line 215 of file ParameterTuningWidget.cpp.
References m_delegate, and m_treeView.
Referenced by restoreModelsOfCurrentJobItem(), and setTuningDelegateEnabled().
|
overrideprotected |
Definition at line 164 of file ParameterTuningWidget.cpp.
|
inherited |
Definition at line 41 of file SessionItemWidget.cpp.
Referenced by FitFlowWidget::fitSuiteItem(), RealDataMaskWidget::intensityDataItem(), IntensityDataCanvas::intensityDataItem(), IntensityDataWidget::intensityDataItem(), IntensityDataProjectionsWidget::intensityDataItem(), ProjectionsPlot::intensityItem(), ColorMap::intensityItem(), JobResultsPresenter::itemPresentation(), FitParameterWidget::jobItem(), jobItem(), RunFitControlWidget::jobItem(), FitComparisonWidget::jobItem(), FitComparisonWidget1D::jobItem(), IntensityDataPropertyWidget::jobItem(), SpecularDataPropertyWidget::jobItem(), SpecularDataImportWidget::realDataItem(), ItemComboWidget::setPresentation(), JobResultsPresenter::setPresentation(), SpecularDataImportWidget::specularDataItem(), SpecularDataCanvas::specularDataItem(), SpecularDataWidget::specularDataItem(), SpecularPlot::specularItem(), ItemComboWidget::subscribeToItem(), ProjectionsPlot::unsubscribeFromChildren(), and Plot1D::viewItem().
|
inherited |
Definition at line 46 of file SessionItemWidget.cpp.
References SessionItemController::currentItem(), and SessionItemWidget::m_itemController.
QVector< ParameterItem * > ParameterTuningWidget::getSelectedParameters | ( | ) |
Returns list of ParameterItem's currently selected in parameter tree.
Definition at line 81 of file ParameterTuningWidget.cpp.
References ParameterTuningModel::getParameterItem(), m_parameterTuningModel, and selectionModel().
Referenced by FitParameterWidget::canCreateFitParameter(), FitParameterWidget::canRemoveFromFitParameters(), FitParameterWidget::onAddToFitParAction(), FitParameterWidget::onCreateFitParAction(), and FitParameterWidget::onRemoveFromFitParAction().
|
overrideprotectedinherited |
Definition at line 56 of file SessionItemWidget.cpp.
References SessionItemWidget::m_itemController, and SessionItemController::unsubscribe().
|
signal |
Referenced by onCustomContextMenuRequested(), and FitParameterWidget::setParameterTuningWidget().
|
private |
Definition at line 182 of file ParameterTuningWidget.cpp.
References SessionItemWidget::currentItem().
Referenced by onCurrentLinkChanged(), onLockZValueChanged(), restoreModelsOfCurrentJobItem(), subscribeToItem(), updateDragAndDropSettings(), updateJobStatus(), and updateParameterModel().
|
slot |
Definition at line 157 of file ParameterTuningWidget.cpp.
References ParameterTuningModel::indexForItem(), m_parameterTuningModel, and selectionModel().
Referenced by FitParameterWidget::onFitParametersSelectionChanged().
|
slot |
Definition at line 91 of file ParameterTuningWidget.cpp.
References jobItem(), m_jobModel, and JobModel::runJob().
Referenced by ParameterTuningWidget().
|
privateslot |
Definition at line 138 of file ParameterTuningWidget.cpp.
References itemContextMenuRequest(), and m_treeView.
Referenced by ParameterTuningWidget().
|
slot |
Definition at line 109 of file ParameterTuningWidget.cpp.
References GUI::Model::DataItemUtils::intensityDataItem(), jobItem(), and IntensityDataItem::setZAxisLocked().
Referenced by ParameterTuningWidget().
|
slot |
Definition at line 104 of file ParameterTuningWidget.cpp.
References m_delegate, and ParameterTuningDelegate::setSliderRangeFactor().
Referenced by ParameterTuningWidget().
|
slot |
Definition at line 143 of file ParameterTuningWidget.cpp.
References closeActiveEditors(), jobItem(), m_jobModel, JobModel::restore(), and JobModel::runJob().
Referenced by ParameterTuningWidget().
QItemSelectionModel * ParameterTuningWidget::selectionModel | ( | ) |
Definition at line 73 of file ParameterTuningWidget.cpp.
References m_treeView.
Referenced by getSelectedParameters(), makeSelected(), and FitParameterWidget::onFitParametersSelectionChanged().
|
virtualinherited |
Reimplemented in SpecularPlotCanvas, SpecularDataImportWidget, SpecularDataWidget, IntensityDataWidget, JobResultsPresenter, ItemComboWidget, ProjectionsWidget, SpecularDataCanvas, IntensityDataCanvas, ColorMapCanvas, and Plot1DCanvas.
Definition at line 28 of file SessionItemWidget.cpp.
References SessionItemWidget::m_itemController, SessionItemController::setItem(), and SessionItemController::subscribe().
Referenced by MaskGraphicsProxy::setIntensityItem(), FitSessionWidget::setItem(), Plot1DCanvas::setItem(), ColorMapCanvas::setItem(), IntensityDataCanvas::setItem(), SpecularDataCanvas::setItem(), ProjectionsWidget::setItem(), ItemComboWidget::setItem(), IntensityDataWidget::setItem(), SpecularDataWidget::setItem(), SpecularDataImportWidget::setItem(), SpecularPlotCanvas::setItem(), ItemComboWidget::setPresentation(), FitComparisonWidget::subscribeToItem(), and FitComparisonWidget1D::subscribeToItem().
|
private |
Sets delegate to enabled/disabled state. In 'disabled' state the delegate is in ReadOnlyMode, if it was containing already some editing widget, it will be forced to close.
Definition at line 205 of file ParameterTuningWidget.cpp.
References closeActiveEditors(), m_delegate, and ParameterTuningDelegate::setReadOnly().
Referenced by updateDragAndDropSettings().
|
overrideprotectedinherited |
Definition at line 51 of file SessionItemWidget.cpp.
References SessionItemWidget::m_itemController, and SessionItemController::subscribe().
|
overrideprotectedvirtual |
Reimplemented from SessionItemWidget.
Definition at line 169 of file ParameterTuningWidget.cpp.
References jobItem(), JobItem::jobStatusChanged(), m_jobModel, SessionItem::model(), updateDragAndDropSettings(), updateJobStatus(), and updateParameterModel().
|
inlineprotectedvirtualinherited |
Reimplemented in ProjectionsPlot, IntensityDataProjectionsWidget, ColorMap, SpecularPlot, Plot1D, FitFlowWidget, FitComparisonWidget1D, FitComparisonWidget, RealDataMaskWidget, and RunFitControlWidget.
Definition at line 44 of file SessionItemWidget.h.
Referenced by SessionItemWidget::SessionItemWidget().
|
private |
Disable drag-and-drop abilities, if job is in fit running state.
Definition at line 189 of file ParameterTuningWidget.cpp.
References Fitting, jobItem(), m_treeView, and setTuningDelegateEnabled().
Referenced by subscribeToItem(), and updateJobStatus().
|
private |
Definition at line 226 of file ParameterTuningWidget.cpp.
References CautionSign::clear(), jobItem(), m_cautionSign, CautionSign::setCautionMessage(), and updateDragAndDropSettings().
Referenced by subscribeToItem().
|
privateslot |
Definition at line 117 of file ParameterTuningWidget.cpp.
References Error, jobItem(), m_jobModel, m_parameterTuningModel, and m_treeView.
Referenced by subscribeToItem().
|
private |
Definition at line 74 of file ParameterTuningWidget.h.
Referenced by updateJobStatus().
|
private |
Definition at line 73 of file ParameterTuningWidget.h.
Referenced by ParameterTuningWidget(), closeActiveEditors(), onSliderValueChanged(), and setTuningDelegateEnabled().
|
privateinherited |
Definition at line 49 of file SessionItemWidget.h.
Referenced by SessionItemWidget::SessionItemWidget(), SessionItemWidget::currentItem(), SessionItemWidget::hideEvent(), SessionItemWidget::setItem(), and SessionItemWidget::showEvent().
|
private |
Definition at line 69 of file ParameterTuningWidget.h.
Referenced by onCurrentLinkChanged(), restoreModelsOfCurrentJobItem(), subscribeToItem(), and updateParameterModel().
|
private |
Definition at line 70 of file ParameterTuningWidget.h.
Referenced by getSelectedParameters(), makeSelected(), and updateParameterModel().
|
private |
Definition at line 71 of file ParameterTuningWidget.h.
Referenced by ParameterTuningWidget().
|
private |
Definition at line 72 of file ParameterTuningWidget.h.
Referenced by ParameterTuningWidget(), closeActiveEditors(), onCustomContextMenuRequested(), selectionModel(), updateDragAndDropSettings(), and updateParameterModel().