BornAgain
1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Common interface for plot-descriptor interaction.
Definition at line 27 of file ScientificPlot.h.
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 | |
void | hideEvent (QHideEvent *) override |
void | showEvent (QShowEvent *) override |
virtual void | subscribeToItem () |
virtual void | unsubscribeFromItem () |
Private Attributes | |
ScientificPlotEvent * | m_event |
SessionItemController * | m_itemController |
PLOT_TYPE | m_plot_type |
|
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 IntensityDataProjectionsWidget, SpecularDataWidget, SpecularDataCanvas, FitComparisonWidget1D, FitComparisonWidget, IntensityDataWidget, IntensityDataCanvas, SpecularDataImportWidget, 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 52 of file ScientificPlot.cpp.
References customPlot().
Referenced by Plot1D::eventInfo(), SpecularPlot::eventInfo(), and ColorMap::eventInfo().
|
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(), ParameterTuningWidget::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.
|
pure virtual |
Implemented in ColorMap, SpecularPlot, and Plot1D.
|
pure virtual |
Implemented in ColorMap, SpecularPlot, and Plot1D.
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 ColorMap, SpecularPlot, and Plot1D.
Referenced by ScientificPlotEvent::currentPlotDescriptor().
|
overrideprotectedinherited |
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 37 of file ScientificPlot.cpp.
References customPlot().
Referenced by ScientificPlotEvent::currentPlotDescriptor(), and ColorMapSceneAdaptor::fromSceneX().
double ScientificPlot::pixelToYaxisCoord | ( | double | pixel | ) | const |
Definition at line 42 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 Plot1D::eventInfo(), SpecularPlot::eventInfo(), ColorMap::eventInfo(), and FontScalingEvent::setTickLabelFont().
|
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().
void ScientificPlot::setMouseTrackingEnabled | ( | bool | enable | ) |
Tracks move events (used when showing profile histograms and printing status string)
Definition at line 47 of file ScientificPlot.cpp.
References m_event, and ScientificPlotEvent::setMouseTrackingEnabled().
Referenced by ColorMap::ColorMap(), Plot1D::Plot1D(), SpecularPlot::SpecularPlot(), and PlotStatusLabel::setPlotLabelEnabled().
|
overrideprotectedinherited |
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 ProjectionsPlot, IntensityDataProjectionsWidget, ColorMap, SpecularPlot, Plot1D, FitFlowWidget, FitComparisonWidget1D, FitComparisonWidget, IntensityDataCanvas, RealDataMaskWidget, RunFitControlWidget, ParameterTuningWidget, FitParameterWidget, and ItemComboWidget.
Definition at line 43 of file SessionItemWidget.h.
Referenced by SessionItemWidget::SessionItemWidget().
|
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().
double ScientificPlot::xAxisCoordToPixel | ( | double | axis_coordinate | ) | const |
transform axes coordinates to CustomPlot widget coordinates
Definition at line 27 of file ScientificPlot.cpp.
References customPlot().
Referenced by ColorMapSceneAdaptor::toSceneX(), and ColorMap::viewportRectangleInWidgetCoordinates().
double ScientificPlot::yAxisCoordToPixel | ( | double | axis_coordinate | ) | const |
Definition at line 32 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().