BornAgain
1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Common interface for plot-descriptor interaction. More...
Public Types | |
enum class | PLOT_TYPE { Plot1D , Plot2D } |
Signals | |
void | statusString (const QString &text) |
Public Member Functions | |
ScientificPlot (QWidget *parent, PLOT_TYPE plot_type) | |
~ScientificPlot () override | |
virtual QList< QAction * > | actionList () |
bool | axesRangeContains (double xpos, double ypos) const |
Returns true if axes rectangle contains given in axes coordinates. More... | |
SessionItem * | currentItem () |
const SessionItem * | currentItem () const |
virtual const QCustomPlot * | customPlot () const =0 |
virtual QCustomPlot * | customPlot ()=0 |
virtual PlotEventInfo | eventInfo (double xpos, double ypos) const =0 |
Returns plot descriptor corresponding to given axes coordinates. More... | |
double | pixelToXaxisCoord (double pixel) const |
transform widget coordinates to axes coordinates More... | |
double | pixelToYaxisCoord (double pixel) const |
ScientificPlotEvent * | plotEvent () |
PLOT_TYPE | plotType () const |
Returns the type of current plot. More... | |
virtual void | setItem (SessionItem *item) |
void | setMouseTrackingEnabled (bool enable) |
Tracks move events (used when showing profile histograms and printing status string) More... | |
double | xAxisCoordToPixel (double axis_coordinate) const |
transform axes coordinates to CustomPlot widget coordinates More... | |
double | yAxisCoordToPixel (double axis_coordinate) const |
Protected Member Functions | |
virtual void | hideEvent (QHideEvent *) |
virtual void | showEvent (QShowEvent *) |
virtual void | subscribeToItem () |
virtual void | unsubscribeFromItem () |
Private Attributes | |
ScientificPlotEvent * | m_event |
SessionItemController * | m_itemController |
PLOT_TYPE | m_plot_type |
Common interface for plot-descriptor interaction.
Definition at line 27 of file ScientificPlot.h.
|
strong |
Enumerator | |
---|---|
Plot1D | |
Plot2D |
Definition at line 31 of file ScientificPlot.h.
|
explicit |
Definition at line 18 of file ScientificPlot.cpp.
|
overridedefault |
|
virtualinherited |
Reimplemented in SpecularDataCanvas, FitComparisonWidget1D, FitComparisonWidget, SpecularDataWidget, SpecularDataImportWidget, IntensityDataWidget, IntensityDataPropertyWidget, IntensityDataProjectionsWidget, IntensityDataCanvas, RealDataPresenter, and RealDataMaskWidget.
Definition at line 36 of file SessionItemWidget.cpp.
Referenced by ItemComboWidget::setPresentation().
bool ScientificPlot::axesRangeContains | ( | double | xpos, |
double | ypos | ||
) | const |
Returns true if axes rectangle contains given in axes coordinates.
Definition at line 50 of file ScientificPlot.cpp.
References customPlot().
Referenced by ColorMap::eventInfo(), Plot1D::eventInfo(), and SpecularPlot::eventInfo().
|
inherited |
Definition at line 41 of file SessionItemWidget.cpp.
Referenced by RectangularDetectorEditor::detectorItem(), SphericalDetectorEditor::detectorItem(), FitFlowWidget::fitSuiteItem(), DistributionEditor::groupItem(), DepthProbeInstrumentEditor::instrumentItem(), EnvironmentEditor::instrumentItem(), GISASBeamEditor::instrumentItem(), GISASDetectorEditor::instrumentItem(), GISASInstrumentEditor::instrumentItem(), OffSpecularBeamEditor::instrumentItem(), OffSpecularInstrumentEditor::instrumentItem(), PolarizationAnalysisEditor::instrumentItem(), SpecularBeamEditor::instrumentItem(), SpecularInstrumentEditor::instrumentItem(), RealDataMaskWidget::intensityDataItem(), IntensityDataCanvas::intensityDataItem(), IntensityDataProjectionsWidget::intensityDataItem(), IntensityDataWidget::intensityDataItem(), ProjectionsPlot::intensityItem(), ColorMap::intensityItem(), DetectorPresenter::itemPresentation(), InstrumentPresenter::itemPresentation(), JobResultsPresenter::itemPresentation(), FitComparisonWidget::jobItem(), FitComparisonWidget1D::jobItem(), FitParameterWidget::jobItem(), RunFitControlWidget::jobItem(), JobPropertiesWidget::jobItem(), ParameterTuningWidget::jobItem(), SpecularDataImportWidget::realDataItem(), ItemComboWidget::setPresentation(), JobResultsPresenter::setPresentation(), SpecularDataCanvas::specularDataItem(), SpecularDataImportWidget::specularDataItem(), SpecularDataWidget::specularDataItem(), SpecularPlot::specularItem(), ItemComboWidget::subscribeToItem(), DistributionEditor::subscribeToItem(), GISASDetectorEditor::subscribeToItem(), PolarizationAnalysisEditor::subscribeToItem(), IntensityDataPropertyWidget::subscribeToItem(), JobPropertiesWidget::subscribeToItem(), ProjectionsPropertyPanel::subscribeToItem(), ProjectionsPlot::unsubscribeFromChildren(), and Plot1D::viewItem().
|
inherited |
Definition at line 46 of file SessionItemWidget.cpp.
References SessionItemController::currentItem(), and SessionItemWidget::m_itemController.
|
pure virtual |
Implemented in SpecularPlot, Plot1D, and ColorMap.
|
pure virtual |
Implemented in SpecularPlot, Plot1D, and ColorMap.
Referenced by axesRangeContains(), FontScalingEvent::backupFonts(), ScientificPlotEvent::customPlot(), pixelToXaxisCoord(), pixelToYaxisCoord(), FontScalingEvent::setTickLabelFont(), xAxisCoordToPixel(), and yAxisCoordToPixel().
|
pure virtual |
Returns plot descriptor corresponding to given axes coordinates.
Implemented in SpecularPlot, Plot1D, and ColorMap.
Referenced by ScientificPlotEvent::currentPlotDescriptor().
|
protectedvirtualinherited |
Definition at line 56 of file SessionItemWidget.cpp.
References SessionItemWidget::m_itemController, and SessionItemController::unsubscribe().
double ScientificPlot::pixelToXaxisCoord | ( | double | pixel | ) | const |
transform widget coordinates to axes coordinates
Definition at line 35 of file ScientificPlot.cpp.
References customPlot().
Referenced by ScientificPlotEvent::currentPlotDescriptor(), and ColorMapSceneAdaptor::fromSceneX().
double ScientificPlot::pixelToYaxisCoord | ( | double | pixel | ) | const |
Definition at line 40 of file ScientificPlot.cpp.
References customPlot().
Referenced by ScientificPlotEvent::currentPlotDescriptor(), and ColorMapSceneAdaptor::fromSceneY().
|
inline |
Definition at line 42 of file ScientificPlot.h.
References m_event.
Referenced by ProjectionsEditorCanvas::setConnected().
|
inline |
Returns the type of current plot.
Definition at line 59 of file ScientificPlot.h.
References m_plot_type.
Referenced by ColorMap::eventInfo(), Plot1D::eventInfo(), SpecularPlot::eventInfo(), and FontScalingEvent::setTickLabelFont().
|
virtualinherited |
Reimplemented in SpecularPlotCanvas, SpecularDataImportWidget, SpecularDataWidget, IntensityDataWidget, SpecularDataCanvas, ProjectionsWidget, IntensityDataCanvas, ColorMapCanvas, and Plot1DCanvas.
Definition at line 28 of file SessionItemWidget.cpp.
References SessionItemWidget::m_itemController, SessionItemController::setItem(), and SessionItemController::subscribe().
Referenced by IntensityDataWidget::onFFTAction(), JobSelectorWidget::onSelectionChanged(), ProjectionsEditor::resetContext(), ProjectionsEditor::setContext(), MaskGraphicsProxy::setIntensityItem(), FitSessionWidget::setItem(), Plot1DCanvas::setItem(), InstrumentEditorWidget::setItem(), ColorMapCanvas::setItem(), IntensityDataCanvas::setItem(), ProjectionsWidget::setItem(), SpecularDataCanvas::setItem(), DistributionDialog::setItem(), IntensityDataWidget::setItem(), SpecularDataWidget::setItem(), SpecularDataImportWidget::setItem(), SpecularPlotCanvas::setItem(), ItemComboWidget::setPresentation(), GISASInstrumentEditor::subscribeToItem(), OffSpecularInstrumentEditor::subscribeToItem(), SpecularInstrumentEditor::subscribeToItem(), FitComparisonWidget::subscribeToItem(), FitComparisonWidget1D::subscribeToItem(), and GISASDetectorEditor::updateDetectorPresenter().
void ScientificPlot::setMouseTrackingEnabled | ( | bool | enable | ) |
Tracks move events (used when showing profile histograms and printing status string)
Definition at line 45 of file ScientificPlot.cpp.
References m_event, and ScientificPlotEvent::setMouseTrackingEnabled().
Referenced by ColorMap::ColorMap(), Plot1D::Plot1D(), SpecularPlot::SpecularPlot(), and PlotStatusLabel::setPlotLabelEnabled().
|
protectedvirtualinherited |
Definition at line 51 of file SessionItemWidget.cpp.
References SessionItemWidget::m_itemController, and SessionItemController::subscribe().
|
signal |
Referenced by ScientificPlotEvent::onCustomMouseMove(), and PlotStatusLabel::setConnected().
|
inlineprotectedvirtualinherited |
Reimplemented in SpecularPlot, Plot1D, ColorMap, FitComparisonWidget1D, FitComparisonWidget, ProjectionsPropertyPanel, ParameterTuningWidget, JobPropertiesWidget, ProjectionsPlot, IntensityDataPropertyWidget, IntensityDataProjectionsWidget, IntensityDataCanvas, SphericalDetectorEditor, SpecularInstrumentEditor, SpecularBeamEditor, RectangularDetectorEditor, PolarizationAnalysisEditor, OffSpecularInstrumentEditor, OffSpecularBeamEditor, GISASInstrumentEditor, GISASDetectorEditor, GISASBeamEditor, EnvironmentEditor, DepthProbeInstrumentEditor, DistributionEditor, RealDataMaskWidget, RunFitControlWidget, FitParameterWidget, FitFlowWidget, and ItemComboWidget.
Definition at line 43 of file SessionItemWidget.h.
Referenced by SessionItemWidget::SessionItemWidget().
|
inlineprotectedvirtualinherited |
Reimplemented in SpecularPlot, Plot1D, ColorMap, FitComparisonWidget1D, FitComparisonWidget, ProjectionsPropertyPanel, JobPropertiesWidget, ProjectionsPlot, IntensityDataPropertyWidget, IntensityDataProjectionsWidget, SphericalDetectorEditor, SpecularBeamEditor, RectangularDetectorEditor, PolarizationAnalysisEditor, OffSpecularBeamEditor, GISASDetectorEditor, GISASBeamEditor, EnvironmentEditor, DepthProbeInstrumentEditor, RealDataMaskWidget, RunFitControlWidget, and FitFlowWidget.
Definition at line 44 of file SessionItemWidget.h.
Referenced by SessionItemWidget::SessionItemWidget().
double ScientificPlot::xAxisCoordToPixel | ( | double | axis_coordinate | ) | const |
transform axes coordinates to CustomPlot widget coordinates
Definition at line 25 of file ScientificPlot.cpp.
References customPlot().
Referenced by ColorMapSceneAdaptor::toSceneX(), and ColorMap::viewportRectangleInWidgetCoordinates().
double ScientificPlot::yAxisCoordToPixel | ( | double | axis_coordinate | ) | const |
Definition at line 30 of file ScientificPlot.cpp.
References customPlot().
Referenced by ColorMapSceneAdaptor::toSceneY(), and ColorMap::viewportRectangleInWidgetCoordinates().
|
private |
Definition at line 66 of file ScientificPlot.h.
Referenced by plotEvent(), and setMouseTrackingEnabled().
|
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 65 of file ScientificPlot.h.
Referenced by plotType().